GNOME Bugzilla – Bug 703743
videomixer: Handling of variable fps streams broken
Last modified: 2013-07-09 10:44:10 UTC
I'm having problems trying to use videomixer with two udpsrc's. I've reproduced the error using a simpler pipeline using videotestsrc's instead as follows: $ gst-launch-1.0 -m -v videomixer name=mix ! videoconvert ! autovideosink videotestsrc ! avenc_mpeg4 ! rtpmp4vpay ! rtpmp4vdepay ! avdec_mpeg4 ! mix. videotestsrc ! avenc_mpeg4 ! rtpmp4vpay ! rtpmp4vdepay ! avdec_mpeg4 ! mix. Setting pipeline to PAUSED ... Pipeline is PREROLLING ... Got message #39 from element "autovideosink0" (state-changed): GstMessageStateChanged, old-state=(GstState)GST_STATE_NULL, new-state=(GstState)GST_STATE_READY, pending-state=(GstState)GST_STATE_VOID_PENDING; /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc1.GstPad:src: caps = video/x-raw, format=(string)I420, width=(int)320, height=(int)240, framerate=(fraction)30/1 /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc1.GstPad:src: caps = video/x-raw, format=(string)I420, width=(int)320, height=(int)240, framerate=(fraction)30/1 /GstPipeline:pipeline0/avenc_mpeg4:avenc_mpeg4-0.GstPad:sink: caps = video/x-raw, format=(string)I420, width=(int)320, height=(int)240, framerate=(fraction)30/1 /GstPipeline:pipeline0/avenc_mpeg4:avenc_mpeg4-0.GstPad:sink: caps = video/x-raw, format=(string)I420, width=(int)320, height=(int)240, framerate=(fraction)30/1 Got message #40 from element "videoconvert0" (state-changed): GstMessageStateChanged, old-state=(GstState)GST_STATE_NULL, new-state=(GstState)GST_STATE_READY, pending-state=(GstState)GST_STATE_VOID_PENDING; Got message #41 from element "mix" (state-changed): GstMessageStateChanged, old-state=(GstState)GST_STATE_NULL, new-state=(GstState)GST_STATE_READY, pending-state=(GstState)GST_STATE_VOID_PENDING; Got message #42 from element "avdec_mpeg4-1" (state-changed): GstMessageStateChanged, old-state=(GstState)GST_STATE_NULL, new-state=(GstState)GST_STATE_READY, pending-state=(GstState)GST_STATE_VOID_PENDING; Got message #43 from element "avdec_mpeg4-0" (state-changed): GstMessageStateChanged, old-state=(GstState)GST_STATE_NULL, new-state=(GstState)GST_STATE_READY, pending-state=(GstState)GST_STATE_VOID_PENDING; Got message #44 from element "rtpmp4vdepay1" (state-changed): GstMessageStateChanged, old-state=(GstState)GST_STATE_NULL, new-state=(GstState)GST_STATE_READY, pending-state=(GstState)GST_STATE_VOID_PENDING; Got message #45 from element "rtpmp4vdepay0" (state-changed): GstMessageStateChanged, old-state=(GstState)GST_STATE_NULL, new-state=(GstState)GST_STATE_READY, pending-state=(GstState)GST_STATE_VOID_PENDING; Got message #46 from element "rtpmp4vpay1" (state-changed): GstMessageStateChanged, old-state=(GstState)GST_STATE_NULL, new-state=(GstState)GST_STATE_READY, pending-state=(GstState)GST_STATE_VOID_PENDING; Got message #47 from element "rtpmp4vpay0" (state-changed): GstMessageStateChanged, old-state=(GstState)GST_STATE_NULL, new-state=(GstState)GST_STATE_READY, pending-state=(GstState)GST_STATE_VOID_PENDING; Got message #48 from element "avenc_mpeg4-1" (state-changed): GstMessageStateChanged, old-state=(GstState)GST_STATE_NULL, new-state=(GstState)GST_STATE_READY, pending-state=(GstState)GST_STATE_VOID_PENDING; Got message #49 from element "avenc_mpeg4-0" (state-changed): GstMessageStateChanged, old-state=(GstState)GST_STATE_NULL, new-state=(GstState)GST_STATE_READY, pending-state=(GstState)GST_STATE_VOID_PENDING; Got message #50 from element "videotestsrc1" (state-changed): GstMessageStateChanged, old-state=(GstState)GST_STATE_NULL, new-state=(GstState)GST_STATE_READY, pending-state=(GstState)GST_STATE_VOID_PENDING; Got message #51 from element "videotestsrc0" (state-changed): GstMessageStateChanged, old-state=(GstState)GST_STATE_NULL, new-state=(GstState)GST_STATE_READY, pending-state=(GstState)GST_STATE_VOID_PENDING; Got message #52 from element "pipeline0" (state-changed): GstMessageStateChanged, old-state=(GstState)GST_STATE_NULL, new-state=(GstState)GST_STATE_READY, pending-state=(GstState)GST_STATE_PAUSED; Got message #53 from element "autovideosink0-actual-sink-osxvideo" (element): have-ns-view, nsview=(gpointer)NULL; Got message #54 from element "autovideosink0-actual-sink-osxvideo" (element): prepare-window-handle; Got message #57 from element "videoconvert0" (state-changed): GstMessageStateChanged, old-state=(GstState)GST_STATE_READY, new-state=(GstState)GST_STATE_PAUSED, pending-state=(GstState)GST_STATE_VOID_PENDING; Got message #58 from element "mix" (state-changed): GstMessageStateChanged, old-state=(GstState)GST_STATE_READY, new-state=(GstState)GST_STATE_PAUSED, pending-state=(GstState)GST_STATE_VOID_PENDING; Got message #59 from element "avdec_mpeg4-1" (state-changed): GstMessageStateChanged, old-state=(GstState)GST_STATE_READY, new-state=(GstState)GST_STATE_PAUSED, pending-state=(GstState)GST_STATE_VOID_PENDING; Got message #60 from element "avdec_mpeg4-0" (state-changed): GstMessageStateChanged, old-state=(GstState)GST_STATE_READY, new-state=(GstState)GST_STATE_PAUSED, pending-state=(GstState)GST_STATE_VOID_PENDING; Got message #61 from element "rtpmp4vdepay1" (state-changed): GstMessageStateChanged, old-state=(GstState)GST_STATE_READY, new-state=(GstState)GST_STATE_PAUSED, pending-state=(GstState)GST_STATE_VOID_PENDING; Got message #62 from element "rtpmp4vdepay0" (state-changed): GstMessageStateChanged, old-state=(GstState)GST_STATE_READY, new-state=(GstState)GST_STATE_PAUSED, pending-state=(GstState)GST_STATE_VOID_PENDING; Got message #63 from element "rtpmp4vpay1" (state-changed): GstMessageStateChanged, old-state=(GstState)GST_STATE_READY, new-state=(GstState)GST_STATE_PAUSED, pending-state=(GstState)GST_STATE_VOID_PENDING; Got message #64 from element "rtpmp4vpay0" (state-changed): GstMessageStateChanged, old-state=(GstState)GST_STATE_READY, new-state=(GstState)GST_STATE_PAUSED, pending-state=(GstState)GST_STATE_VOID_PENDING; Got message #65 from element "avenc_mpeg4-1" (state-changed): GstMessageStateChanged, old-state=(GstState)GST_STATE_READY, new-state=(GstState)GST_STATE_PAUSED, pending-state=(GstState)GST_STATE_VOID_PENDING; Got message #66 from element "avenc_mpeg4-0" (state-changed): GstMessageStateChanged, old-state=(GstState)GST_STATE_READY, new-state=(GstState)GST_STATE_PAUSED, pending-state=(GstState)GST_STATE_VOID_PENDING; Got message #68 from pad "videotestsrc1:src" (stream-status): GstMessageStreamStatus, type=(GstStreamStatusType)GST_STREAM_STATUS_TYPE_CREATE, owner=(GstElement)"\(GstVideoTestSrc\)\ videotestsrc1", object=(GstTask)"\(GstTask\)\ videotestsrc1:src"; Got message #69 from element "videotestsrc1" (state-changed): GstMessageStateChanged, old-state=(GstState)GST_STATE_READY, new-state=(GstState)GST_STATE_PAUSED, pending-state=(GstState)GST_STATE_VOID_PENDING; Got message #71 from pad "videotestsrc1:src" (stream-status): GstMessageStreamStatus, type=(GstStreamStatusType)GST_STREAM_STATUS_TYPE_ENTER, owner=(GstElement)"\(GstVideoTestSrc\)\ videotestsrc1", object=(GstTask)"\(GstTask\)\ videotestsrc1:src"; Got message #72 from pad "videotestsrc0:src" (stream-status): GstMessageStreamStatus, type=(GstStreamStatusType)GST_STREAM_STATUS_TYPE_CREATE, owner=(GstElement)"\(GstVideoTestSrc\)\ videotestsrc0", object=(GstTask)"\(GstTask\)\ videotestsrc0:src"; Got message #74 from element "videotestsrc0" (state-changed): GstMessageStateChanged, old-state=(GstState)GST_STATE_READY, new-state=(GstState)GST_STATE_PAUSED, pending-state=(GstState)GST_STATE_VOID_PENDING; Got message #76 from pad "videotestsrc0:src" (stream-status): GstMessageStreamStatus, type=(GstStreamStatusType)GST_STREAM_STATUS_TYPE_ENTER, owner=(GstElement)"\(GstVideoTestSrc\)\ videotestsrc0", object=(GstTask)"\(GstTask\)\ videotestsrc0:src"; /GstPipeline:pipeline0/avenc_mpeg4:avenc_mpeg4-0.GstPad:src: caps = video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, width=(int)320, height=(int)240, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1 /GstPipeline:pipeline0/GstRtpMP4VPay:rtpmp4vpay0.GstPad:sink: caps = video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, width=(int)320, height=(int)240, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1 /GstPipeline:pipeline0/avenc_mpeg4:avenc_mpeg4-0.GstPad:src: caps = video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, width=(int)320, height=(int)240, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1 /GstPipeline:pipeline0/GstRtpMP4VPay:rtpmp4vpay0.GstPad:sink: caps = video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, width=(int)320, height=(int)240, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1 /GstPipeline:pipeline0/avenc_mpeg4:avenc_mpeg4-1.GstPad:src: caps = video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, width=(int)320, height=(int)240, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1 /GstPipeline:pipeline0/avenc_mpeg4:avenc_mpeg4-1.GstPad:src: caps = video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, width=(int)320, height=(int)240, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1 /GstPipeline:pipeline0/GstRtpMP4VDepay:rtpmp4vdepay0.GstPad:src: caps = video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, codec_data=(buffer)000001b001000001b58913000001000000012000c48d8800f50a041e1463000001b24c61766335332e33352e30 /GstPipeline:pipeline0/GstRtpMP4VDepay:rtpmp4vdepay0.GstPad:src: caps = video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, codec_data=(buffer)000001b001000001b58913000001000000012000c48d8800f50a041e1463000001b24c61766335332e33352e30 /GstPipeline:pipeline0/GstRtpMP4VDepay:rtpmp4vdepay0.GstPad:src: caps = video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, codec_data=(buffer)000001b001000001b58913000001000000012000c48d8800f50a041e1463000001b24c61766335332e33352e30 /GstPipeline:pipeline0/avdec_mpeg4:avdec_mpeg4-0.GstPad:sink: caps = video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, codec_data=(buffer)000001b001000001b58913000001000000012000c48d8800f50a041e1463000001b24c61766335332e33352e30 /GstPipeline:pipeline0/avdec_mpeg4:avdec_mpeg4-0.GstPad:sink: caps = video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, codec_data=(buffer)000001b001000001b58913000001000000012000c48d8800f50a041e1463000001b24c61766335332e33352e30 /GstPipeline:pipeline0/avdec_mpeg4:avdec_mpeg4-0.GstPad:sink: caps = video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, codec_data=(buffer)000001b001000001b58913000001000000012000c48d8800f50a041e1463000001b24c61766335332e33352e30 /GstPipeline:pipeline0/avdec_mpeg4:avdec_mpeg4-1.GstPad:sink: caps = video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, codec_data=(buffer)000001b001000001b58913000001000000012000c48d8800f50a041e1463000001b24c61766335332e33352e30 /GstPipeline:pipeline0/avdec_mpeg4:avdec_mpeg4-1.GstPad:sink: caps = video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, codec_data=(buffer)000001b001000001b58913000001000000012000c48d8800f50a041e1463000001b24c61766335332e33352e30 /GstPipeline:pipeline0/GstRtpMP4VDepay:rtpmp4vdepay1.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP4V-ES, profile-level-id=(string)1, config=(string)000001b001000001b58913000001000000012000c48d8800f50a041e1463000001b24c61766335332e33352e30, payload=(int)96, ssrc=(uint)2015097695, timestamp-offset=(uint)2268832634, seqnum-offset=(uint)32989 /GstPipeline:pipeline0/GstRtpMP4VPay:rtpmp4vpay0: timestamp = 2640617858 /GstPipeline:pipeline0/GstRtpMP4VPay:rtpmp4vpay0: seqnum = 33743 /GstPipeline:pipeline0/GstRtpMP4VPay:rtpmp4vpay1: timestamp = 2268832634 /GstPipeline:pipeline0/GstRtpMP4VPay:rtpmp4vpay1: seqnum = 32989 /GstPipeline:pipeline0/avdec_mpeg4:avdec_mpeg4-0.GstPad:src: caps = video/x-raw, format=(string)I420, width=(int)320, height=(int)240, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)0/1 /GstPipeline:pipeline0/avdec_mpeg4:avdec_mpeg4-1.GstPad:src: caps = video/x-raw, format=(string)I420, width=(int)320, height=(int)240, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)0/1 /GstPipeline:pipeline0/avdec_mpeg4:avdec_mpeg4-1.GstPad:src: caps = video/x-raw, format=(string)I420, width=(int)320, height=(int)240, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)0/1 /GstPipeline:pipeline0/GstVideoMixer2:mix.GstVideoMixer2Pad:sink_0: caps = video/x-raw, format=(string)I420, width=(int)320, height=(int)240, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)0/1 /GstPipeline:pipeline0/avdec_mpeg4:avdec_mpeg4-0.GstPad:src: caps = video/x-raw, format=(string)I420, width=(int)320, height=(int)240, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)0/1 /GstPipeline:pipeline0/GstVideoMixer2:mix.GstVideoMixer2Pad:sink_1: caps = video/x-raw, format=(string)I420, width=(int)320, height=(int)240, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)0/1 /GstPipeline:pipeline0/avdec_mpeg4:avdec_mpeg4-1.GstPad:src: caps = video/x-raw, format=(string)I420, width=(int)320, height=(int)240, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)0/1 /GstPipeline:pipeline0/GstVideoMixer2:mix.GstVideoMixer2Pad:sink_0: caps = video/x-raw, format=(string)I420, width=(int)320, height=(int)240, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)0/1 (gst-launch-1.0:4387): GStreamer-CRITICAL **: guint64 _gst_util_uint64_scale_int(guint64, gint, gint, gint): assertion `denom > 0' failed (gst-launch-1.0:4387): GStreamer-CRITICAL **: guint64 _gst_util_uint64_scale_int(guint64, gint, gint, gint): assertion `denom > 0' failed (gst-launch-1.0:4387): GStreamer-CRITICAL **: guint64 _gst_util_uint64_scale_int(guint64, gint, gint, gint): assertion `denom > 0' failed (gst-launch-1.0:4387): GStreamer-CRITICAL **: guint64 _gst_util_uint64_scale_int(guint64, gint, gint, gint): assertion `denom > 0' failed (gst-launch-1.0:4387): GStreamer-CRITICAL **: guint64 _gst_util_uint64_scale(guint64, guint64, guint64, guint64): assertion `denom != 0' failed (gst-launch-1.0:4387): GStreamer-CRITICAL **: guint64 _gst_util_uint64_scale(guint64, guint64, guint64, guint64): assertion `denom != 0' failed Caught SIGSEGV accessing address 0x0
+ Trace 232199
I'm using gstreamer installed via homebrew on Mac OSX 10.8.4. $ gst-launch-1.0 --version gst-launch-1.0 version 1.0.7 GStreamer 1.0.7
Real backtrace with git master Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7ffff3123700 (LWP 15048)] 0x0000000000000000 in ?? () (gdb) thread apply all bt
+ Trace 232207
Thread 1 (Thread 0x7ffff7ebd700 (LWP 15011))
Backtrace of the first warning ** (gst-launch-1.0:15155): CRITICAL **: gst_video_decoder_negotiate_default: assertion `GST_VIDEO_INFO_WIDTH (&state->info) != 0' failed Program received signal SIGTRAP, Trace/breakpoint trap. [Switching to Thread 0x7ffff3123700 (LWP 15190)] g_logv (log_domain=0x0, log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7ffff3121318) at /tmp/buildd/glib2.0-2.36.3/./glib/gmessages.c:981 981 /tmp/buildd/glib2.0-2.36.3/./glib/gmessages.c: No such file or directory. (gdb) thread apply all bt [New Thread 0x7fffdaffd700 (LWP 15198)]
+ Trace 232208
Thread 12 (Thread 0x7fffdaffd700 (LWP 15198))
Thread 4 (Thread 0x7ffff3123700 (LWP 15190))
Thread 3 (Thread 0x7ffff3924700 (LWP 15189))
One problem here is that avdec_mpeg4 needs to have mpeg4videoparse in front of it. If you use decodebin that will automatically happen, but it should probably be enforced via the caps of avdec.
With the parsers added and this commit it doesn't crash or give warnings anymore at least commit 9e9d2ce0989e238b2fbc2893104453dc2bb76228 Author: Sebastian Dröge <slomo@circular-chaos.org> Date: Tue Jul 9 11:53:07 2013 +0200 videomixer: Fix negotiation with 0/1 framerates https://bugzilla.gnome.org/show_bug.cgi?id=703743 Still only shows the first frame ever.
commit 3d0988f46fea15bcd5352c281b0461a45183469e Author: Sebastian Dröge <slomo@circular-chaos.org> Date: Tue Jul 9 12:42:17 2013 +0200 videomixer: Fix handling of buffers without a duration We'll have to pop buffer from collectpads and store it internally only to get the timestamp of the next buffer. If we continue to keep it in collectpads, no new buffer to calculate the end time will ever arrive. https://bugzilla.gnome.org/show_bug.cgi?id=703743