[MPlayer-users] Strange timecode behavior with FLAC files

Ilja Sekler ilja_sekler_ at gmx.de
Thu Nov 25 19:43:47 CET 2010


On 25.11.2010 00:21, Uoti Urpala wrote:

> On Wed, 2010-11-24 at 23:46 +0100, Ilja Sekler wrote:
> 
>> On 13.05.2010 11:01, Daniel Dawson wrote:
>> 
>>> I've noticed that MPlayer's idea of the current time in FLAC
>>> files is strange [...]:
>>> 
>>> * The timecode starts out stuck at some non-zero value and "flickers"
>>>   around very close to it. Once the playback gets to that time, the
>>>   timecode starts moving forward in almost a normal way. If I seek back
>>>   to the beginning, it does the same thing over again.
>> 
>> This issue sours the usage of MPlayer for FLAC since quite a long time
>> [...].
> 
> The biggest cause of problems is that the FFmpeg FLAC decoder
> behaves badly. It internally buffers packets in a way that makes it
> impossible to know what part of its output corresponds to which input
> packet (and thus to which timecode). I think this should get fixed
> after the FLAC parser patches are applied in FFmpeg. The parser
> itself isn't needed, but the patches remove the current badly done
> buffering implementation.

Thank you, assuming that you speak about the thread on ffmpeg-devel
starting with
<http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2010-July/093465.html>, I
applied parts of the patch from
<http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2010-July/093848.html>
which suffered minor bitrot to libavcodec/flac{.h,dec.c} - the resulting
mplayer binary displays correct timecode in FLAC files starting with
zero for max. 2.5 seconds and then crashes with following flac-related
messages:

//-------------------<snipped>-------------------//
Starting playback...
[flac @ 0x8a168e0]underread: 48840 orig size: 52811
[flac @ 0x8a168e0]underread: 44890 orig size: 48840
Increasing filtered audio buffer size from 0 to 46144
A:   0.0 (00.0) of 240.0 (04:00.0) ??,?%
[flac @ 0x8a168e0]underread: 40921 orig size: 44890
[flac @ 0x8a168e0]underread: 36939 orig size: 40921
[flac @ 0x8a168e0]underread: 32959 orig size: 36939
A:   0.0 (00.0) of 240.0 (04:00.0) ??,?%
[flac @ 0x8a168e0]underread: 28970 orig size: 32959
A:   0.2 (00.1) of 240.0 (04:00.0)  0.3%
[flac @ 0x8a168e0]underread: 24994 orig size: 28970
[flac @ 0x8a168e0]underread: 19723 orig size: 24994
A:   0.3 (00.3) of 240.0 (04:00.0)  0.4%
[flac @ 0x8a168e0]underread: 11943 orig size: 19723
[flac @ 0x8a168e0]underread: 4152 orig size: 11943
A:   0.5 (00.5) of 240.0 (04:00.0)  0.4%
[flac @ 0x8a168e0]overread: 3652
lavc_audio: error
A:   0.6 (00.6) of 240.0 (04:00.0)  0.5%
[flac @ 0x8a168e0]FRAME HEADER not here
[flac @ 0x8a168e0]underread: 54030 orig size: 61860
A:   0.4 (00.3) of 240.0 (04:00.0)  0.5%
[flac @ 0x8a168e0]underread: 45946 orig size: 54030
[flac @ 0x8a168e0]underread: 38113 orig size: 45946
A:   0.6 (00.5) of 240.0 (04:00.0)  0.5%
[flac @ 0x8a168e0]underread: 29987 orig size: 38113
[flac @ 0x8a168e0]underread: 21917 orig size: 29987
A:   0.8 (00.7) of 240.0 (04:00.0)  0.6%
[flac @ 0x8a168e0]underread: 14501 orig size: 21917
[flac @ 0x8a168e0]underread: 7565 orig size: 14501
[flac @ 0x8a168e0]underread: 491 orig size: 7565
A:   0.9 (00.9) of 240.0 (04:00.0)  0.6%


MPlayer interrupted by signal 11 in module: decode_audio
//-------------------<snipped>-------------------//

It would be great if somebody could find a working solution...

-- 
Regards

Ilja


More information about the MPlayer-users mailing list