[MPlayer-dev-eng] MPlayer MPEG4 Seeking Bug (and patch)

Andyz Smith andyzsmith at yahoo.com
Sun Apr 3 22:19:20 CEST 2011


--- On Tue, 3/29/11, Reimar Döffinger <Reimar.Doeffinger at gmx.de> wrote:

> 
> I don't want to discourage anyone (since what I am going to
> say next probably
> won't be done that soon), but there is a better/more
> thorough solution:
> Patch the FFmpeg decoder to indicate various errors, in
> particular
> the "missing reference frame".
> Use that flag to discard all continuous frames that have
> this flag set
> after seeking/at start of decoding (preferably should be
> optional).
> An performance improvement of that would be to set a flag
> that tells
> FFmpeg to not even try error concealment in such a case and
> just not
> return a frame in that case. Has a higher risk of A-V sync
> issues though.
> As a short-term solution, using -demuxer lavf should work,
> too.


I have attached my changes to MPlayer in diff -u format.  This is my first time working with MPlayer so please be careful applying this patch.

I tried using the lavf demuxer with both MPlayer and VLC and the playback is HORRIBLY slow.  No idea what the problem is.  I have actually patched FFMPEG demuxer to seek properly as well, but that patch is really brute force to find the keyframes.  Note lavf demuxer was always very slow without any of my patches...so.... 

So, at least for now, the patch to the internal MPlayer demuxer is working well.  This should provide some guidance for future FFMPEG upgrades.

Do note, however, the issue with MPlayer's internal demuxer is not the same as the issue with FFMPEG demuxer. FFMPEG seems to correctly identify IDR frames but there is something quite broken about it's indexing and searching for the nearest keyframe.  In contrast MPlayer's internal demuxer is quite simplistic and linear in its search, but fails to properly identify MPEG4 IDR frames.

Good luck everybody.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: MPEG4SeekingDiff.txt
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20110403/fb53b0a3/attachment.txt>


More information about the MPlayer-dev-eng mailing list