H264 stream to MP4 file without the first bytes on the H264 stream
ivan-perez
ivan at encore-lab.com
Fri Feb 3 11:14:06 UTC 2017
Good morning
I have a very simple pipeline which converts a H264 stream into a MP4 file.
It looks like this:
gst-launch-1.0 -e -v fdsrc
!
video/x-h264,width=640,height=480,framerate=30/1,profile=baseline,stream-format=avc,alignment=au
! h264parse
! mp4mux
! filesink location=test.mp4
I send to this pipeline's standard input the H264 stream I want to convert.
This works pretty well if I send the entire stream (starting at the very
first byte) to GStreamer.
Now I need to do the same but on an on-going H264 stream, which can't be
started at the same time as GStreamer (the stream is already active at the
moment that GStreamer starts, and I can't save all the previous contents of
the stream in order to send them to GStreamer at the beginning). So
GStreamer doesn't have the first bytes of the stream, and therefore it
cannot be processed. I get this when I run the pipeline:
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps =
"video/x-h264\,\ width\=\(int\)640\,\ height\=\(int\)480\,\
framerate\=\(fraction\)30/1\,\ profile\=\(string\)baseline\,\
stream-format\=\(string\)avc\,\ alignment\=\(string\)au"
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps =
"video/x-h264\,\ width\=\(int\)640\,\ height\=\(int\)480\,\
framerate\=\(fraction\)30/1\,\ profile\=\(string\)baseline\,\
stream-format\=\(string\)avc\,\ alignment\=\(string\)au"
Is there any parameter which tells the pipeline to ignore all contents until
it gets a valid frame, so it can start when that frame is detected?
Thanks in advance for your help!!
Regards
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/H264-stream-to-MP4-file-without-the-first-bytes-on-the-H264-stream-tp4681699.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list