Gstreamer One Liners: Unterschied zwischen den Versionen

aus Metalab, dem offenen Zentrum für meta-disziplinäre Magier und technisch-kreative Enthusiasten.
Wechseln zu: Navigation, Suche
K (Receive & play synchronized video streams)
K (Play dumped videos)
Zeile 88: Zeile 88:
 
<pre>
 
<pre>
 
gst-launch-0.10 -v \
 
gst-launch-0.10 -v \
# Open session0.mjpeg
+
# Open session0.mjpeg \
 
filesrc location=session0.mjpeg ! \
 
filesrc location=session0.mjpeg ! \
# Decode video & adjust framerate
+
# Decode video & adjust framerate \
 
jpegdec ! videorate ! video/x-raw-yuv,framerate=15/1 ! \
 
jpegdec ! videorate ! video/x-raw-yuv,framerate=15/1 ! \
# Play video
+
# Play video \
 
xvimagesink \
 
xvimagesink \
# Open session1.mjpeg
+
# Open session1.mjpeg \
 
filesrc location=session1.mjpeg ! \
 
filesrc location=session1.mjpeg ! \
# Decode video & adjust framerate
+
# Decode video & adjust framerate \
 
jpegdec ! videorate ! video/x-raw-yuv,framerate=15/1 ! \
 
jpegdec ! videorate ! video/x-raw-yuv,framerate=15/1 ! \
# Play video
+
# Play video \
 
xvimagesink
 
xvimagesink
 
</pre>
 
</pre>
  
 
[[Kategorie:CLI]]
 
[[Kategorie:CLI]]

Version vom 26. April 2010, 04:28 Uhr

kind of.

Stereo Goggles

Capture & send synchronized video streams

gst-launch-0.10 -v gstrtpbin name=rtpbin \
# Capture video0 \
v4l2src device=/dev/video0 ! \
'image/jpeg, width=(int)640, height=(int)480, framerate=(fraction)30/1' ! \
# Session 0: Create \
rtpjpegpay ! rtpbin.send_rtp_sink_0 \ 
rtpbin.send_rtp_src_0 ! multiudpsink clients="127.0.0.1:9996" \
# Session 0: Send RTCP packets \
rtpbin.send_rtcp_src_0 ! multiudpsink clients="127.0.0.1:9997" sync=false async=false \
# Session 0: Receive RTCP packets \
udpsrc port=10000 ! rtpbin.recv_rtcp_sink_0 \
# Capture video1 \
v4l2src device=/dev/video1 ! \
'image/jpeg, width=(int)640, height=(int)480, framerate=(fraction)30/1' ! \
# Session 1: Create \
rtpjpegpay ! rtpbin.send_rtp_sink_1 \
rtpbin.send_rtp_src_1 ! multiudpsink clients="127.0.0.1:9998" \
# Session 1: Receive RTCP packets \
rtpbin.send_rtcp_src_1 ! multiudpsink clients="127.0.0.1:9999" sync=false async=false \
# Session 1: Send RTCP packets \
udpsrc port=10001 ! rtpbin.recv_rtcp_sink_1

Receive & dump synchronized video streams

gst-launch-0.10 -v gstrtpbin name=rtpbin \
# Session 0: join \
udpsrc caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)JPEG, ssrc=(guint)469657143, payload=(int)96, clock-base=(guint)2841649723, seqnum-base=(guint)39869" port=9996 !\
rtpbin.recv_rtp_sink_0  \
rtpbin. ! rtpjpegdepay ! \ 
# Session 0: Dump video \
filesink location=session0.mjpeg \
# Session 0: Receive RTCP packets \
udpsrc port=9997 ! rtpbin.recv_rtcp_sink_0 \
# Session 0: Send RTCP packets \
rtpbin.send_rtcp_src_0 ! multiudpsink clients="127.0.0.1:10000" sync=false async=false \
# Session 1: join \
udpsrc caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)JPEG, ssrc=(guint)469657143, payload=(int)96, clock-base=(guint)2841649723, seqnum-base=(guint)39869" port=9998 ! \
rtpbin.recv_rtp_sink_1  \
rtpbin. ! rtpjpegdepay ! \
# Session 1: Dump video \
filesink location=session1.mjpeg \
# Session 1: Receive RTCP packets \
udpsrc port=9999 ! rtpbin.recv_rtcp_sink_1 \
# Session 1: Send RTCP packets \
rtpbin.send_rtcp_src_1 ! multiudpsink clients="127.0.0.1:10001" sync=false async=false

Receive & play synchronized video streams


gst-launch-0.10 -v gstrtpbin name=rtpbin \
# Session 0: Join \
udpsrc caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)JPEG, ssrc=(guint)469657143, payload=(int)96, clock-base=(guint)2841649723, seqnum-base=(guint)39869" port=9996 !\
rtpbin.recv_rtp_sink_0  \
rtpbin. ! rtpjpegdepay ! \ 
# Session 1: Decode video & adjust framerate \
jpegdec ! videorate ! video/x-raw-yuv,framerate=15/1 ! \
# Session 0: Play video \
xvimagesink \
# Session 0: Receive RTCP packets \
udpsrc port=9997 ! rtpbin.recv_rtcp_sink_0 \
# Session 0: Send RTCP packets \
rtpbin.send_rtcp_src_0 ! multiudpsink clients="127.0.0.1:10000" sync=false async=false \

gst-launch-0.10 -v gstrtpbin name=rtpbin \
# Session 1: Join \
udpsrc caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)JPEG, ssrc=(guint)469657143, payload=(int)96, clock-base=(guint)2841649723, seqnum-base=(guint)39869" port=9998 ! \
rtpbin.recv_rtp_sink_1  \
rtpbin. ! rtpjpegdepay ! \
# Session 1: Decode video & adjust framerate \
jpegdec ! videorate ! video/x-raw-yuv,framerate=15/1 ! \
# Session 1: Play video \
xvimagesink \
# Session 1: Receive RTCP packets \
udpsrc port=9999 ! rtpbin.recv_rtcp_sink_1 \
# Session 1: Send RTCP packets \
rtpbin.send_rtcp_src_1 ! multiudpsink clients="127.0.0.1:10001" sync=false async=false

Play dumped videos

gst-launch-0.10 -v \
# Open session0.mjpeg \
filesrc location=session0.mjpeg ! \
# Decode video & adjust framerate \
jpegdec ! videorate ! video/x-raw-yuv,framerate=15/1 ! \
# Play video \
xvimagesink \
# Open session1.mjpeg \
filesrc location=session1.mjpeg ! \
# Decode video & adjust framerate \
jpegdec ! videorate ! video/x-raw-yuv,framerate=15/1 ! \
# Play video \
xvimagesink