Skip to content

Instantly share code, notes, and snippets.

@aplocher
Forked from strezh/GStreamer-1.0 some strings.sh
Created September 20, 2016 08:51
Show Gist options
  • Save aplocher/ca6c1b96183ba7680d2071b7dc0f5e70 to your computer and use it in GitHub Desktop.
Save aplocher/ca6c1b96183ba7680d2071b7dc0f5e70 to your computer and use it in GitHub Desktop.

Revisions

  1. @strezh strezh revised this gist Dec 19, 2014. 1 changed file with 18 additions and 0 deletions.
    18 changes: 18 additions & 0 deletions GStreamer-1.0 some strings.sh
    Original file line number Diff line number Diff line change
    @@ -6,6 +6,24 @@ gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! \
    videoconvert ! \
    autovideosink

    # play YUV422 FULL HD file
    gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! \
    videoparse width=1920 height=1080 framerate=25/1 format=GST_VIDEO_FORMAT_Y42B ! \
    videoconvert ! \
    autovideosink

    # play YUV422 FULL HD file
    gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! \
    videoparse width=1920 height=1080 framerate=25/1 format=GST_VIDEO_FORMAT_Y42B ! \
    videoconvert ! \
    autovideosink

    # make PNG from YUV420
    gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! \
    videoparse width=1920 height=1080 framerate=25/1 format=GST_VIDEO_FORMAT_Y42B ! \
    videoconvert ! \
    pngenc ! multifilesink location=img%03d.png

    # play MP4 FULL HD file
    gst-launch-1.0 filesrc location=test.mp4 ! \
    decodebin name=dec ! \
  2. @strezh strezh revised this gist Mar 17, 2014. 1 changed file with 8 additions and 1 deletion.
    9 changes: 8 additions & 1 deletion GStreamer-1.0 some strings.sh
    Original file line number Diff line number Diff line change
    @@ -63,4 +63,11 @@ gst-launch-1.0 udpsrc port=1234 ! \
    "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)RAW, \
    sampling=(string)YCbCr-4:2:2, depth=(string)8, width=(string)640, height=(string)480, \
    ssrc=(uint)1825678493, payload=(int)96, clock-base=(uint)4068866987, seqnum-base=(uint)24582" ! \
    rtpvrawdepay ! queue ! videoconvert ! autovideosink
    rtpvrawdepay ! queue ! videoconvert ! autovideosink

    #save RAW video from webcam to file
    gst-launch-1.0 -v v4l2src ! 'video/x-raw, width=(int)640, height=(int)480, framerate=10/1' ! videoconvert ! filesink location=out.yuv

    #play RAW video from file
    gst-launch-1.0 filesrc location=out.yuv ! videoparse width=640 height=480 format=GST_VIDEO_FORMAT_YUY2 ! videoconvert ! autovideosink

  3. @strezh strezh revised this gist Mar 17, 2014. 1 changed file with 14 additions and 1 deletion.
    15 changes: 14 additions & 1 deletion GStreamer-1.0 some strings.sh
    Original file line number Diff line number Diff line change
    @@ -50,4 +50,17 @@ gst-launch-1.0 udpsrc port=1234 ! \
    rtph264depay ! \
    avdec_h264 ! \
    videoconvert ! \
    xvimagesink sync=false
    xvimagesink sync=false

    #play RAW webcam video over UDP (+RTP) without any coding
    #sender
    gst-launch-1.0 -v v4l2src ! 'video/x-raw, width=(int)640, height=(int)480, framerate=10/1' ! \
    videoconvert ! queue ! \
    rtpvrawpay ! queue ! \
    udpsink host=127.0.0.1 port=1234
    #receiver
    gst-launch-1.0 udpsrc port=1234 ! \
    "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)RAW, \
    sampling=(string)YCbCr-4:2:2, depth=(string)8, width=(string)640, height=(string)480, \
    ssrc=(uint)1825678493, payload=(int)96, clock-base=(uint)4068866987, seqnum-base=(uint)24582" ! \
    rtpvrawdepay ! queue ! videoconvert ! autovideosink
  4. @strezh strezh revised this gist Mar 17, 2014. 1 changed file with 34 additions and 7 deletions.
    41 changes: 34 additions & 7 deletions GStreamer-1.0 some strings.sh
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,21 @@
    #!/bin/bash

    # play YUV444 FULL HD file
    gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! videoparse width=1920 height=1080 framerate=25/1 format=GST_VIDEO_FORMAT_Y444 ! videoconvert ! autovideosink
    gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! \
    videoparse width=1920 height=1080 framerate=25/1 format=GST_VIDEO_FORMAT_Y444 ! \
    videoconvert ! \
    autovideosink

    # play MP4 FULL HD file
    gst-launch-1.0 filesrc location=test.mp4 ! decodebin name=dec ! queue ! videoconvert ! autovideosink dec. ! queue ! audioconvert ! audioresample ! autoaudiosink
    gst-launch-1.0 filesrc location=test.mp4 ! \
    decodebin name=dec ! \
    queue ! \
    videoconvert ! \
    autovideosink dec. ! \
    queue ! \
    audioconvert ! \
    audioresample ! \
    autoaudiosink

    # play MP3
    gst-launch-1.0 filesrc location=test.mp3 ! decodebin ! playsink
    @@ -14,13 +25,29 @@ gst-launch-1.0 filesrc location=test.ogg ! decodebin ! playsink

    # play MP3 over UDP + RTP
    # sender:
    gst-launch-1.0 -v filesrc location=test.mp3 ! decodebin ! audioconvert ! rtpL16pay ! udpsink port=6969 host=192.168.1.42
    gst-launch-1.0 -v filesrc location=test.mp3 ! \
    decodebin ! \
    audioconvert ! \
    rtpL16pay ! \
    udpsink port=6969 host=192.168.1.42
    # receiver:
    gst-launch-1.0 -v udpsrc port=6969 caps="application/x-rtp, media=(string)audio, format=(string)S32LE, layout=(string)interleaved, clock-rate=(int)44100, channels=(int)2, payload=(int)0" ! rtpL16depay ! playsink

    gst-launch-1.0 -v udpsrc port=6969 \
    caps="application/x-rtp, media=(string)audio, format=(string)S32LE, \
    layout=(string)interleaved, clock-rate=(int)44100, channels=(int)2, payload=(int)0" ! \
    rtpL16depay ! playsink

    #play webcam video over UDP with h264 coding
    #sender
    gst-launch-1.0 v4l2src ! 'video/x-raw, width=640, height=480, framerate=30/1' ! videoconvert ! x264enc pass=qual quantizer=20 tune=zerolatency ! rtph264pay ! udpsink host=192.168.1.140 port=1234
    gst-launch-1.0 v4l2src ! \
    'video/x-raw, width=640, height=480, framerate=30/1' ! \
    videoconvert ! \
    x264enc pass=qual quantizer=20 tune=zerolatency ! \
    rtph264pay ! \
    udpsink host=192.168.1.140 port=1234
    #receiver
    gst-launch-1.0 udpsrc port=1234 ! "application/x-rtp, payload=127" ! rtph264depay ! avdec_h264 ! videoconvert ! xvimagesink sync=false
    gst-launch-1.0 udpsrc port=1234 ! \
    "application/x-rtp, payload=127" ! \
    rtph264depay ! \
    avdec_h264 ! \
    videoconvert ! \
    xvimagesink sync=false
  5. @strezh strezh revised this gist Mar 17, 2014. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion GStreamer-1.0 some strings.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    #!/bin/bash

    # play YUV444 FULL HD file
    gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! videoparse width=1920 height=1080 framerate=25/1 format=GST_VIDEO_FORMAT_Y444 ! videoconvert ! autovideosink

    @@ -12,7 +14,7 @@ gst-launch-1.0 filesrc location=test.ogg ! decodebin ! playsink

    # play MP3 over UDP + RTP
    # sender:

    gst-launch-1.0 -v filesrc location=test.mp3 ! decodebin ! audioconvert ! rtpL16pay ! udpsink port=6969 host=192.168.1.42
    # receiver:
    gst-launch-1.0 -v udpsrc port=6969 caps="application/x-rtp, media=(string)audio, format=(string)S32LE, layout=(string)interleaved, clock-rate=(int)44100, channels=(int)2, payload=(int)0" ! rtpL16depay ! playsink

  6. @strezh strezh revised this gist Mar 17, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions GStreamer-1.0 some strings.sh
    Original file line number Diff line number Diff line change
    @@ -12,13 +12,13 @@ gst-launch-1.0 filesrc location=test.ogg ! decodebin ! playsink

    # play MP3 over UDP + RTP
    # sender:
    gst-launch v4l2src device=/dev/video0 ! 'video/x-raw-yuv,width=640,height=480' ! x264enc pass=qual quantizer=20 tune=zerolatency ! rtph264pay ! udpsink host=127.0.0.1 port=1234

    # receiver:
    gst-launch-1.0 -v udpsrc port=6969 caps="application/x-rtp, media=(string)audio, format=(string)S32LE, layout=(string)interleaved, clock-rate=(int)44100, channels=(int)2, payload=(int)0" ! rtpL16depay ! playsink


    #play webcam video over UDP with h264 coding
    #sender
    gst-launch-1.0 v4l2src ! 'video/x-raw, width=640, height=480' ! videoconvert ! x264enc ! rtph264pay ! udpsink host=127.0.0.1 port=1234
    gst-launch-1.0 v4l2src ! 'video/x-raw, width=640, height=480, framerate=30/1' ! videoconvert ! x264enc pass=qual quantizer=20 tune=zerolatency ! rtph264pay ! udpsink host=192.168.1.140 port=1234
    #receiver
    gst-launch-1.0 udpsrc port=1234 ! "application/x-rtp, payload=127" ! rtph264depay ! avdec_h264 ! videoconvert ! xvimagesink sync=false
  7. @strezh strezh revised this gist Mar 17, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion GStreamer-1.0 some strings.sh
    Original file line number Diff line number Diff line change
    @@ -17,7 +17,7 @@ gst-launch v4l2src device=/dev/video0 ! 'video/x-raw-yuv,width=640,height=480' !
    gst-launch-1.0 -v udpsrc port=6969 caps="application/x-rtp, media=(string)audio, format=(string)S32LE, layout=(string)interleaved, clock-rate=(int)44100, channels=(int)2, payload=(int)0" ! rtpL16depay ! playsink


    #play webcam video over UDP wsith x264 coding
    #play webcam video over UDP with h264 coding
    #sender
    gst-launch-1.0 v4l2src ! 'video/x-raw, width=640, height=480' ! videoconvert ! x264enc ! rtph264pay ! udpsink host=127.0.0.1 port=1234
    #receiver
  8. @strezh strezh renamed this gist Mar 17, 2014. 1 changed file with 1 addition and 1 deletion.
    Original file line number Diff line number Diff line change
    @@ -12,7 +12,7 @@ gst-launch-1.0 filesrc location=test.ogg ! decodebin ! playsink

    # play MP3 over UDP + RTP
    # sender:
    gst-launch-1.0 -v filesrc location=test.mp3 ! decodebin ! audioconvert ! rtpL16pay ! udpsink port=6969 host=192.168.1.42
    gst-launch v4l2src device=/dev/video0 ! 'video/x-raw-yuv,width=640,height=480' ! x264enc pass=qual quantizer=20 tune=zerolatency ! rtph264pay ! udpsink host=127.0.0.1 port=1234
    # receiver:
    gst-launch-1.0 -v udpsrc port=6969 caps="application/x-rtp, media=(string)audio, format=(string)S32LE, layout=(string)interleaved, clock-rate=(int)44100, channels=(int)2, payload=(int)0" ! rtpL16depay ! playsink

  9. @strezh strezh revised this gist Mar 17, 2014. 1 changed file with 8 additions and 1 deletion.
    9 changes: 8 additions & 1 deletion GStreamer some strings.sh
    Original file line number Diff line number Diff line change
    @@ -14,4 +14,11 @@ gst-launch-1.0 filesrc location=test.ogg ! decodebin ! playsink
    # sender:
    gst-launch-1.0 -v filesrc location=test.mp3 ! decodebin ! audioconvert ! rtpL16pay ! udpsink port=6969 host=192.168.1.42
    # receiver:
    gst-launch-1.0 -v udpsrc port=6969 caps="application/x-rtp, media=(string)audio, format=(string)S32LE, layout=(string)interleaved, clock-rate=(int)44100, channels=(int)2, payload=(int)0" ! rtpL16depay ! playsink
    gst-launch-1.0 -v udpsrc port=6969 caps="application/x-rtp, media=(string)audio, format=(string)S32LE, layout=(string)interleaved, clock-rate=(int)44100, channels=(int)2, payload=(int)0" ! rtpL16depay ! playsink


    #play webcam video over UDP wsith x264 coding
    #sender
    gst-launch-1.0 v4l2src ! 'video/x-raw, width=640, height=480' ! videoconvert ! x264enc ! rtph264pay ! udpsink host=127.0.0.1 port=1234
    #receiver
    gst-launch-1.0 udpsrc port=1234 ! "application/x-rtp, payload=127" ! rtph264depay ! avdec_h264 ! videoconvert ! xvimagesink sync=false
  10. @strezh strezh renamed this gist Feb 20, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion GStreamer some strings → GStreamer some strings.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # play YUV444 FULL HD file
    # play YUV444 FULL HD file
    gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! videoparse width=1920 height=1080 framerate=25/1 format=GST_VIDEO_FORMAT_Y444 ! videoconvert ! autovideosink

    # play MP4 FULL HD file
  11. @strezh strezh created this gist Feb 20, 2014.
    17 changes: 17 additions & 0 deletions GStreamer some strings
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    # play YUV444 FULL HD file
    gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! videoparse width=1920 height=1080 framerate=25/1 format=GST_VIDEO_FORMAT_Y444 ! videoconvert ! autovideosink

    # play MP4 FULL HD file
    gst-launch-1.0 filesrc location=test.mp4 ! decodebin name=dec ! queue ! videoconvert ! autovideosink dec. ! queue ! audioconvert ! audioresample ! autoaudiosink

    # play MP3
    gst-launch-1.0 filesrc location=test.mp3 ! decodebin ! playsink

    # play OGG
    gst-launch-1.0 filesrc location=test.ogg ! decodebin ! playsink

    # play MP3 over UDP + RTP
    # sender:
    gst-launch-1.0 -v filesrc location=test.mp3 ! decodebin ! audioconvert ! rtpL16pay ! udpsink port=6969 host=192.168.1.42
    # receiver:
    gst-launch-1.0 -v udpsrc port=6969 caps="application/x-rtp, media=(string)audio, format=(string)S32LE, layout=(string)interleaved, clock-rate=(int)44100, channels=(int)2, payload=(int)0" ! rtpL16depay ! playsink