GNOME Bugzilla – Bug 326372
Indeo AVI files do not play with 0.10
Last modified: 2006-01-12 07:36:16 UTC
Please describe the problem: In the latest versions of 0.8 series, GStreamer became able to play AVI files whose video was coded with Indeo 3. In 0.10, this is not possible anymore, as no video is shown. Steps to reproduce: 1. Launch gst-launch-0.10 with a pipeline consisting of an AVI file with Indeo 3 video as file source, the FFmpeg INDEO 3 decoder, and a video sink Actual results: No video appears. If the debug level is high enough, for each frame the message "Dropping non-keyframe (seek/init)" appears Expected results: The video window should show the AVI file Does this happen every time? Yes Other information: Apparently, gst-ffmpeg assumes that every decoded frame is marked as I, P or B, but FFmpeg does not always do that. Since FFmpeg works, gst-ffmpeg should drop that assumption.
Hi, it is definitely a problem with ffmpeg unfortunately :( After having a look through most of the avcodec plugins, some set the AVFrame->type and some set the AVFrame->reference, so as a temporary solution, I modified the keyframe detection in gstffmpegdec which made it work (for example) for indeo files. The following modification is in current gst-ffmpeg cvs and therefore should be available in the next gst-ffmpeg release: 2005-12-19 Edward Hervey <edward@fluendo.com> * ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps): Update ffmpeg_codec_id <=> mimetype conversions * ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_frame): Finer grained keyframe detection 2005-12-07 Edward Hervey <edward@fluendo.com> * ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_frame): So, stupid ffmpeg.... Not all [en|de]coders set AVFrame->type. This should handle the case where AVFrame->reference is set to 1 (which is the equivalent of a keyframe). Also fixes #323286. I tried a truckload of other files with this modification and it didn't seem to break playback.
Created attachment 57116 [details] [review] Workaround patch for Indeo 3 videos
Sorry, Edward, but, despite your quick analysis, I have to re-open the bug. The Indeo 3 file I tried does not work with latest CVS gst-ffmpeg either. With debug level 4, for each frame this message comes: DEBUG (0x9c05520 - 0:00:04.213181000) ffmpeg( 3216) gstffmpegdec.c(826):gst_ffmpegdec_frame:<ffdec_indeo30> Decoded video: len=2171, have_data=192, is_keyframe:0, is_itype:0, is_reference:0 WARN (0x9c05520 - 0:00:04.213217000) ffmpeg( 3216) gstffmpegdec.c(832):gst_ffmpegdec_frame:<ffdec_indeo30> Dropping non-keyframe (seek/init) Most probably your fix works with Indeo 2 files, because FFmpeg's Indeo 2 decoder sets reference=1, but FFmpeg's Indeo 3 decoder explicitly sets reference=0! And it does not set pict_type either. And my patch to FFmpeg was refused. I am attaching a one-line patch which solves the problem for me. Tell me what you think
according to the ffmpeg-devel mailing-list thread they're not refusing it, they just want more details. I think it's time to mail the ffmpeg mailing-list explaining the reason why we need properly set AVPicture->type
patch applied. I'll close the bug for good now, but I still have to convince ffmpeg developers to properly set image properties... 2006-01-11 Edward Hervey <edward@fluendo.com> * ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_frame): Add exception for Indeo3 keyframe detection until upstream ffmpeg behaves properly.
Great! I'll lobby for a modification to ffmpeg