stream static file

Tim Müller tim at centricular.com
Sun Sep 21 06:37:32 PDT 2014


On Sat, 2014-09-20 at 09:09 -0400, Nicolas Dufresne wrote:

> >         ! mux. "audio/x-raw, format=(string)S16LE, 
> > endianness=(int)1234, signed=(boolean)true, width=(int)16, 
> > depth=(int)16, rate=(int)44100, channels=(int)2" \
> I didn't tested the rest, but you are missing a ! between mux. and 
> audio/. Hopefully that's all you need.

A ! between mux. and the audio/x-raw capsfilter makes no sense,
since ... ! mux. represents the destination of a link already (the muxer
in this case).


Looking at the pipeline:


> uri=file:///home/carl/Videos/What_teachers_really_need_from_us.mp4
> 
> gst-launch-1.0 \
>     uridecodebin uri=$uri \
>         ! tsdemux \

uridecodebin already plugs a demuxer, so you don't need a demuxer after
it. Also, the demuxer for an .mp4 file would be qtdemux.

>         ! timeoverlay \
>         ! x264enc bitrate=2000 key-int-max=60 bframes=0
byte-stream=false aud=true tune=zerolatency \
>         ! h264parse \
>         ! "video/x-h264,profile=main" \
>         ! queue \
>         ! mux. "audio/x-raw, format=(string)S16LE,
endianness=(int)1234, signed=(boolean)true, width=(int)16,
depth=(int)16, rate=(int)44100, channels=(int)2" \
>         ! voaacenc bitrate=128000 \
>         ! flvmux streamable=true name=mux \
>         ! rtmpsink location="rtmp://a.rtmp.youtube.com/live2/x/$AUTH
app=live2"

The bit you're missing is the second audio link from uridecodebin. Your
pipeline should probably look something like this:

  gst-launch-1.0 uridecodebin uri=$uri name=d \
\
  d. ! videoconvert ! timeoverlay ! x264enc ! ... ! mux. \
\
  d. ! audioconvert ! audioresample !
"audio/x-raw,format=S16LE,rate=44100,channels=2" ! voaacenc
bitrate=128000 ! mux. \
\
  flvmux name=mux streamable=true ! rtmpsink location=...


(completely untested of course). You might also want a videorate before
x264enc and an audiorate in front of voaacenc.

Cheers
 -Tim



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



More information about the gstreamer-devel mailing list