Problem with storing x264 stream into a mkv file

Dušan Poizl poizl at maindata.sk
Wed Jun 18 05:20:08 PDT 2014


you may need to set codec_data in caps of udpsrc

Dňa 18.06.2014 14:12, Marcin Kolny wrote / napísal(a):
> Thanks for your reply!
>
> 2014-06-18 13:36 GMT+02:00 Tim Müller <tim at centricular.com
> <mailto:tim at centricular.com>>:
>
>     On Wed, 2014-06-18 at 13:08 +0200, Marcin Kolny wrote:
>
>     Hi,
>
>     > Hello, I've got    problem with storing x264 udp stream into a mkv
>     > file. My pipeline:
>     >
>     > gst-launch-1.0 udpsrc caps=application/x-rtp ! rtph264depay !
>     > video/x-h264, alignment=nal ! h264parse ! capsfilter caps="video/x\
>     > -h264, alignment=au, stream-format=avc" !  matroskamux ! fakesink
>     > dump=true
>     >
>     > ERROR: from element /GstPipeline:pipeline0/GstUDPSrc:udpsrc0:
>     Internal
>     > data flow error. streaming task paused, reason not-negotiated (-4)
>
>     What version is this with? Have you tried with git master?
>
> I used 1.0.10 version, I will try with git master.
>
>
>     I suspect what's happening is that rtph264depay/h264parse first output
>     incomplete caps (without width/height) and only add them later.
>     Possibly
>     matroskamux also wants a framerate in the caps which it won't get
>     here.
>
> Ok, I added capssetter between capsfilter and matroskamux, with width,
> height and framerate, and data flows through matroskamux, but
> unfortunatelly, I can't read this file:
> m.kolny at FLYC090:~ $ gst-launch-1.0 filesrc location="file.mkv" !
> decodebin ! fakesink
> Setting pipeline to PAUSED ...
> Pipeline is PREROLLING ...
> ERROR: from element
> /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstH264Parse:h264parse0: No
> valid frames found before end of stream
> Additional debug info:
> /home/m.kolny/video-tools/gst1/libs/gst/base/gstbaseparse.c(1066):
> gst_base_parse_sink_default ():
> /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstH264Parse:h264parse0
> ERROR: pipeline doesn't want to preroll.
> Setting pipeline to NULL ...
> Freeing pipeline ...
> m.kolny at FLYC090:~ $
>
> What might be the reason of this error?
>
>
>     Why are you forcing the depayloader to output alignment=nal btw?
>     rtph264depay ! h264parse ! matroskamux  should negotiate the right
>     format automatically. rtph264depay can output AVC.
>
> Unfortunatelly, I have to set nal alignment. It doesn't work without it.
>
>
>     You might also want an rtpjitterbuffer before the depayloader btw.
>
>     Cheers
>      -Tim
>
>     --
>     Tim Müller, Centricular Ltd - http://www.centricular.com
>
>     _______________________________________________
>     gstreamer-devel mailing list
>     gstreamer-devel at lists.freedesktop.org
>     <mailto:gstreamer-devel at lists.freedesktop.org>
>     http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
>
>
> -- 
> Best regards,
> Marcin Kolny
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140618/ef158f84/attachment.html>


More information about the gstreamer-devel mailing list