[MPlayer-users] Strange timecode behavior with FLAC files
Ilja Sekler
ilja_sekler_ at gmx.de
Thu Nov 25 21:44:33 CET 2010
On 25.11.2010 20:07, Uoti Urpala wrote:
> On Thu, 2010-11-25 at 19:43 +0100, Ilja Sekler wrote:
>
>> On 25.11.2010 00:21, Uoti Urpala wrote:
>>
>>> 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, [...] 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:
>
> There's a recent version available.
Oops, my bad. The patches from
<http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2010-November/100973.html>
seem to be the most recent ones and apply cleanly. Unfortunately,
MPlayer exits with these patches one or two seconds later, having filled
the console with messages like
Starting playback...
A: 2.5 (02.4) of 527.0 (08:47.0) 0.3%
[flac @ 0x8a182a0]invalid coding type
[flac @ 0x8a182a0]decode_frame() failed
[flac @ 0x8a182a0]invalid sync code
[flac @ 0x8a182a0]decode_frame() failed
A: 0.5 (00.4) of 527.0 (08:47.0) 0.3%
[flac @ 0x8a182a0]invalid sync code
[flac @ 0x8a182a0]decode_frame() failed
A: 1.3 (01.2) of 527.0 (08:47.0) 0.3%
[flac @ 0x8a182a0]invalid sync code
[flac @ 0x8a182a0]decode_frame() failed
A: 2.1 (02.1) of 527.0 (08:47.0) 0.3%
[flac @ 0x8a182a0]invalid sync code
[flac @ 0x8a182a0]decode_frame() failed
A: 2.9 (02.9) of 527.0 (08:47.0) 0.3%
[flac @ 0x8a182a0]invalid sync code
[flac @ 0x8a182a0]decode_frame() failed
A: 3.8 (03.7) of 527.0 (08:47.0) 0.3%
[flac @ 0x8a182a0]invalid sync code
[flac @ 0x8a182a0]decode_frame() failed
A: 4.6 (04.5) of 527.0 (08:47.0) 0.3%
[flac @ 0x8a182a0]invalid sync code
[flac @ 0x8a182a0]decode_frame() failed
and so on. The timecode in the output increments till the end of the
file is reached.
> Note that if you play raw FLAC files then you probably need to
> specify -demuxer lavf.
All my FLAC files are created by the 'flac' command line utility version
1.2.1 - are they raw?
file track01.flac
track01.flac: FLAC audio bitstream data, 16 bit, stereo, 44.1 kHz,
23255400 samples
-demuxer lavf behaves indeed differently. A patched MPlayer plays then
the file normally (even seeking works), but stderr gets overflown with
messages
[NULL @ 0x8a182a0]sample/frame number mismatch in adjacent frames
[NULL @ 0x8a182a0]sample/frame number mismatch in adjacent frames
A: 4.9 (04.8) of 527.3 (08:47.3) 0.4%
[NULL @ 0x8a182a0]sample/frame number mismatch in adjacent frames
[NULL @ 0x8a182a0]sample/frame number mismatch in adjacent frames
[NULL @ 0x8a182a0]sample/frame number mismatch in adjacent frames
[NULL @ 0x8a182a0]sample/frame number mismatch in adjacent frames
--
Regards
Ilja
More information about the MPlayer-users
mailing list