add link re websockets and v4l2sink
[toast/stream2beamer.git] / stream2beamer.md
index fd547da866db7d63110385ae6c32a3c77076f818..41e74abcea65520fb51bea67390261aa8eecea45 100644 (file)
@@ -11,6 +11,16 @@ IPv6+IPv4, and no TLS:
     ./laplace -addr "[::]:8080" -tls=false
 
 # gstreamer
+* Supports RTP
+* Supports webcam capture via v4l (video for linux)
+* Supports screen capture via xmanager/ximagesrc
+* Interesting URLs:
+  * WebRTC in one direction only: https://stackoverflow.com/questions/57430215/how-to-use-webrtcbin-create-offer-only-receive-video
+  * gstreamer to VLC via RTP: https://stackoverflow.com/questions/13154983/gstreamer-rtp-stream-to-vlc
+  * https://github.com/intel/gstreamer-media-SDK/issues/138
+  * https://developer.ridgerun.com/wiki/index.php?title=GstWebRTC_Pipelines
+  * https://developer.ridgerun.com/wiki/index.php?title=GstWebRTC_-_H264-Opus_Examples#Receive_Pipeline
+
 ## WebRTC
 gstreamer has a WebRTC implementation.
 The examples at https://github.com/centricular/gstwebrtc-demos.git work once
@@ -19,8 +29,35 @@ The examples at https://github.com/centricular/gstwebrtc-demos.git work once
 
 has been set (see https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/811)
 
-Another maybe helpful link: https://developer.ridgerun.com/wiki/index.php?title=GstWebRTC_-_H264-Opus_Examples#Receive_Pipeline
-
+## websockets
+
+connecting to websockets (plus gstreamer and v4l2sink)
+
+https://michael.stapelberg.ch/posts/2020-06-06-iphone-camera-linux-v4l2loopback/
+
+## gstreamer examples
+    gst-launch-1.0 -v playbin uri=file:///home/philipp/tmp/GerisGame.mp4
+    
+    # send
+    gst-launch-1.0 ximagesrc ! videoconvert ! videoscale ! video/x-raw,width=800,height=600 ! vp8enc ! rtpvp8pay ! udpsink host=239.255.12.42 port=5004
+    # receive
+    gst-launch-1.0 udpsrc address=239.255.12.42 port=5004 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)VP8-DRAFT-IETF-01, payload=(int)96, ssrc=(uint)2990747501, clock-base=(uint)275641083, seqnum-base=(uint)34810" ! rtpvp8depay ! vp8dec ! autovideosink
+    
+    # send
+    gst-launch-1.0 -v ximagesrc ! videoconvert ! videoscale ! video/x-raw,format=I420,width=800,height=600,framerate=25/1 ! jpegenc ! rtpjpegpay ! udpsink host=239.255.12.42 port=5004
+    # receive
+    gst-launch-1.0 udpsrc address=239.255.12.42 port=5004 ! application/x-rtp,encoding-name=JPEG,payload=26 ! rtpjpegdepay ! jpegdec ! autovideosink
+
+
+* https://stackoverflow.com/questions/33747500/using-gstreamer-to-capture-screen-and-show-it-in-a-window/33822024#33822024
+* http://www.einarsundgren.se/gstreamer-basic-real-time-streaming-tutorial/
+* https://gist.github.com/tetkuz/0c038321d05586841897
+* https://gist.github.com/esrever10/7d39fe2d4163c5b2d7006495c3c911bb
+* https://gist.github.com/nebgnahz/26a60cd28f671a8b7f522e80e75a9aa5
+* https://salsa.debian.org/debconf-video-team/ansible/-/blob/master/roles/voctomix/templates/videoteam-stream.j2
+* https://github.com/xfxf/video-scripts/blob/master/michael/youtube-live.sh
+  (and others in the same repo)
+    
 # VLC
 Note that you have to close VLC and open it again for new streaming as VLC leaves the connections
 open (I spent hours figuring out why http based streaming doesn't work - `netstat -4 --ip` is nice
@@ -78,7 +115,7 @@ The address at the source side has to be the external one of the local computer.
 ### Source (server)
     cvlc -vv --sout '#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128}:standard{access=http,mux=ogg,dst=0.0.0.0:8080}' GerisGame.mp4
 
-# Player (client)
+### Player (client)
 
     vlc http://192.168.1.54:8080