Encoding and streaming video+audio to UDP

Tim Müller tim at centricular.com
Thu Jul 24 16:09:56 PDT 2014


On Thu, 2014-07-24 at 08:09 -0700, dmitrijs2005 wrote:

Hi,

> I am new to streaming through "GStreamer", could you please help me with
> writing of gst-launch command for getting raw video from decklinksrc, then
> encoding it (video H264 + audio AAC) and streaming  to udp on the local
> machine with muxing of video and audio streams?
> 
> I tried to stream only audio
> gst-launch-1.0 decklinksrc mode=10 name=src src.! audio/x-raw ! queue ! 
> audioconvert ! voaacenc bitrate=128 ! mpegtsmux alignment=7 name=mux !
> rndbuffersize max=1316 min=1316 ! udpsink host=127.0.0.1 port=5000 src.!
> queue
> 
> or video
> gst-launch-1.0 decklinksrc mode=10 name=src src.! video/x-raw ! queue ! 
> videoconvert ! x264enc bitrate=5000 ! mpegtsmux alignment=7 name=mux !
> rndbuffersize max=1316 min=1316 ! udpsink host=127.0.0.1 port=5000 src.!
> queue
> 
> Checking  with ffprobe, everything seems fine, but I can't figure out, how
> to join audio and video encoding and stream both video and audio using one
> port

Try something like this (untested):

gst-launch-1.0 \
    mpegtsmux alignment=7 name=mux ! \
        rndbuffersize max=1316 min=1316 ! \
        udpsink host=127.0.0.1 port=5000 \
    decklinksrc mode=10 name=src \
        src. ! audio/x-raw ! queue !  audioconvert ! \
             voaacenc bitrate=128 ! mux. \
        src.! video/x-raw ! queue !  videoconvert ! \
             x264enc bitrate=5000 ! mux.

Cheers
 -Tim

-- 
Tim Müller, Centricular Ltd - http://www.centricular.com



More information about the gstreamer-devel mailing list