GNOME Bugzilla – Bug 347984
Internal GStreamer error in ffdec_mpeg4
Last modified: 2006-07-19 17:09:11 UTC
Steps to reproduce: gst-launch udpsrc multicast-group="226.255.0.40" port=6000 ! application/x-rtp,clock-rate=90000,media=video ! rtpmp4vdepay ! ffdec_mpeg4 ! ffmpegcolorspace ! autovideosink Stack trace: ERROR: from element /pipeline0/ffdec_mpeg40: Internal GStreamer error: negotiation problem. Please file a bug at http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer. Additional debug info: gstffmpegdec.c(1276): gst_ffmpegdec_chain (): /pipeline0/ffdec_mpeg40: ffdec_mpeg4: input format was not set before data start Execution ended after 4732000 ns. Other information:
This suggests the upstream element (rtpmp4vdepay in this case) hasn't set any caps on the first buffer it pushed.
All the mpeg4 video over RTP I've ever seen has the initialisation data supplied out of band (in an SDP file, for instance), and you'll need to supply this. I think we call this "codec_info" or "codec_data" in the caps - it's a hex-encoded string. It's going to be pretty painful doing this from gst-launch, though it should be possible. Dropping severity; can you confirm that supplying the initialisation data works correctly?
yep, codec_data is required along with the other rtp parameters. The easiest way to make this work is to do the following sequence: gst-launch -v filesrc location=~/data/sincity.mp4 ! qtdemux .video_00 ! rtpmp4gpay ! udpsink Setting pipeline to PAUSED ... Pipeline is PREROLLING ... /pipeline0/rtpmp4gpay0.src: caps = application/x-rtp, media=(string)video, payload=(int)96, clock-rate=(int)90000, encoding-name=(string)mpeg4-generic, ssrc=(guint)915622229, clock-base=(guint)766539574, seqnum-base=(guint)24262, streamtype=(int)4, profile-level-id=(int)1, mode=(string)generic, config=(string)000001200086c5d4c307d314043c1463000001b25876694430303334, sizelength=(int)13, indexlength=(int)3, indexdeltalength=(int)3 /pipeline0/rtpmp4gpay0.sink: caps = video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, codec_data=(buffer)000001200086c5d4c307d314043c1463000001b25876694430303334, width=(int)640, height=(int)480, framerate=(fraction)44100/1471 /pipeline0/udpsink0.sink: caps = application/x-rtp, media=(string)video, payload=(int)96, clock-rate=(int)90000, encoding-name=(string)mpeg4-generic, ssrc=(guint)915622229, clock-base=(guint)766539574, seqnum-base=(guint)24262, streamtype=(int)4, profile-level-id=(int)1, mode=(string)generic, config=(string)000001200086c5d4c307d314043c1463000001b25876694430303334, sizelength=(int)13, indexlength=(int)3, indexdeltalength=(int)3 Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstSystemClock Then copy the rtp caps on udpsink and use them as caps on the receiving udpsrc, like: gst-launch -v udpsrc caps="application/x-rtp, media=(string)video, payload=(int)96, clock-rate=(int)90000, encoding-name=(string)mpeg4-generic, ssrc=(guint)915622229, clock-base=(guint)766539574, seqnum-base=(guint)24262, streamtype=(int)4, profile-level-id=(int)1, mode=(string)generic, config=(string)000001200086c5d4c307d314043c1463000001b25876694430303334, sizelength=(int)13, indexlength=(int)3, indexdeltalength=(int)3" ! rtpmp4gdepay ! ffdec_mpeg4 ! xvimagesink sync=false I did some fixes to gst-ffmpeg to not generate wrong timestamps. Above pipelines work fine. Hope that helps, reopen if something is unclear.