GNOME Bugzilla – Bug 600895
ffenc_dvvideo : doesn't list resolution/details it supports
Last modified: 2012-12-17 10:12:06 UTC
Created attachment 147051 [details] Short video that exhibits the problem execute: gst-launch filesrc location=SDV_0104.MP4 ! decodebin ! ffmpegcolorspace ! ffenc_dvvideo ! qtmux ! filesink location=out.mov results in Setting pipeline to PLAYING ... (gst-launch-0.10:8318): GStreamer-CRITICAL **: gst_mini_object_unref: assertion `mini_object != NULL' failed New clock: GstSystemClock (gst-launch-0.10:8318): GStreamer-CRITICAL **: _gst_util_uint64_scale: assertion `denom != 0' failed ERROR: from element /GstPipeline:pipeline0/GstQTMux:qtmux0: Internal GStreamer error: negotiation problem. Please file a bug at http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer. Additional debug info: gstqtmux.c(1360): gst_qt_mux_add_buffer (): /GstPipeline:pipeline0/GstQTMux:qtmux0: format wasn't negotiated before buffer flow on pad pad0 I expect the file out.mov to be created. Omitting the ffenc_dvvideo results in file being generated as expected.
I fixed this in the qtmux side. But on ffmpeg encoder's we have: if (ret_size < 0) { #ifndef GST_DISABLE_GST_DEBUG GstFFMpegEncClass *oclass = (GstFFMpegEncClass *) (G_OBJECT_GET_CLASS (ffmpegenc)); GST_ERROR_OBJECT (ffmpegenc, "ffenc_%s: failed to encode buffer", oclass->in_plugin->name); #endif /* GST_DISABLE_GST_DEBUG */ gst_buffer_unref (inbuf); return GST_FLOW_OK; } Which doesn't look good to me.
Module: gst-plugins-bad Branch: master Commit: fb9d7630e12c62218c6b4fbc3e143fd3153187f0 URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=fb9d7630e12c62218c6b4fbc3e143fd3153187f0 Author: Thiago Santos <thiago.sousa.santos@collabora.co.uk> Date: Fri Nov 6 00:46:12 2009 -0300 qtmux: Adding some ifs for protection Adding somes ifs to protect against warning conditions that might happen when upstream element is not sane Fixes #600895
Maybe that ffmpeg code is meant to be like that for trying again with the next buffer. Should we close this?
It's failing to encode because the DV encoder will only accept very specific specs. In this case, for example, it's not in the correct pixel format (Y41B for 720x480) This pipeline makes it render fine : gst-launch -v filesrc location=SDV_0104.MP4 ! decodebin ! ffmpegcolorspace ! "video/x-raw-yuv,format=(fourcc)Y41B" ! ffenc_dvvideo ! qtmux ! filesink location=out.mov This bug is very similar to the equivalent ones for ffenc_dnxhd (#574725) and ffenc_h264 (578160)
Thanks for the pointers and the help. Is the expected behavior that without the capsfilter, the graph won't run, or that the filters will negotiate the caps automatically.
The expected behaviour is that the sink caps on ffenc_dvvideo should only list the caps that the actual underlying ffmpeg encoder can handle, and therefore you shouldn't need to use that capsfilter (but you would need the ffmpegcolorspace element to convert to Y411B).
That is what I would expect. Thank you for your help!
The info is mostly there now: $ gst-inspect-1.0 avenc_dvvideo ... video/x-raw width: 720 height: 480 framerate: 30000/1001 pixel-aspect-ratio: 10/11 format: { Y41B, Y42B, I420 } video/x-raw width: 720 height: 480 framerate: 30000/1001 pixel-aspect-ratio: 40/33 format: { Y41B, Y42B, I420 } video/x-raw width: 720 height: 576 framerate: 25/1 pixel-aspect-ratio: 59/54 format: { Y41B, Y42B, I420 } video/x-raw width: 720 height: 576 framerate: 25/1 pixel-aspect-ratio: 118/81 format: { Y41B, Y42B, I420 } video/x-raw width: 720 height: 576 framerate: 25/1 pixel-aspect-ratio: 59/54 format: { Y41B, Y42B, I420 } video/x-raw width: 720 height: 576 framerate: 25/1 pixel-aspect-ratio: 118/81 format: { Y41B, Y42B, I420 } but sadly it's not entirely right. Using an updated version of the initial pipeline: $ gst-launch-1.0 filesrc location= /home/tpm/samples/misc/600895-SDV_0104.mp4 ! decodebin ! videoconvert ! videoscale ! videorate ! avenc_dvvideo ! qtmux ! filesink location=out.mov ERROR libav: Found no DV profile for 720x480 yuv420p video. Valid DV profiles are: ERROR libav: Frame size: 720x480; pixel format: yuv411p, framerate: 30000/1001 ERROR libav: Frame size: 720x480; pixel format: yuv422p, framerate: 30000/1001 ERROR libav: Frame size: 720x576; pixel format: yuv420p, framerate: 25/1 ERROR libav: Frame size: 720x576; pixel format: yuv411p, framerate: 25/1 ERROR libav: Frame size: 720x576; pixel format: yuv422p, framerate: 25/1 ERROR libav: Frame size: 720x576; pixel format: yuv420p, framerate: 25/1 ERROR libav: Frame size: 960x720; pixel format: yuv422p, framerate: 60000/1001 ERROR libav: Frame size: 960x720; pixel format: yuv422p, framerate: 50/1 ERROR libav: Frame size: 1280x1080; pixel format: yuv422p, framerate: 30000/1001 ERROR libav: Frame size: 1440x1080; pixel format: yuv422p, framerate: 25/1 ERROR: from element /GstPipeline:pipeline0/avenc_dvvideo:avenc_dvvideo0: GStreamer error: negotiation problem. Additional debug info: gstvideoencoder.c(1353): gst_video_encoder_chain (): /GstPipeline:pipeline0/avenc_dvvideo:avenc_dvvideo0: encoder not initialized The info in AVCodec just doesn't seem to be able to express this :-/
I added all these restrictions manually now. commit a6ede95de766d23375af312a6f96cb66b13ded51 Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Mon Dec 17 11:11:12 2012 +0100 avcodecmap: Add more and correct restrictions for DV https://bugzilla.gnome.org/show_bug.cgi?id=600895