Changes between Version 1 and Version 2 of Yocto/gstreamer/streaming


Ignore:
Timestamp:
10/01/2018 07:00:02 PM (6 years ago)
Author:
Ryan Erbstoesser
Comment:

add in rtmp section that got chopped out from server crash

Legend:

Unmodified
Added
Removed
Modified
  • Yocto/gstreamer/streaming

    v1 v2  
    9797'''Note that it is recommended that you use [#rtsp RTSP] unless you know exactly what you are doing to overcome the limitations listed above'''
    9898
    99 Examples:
    100  * encode and send H264 video from Ventana:
     99=== Example 1 ===
     100 * Encode and send H264 video from Ventana:
    101101  1. Start decoder first:
    102102{{{
     
    117117 * when using RTP a capsfilter must be used to specify the payload as application/x-rtp as above. You can determine the capsfilter required by starting the encoder with a verbose flag {{{-v}}} and looking for  {{{caps = "application/x-rtp"}}}
    118118
     119=== Example 2 ===
     120* Encode and send H264 video from Ventana to a PC with VLC:
     1211. Start decoder first:
     122 a. Create SDP file like below (IP address in example is that of the Ventana board)
     123{{{
     124v=0
     125m=video 5000 RTP/AVP 96
     126c=IN IP4 172.24.20.207
     127a=rtpmap:96 H264/90000
     128}}}
     129 b. Open SDP file in VLC
     1302. Start encoder (Ventana) second: (IP address in below example is IP of the PC)
     131{{{
     132gst-launch-1.0 videotestsrc  ! imxipuvideotransform ! imxvpuenc_h264 ! rtph264pay config-interval=3 ! udpsink host=172.24.20.26 port=5000
     133}}}
    119134
    120135[=#rtsp]
     
    346361}}}
    347362  * the larger latency can help account for audio/video timestamp discontinuities in the encoded file source
     363
     364== RTMP Youtube Streaming ==
     365
     366
     367
     368It is possible to stream video to ​Youtube Live Streaming from the Gateworks board.
     369
     370Please note this requires the rtmpsink gstreamer plugin which is available on the Gateworks Trusty Multimedia Ubuntu image (which uses the Gateworks 3.14 kernel and gstreamer)
     371
     372Below is an example pipeline (which needs to be adjusted with the right youtube RTMP address). The pipeline will playback a colorbar pattern live on youtube.
     373{{{
     374gst-launch-1.0 videotestsrc do-timestamp=true is-live=true ! \
     375"video/x-raw,width=640,height=360,framerate=15/1" ! queue ! \
     376 autovideoconvert ! imxvpuenc_h264 bitrate=600 idr-interval=4 ! \
     377 h264parse ! "video/x-h264,level=4.1,profile=main" ! queue ! \
     378 mux. audiotestsrc is-live=true ! \
     379"audio/x-raw, format=S16LE, endianness=1234, signed=true, width=16, depth=16, rate=44100,channels=2" ! \
     380 queue ! voaacenc bitrate=128000 ! aacparse ! \
     381audio/mpeg,mpegversion=4,stream-format=raw ! queue ! \
     382flvmux streamable=true name=mux ! queue ! \
     383rtmpsink location="rtmp://a.rtmp.youtube.com/live2/gwtest-0665.yvr6-25sv-7gth-dff1 live=true"
     384}}}
     385
     386Another example below using a !GoPro camera via HDMI input:
     387{{{
     388gst-launch-1.0 imxv4l2videosrc device=/dev/video0 ! imxipuvideotransform ! imxvpuenc_h264 bitrate=5000 idr-interval=4 ! h264parse ! "video/x-h264,level=4.1,profile=main" ! queue ! mux. audiotestsrc is-live=true ! "audio/x-raw, format=S16LE, endianness=1234, signed=true, width=16, depth=16, rate=44100,channels=2" ! queue ! voaacenc bitrate=128000 ! aacparse ! audio/mpeg,mpegversion=4,stream-format=raw ! queue ! flvmux streamable=true name=mux ! queue ! rtmpsink location="rtmp://a.rtmp.youtube.com/live2/test.ygg4-24rv-54gh-dtt1 live=true"
     389}}}
     390
     391
    348392
    349393[=#abs]