[MPlayer-users] wrong length and bitrate with FLAC

Ilja Sekler ilja_sekler_ at gmx.de
Thu Nov 22 23:54:46 CET 2012


Am 22.11.2012 22:56, schrieb Reimar Döffinger:

> On Wed, Nov 21, 2012 at 09:35:14PM +0100, Ilja Sekler wrote:
> 
>> Am 16.11.2012 20:35, schrieb wbrana:
>> 
>> > MPlayer 1.1 returns correct values
>> > 
>> > ID_AUDIO_BITRATE=1018008
>> > ID_LENGTH=277.00
>> > 
>> > but revision 35421 returns wrong values
>> > 
>> > ID_AUDIO_BITRATE=8
>> > ID_LENGTH=35330017.00
>> 
>> 
>> Already r35368 got the bitrate and thus the length of FLAC files wrong.
>> The bug is still there in MPlayer as of r35437, a fix would be highly
>> appreciated.
>> 
>> The current ffmpeg (N-44472-gb93c933) is not affected.
> 
> Please provide sample file and example command-line and output.
> I cannot reproduce the issue with e.g.
> http://samples.mplayerhq.hu/A-codecs/lossless/luckynight.flac

This sample is just too short. Make it at least 4x as long (just open it
in Audacity, copy the content, paste it at the end of the original
sample three times and export the whole as FLAC) and you will be able to
reproduce the bug. Otherwise I'll upload the file (26MB). I just didn't
have anything shorter then 5 minutes to test with, so I hit the bug
immediately.


##########################################################################


./mplayer -identify -frames 0  ../../samples/luckynight_x4.flac
MPlayer SVN-r35447-4.7.2 (C) 2000-2012 MPlayer Team

Playing ../../samples/luckynight_x4.flac.
libavformat version 54.37.100 (internal)
ID_AUDIO_ID=0
Audio only file format detected.
Load subtitles in ../../samples/
ID_FILENAME=../../samples/luckynight_x4.flac
ID_DEMUXER=audio
ID_AUDIO_FORMAT=fLaC
ID_AUDIO_BITRATE=8
ID_AUDIO_RATE=0
ID_AUDIO_NCH=0
ID_START_TIME=0.00
ID_LENGTH=26546849.00
ID_SEEKABLE=1
ID_CHAPTERS=0
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
libavcodec version 54.76.100 (internal)
AUDIO: 44100 Hz, 2 ch, s16le, 0.0 kbit/0.00% (ratio: 1->176400)
ID_AUDIO_BITRATE=8
ID_AUDIO_RATE=44100
ID_AUDIO_NCH=2
Selected audio codec: [ffflac] afm: ffmpeg (FFmpeg FLAC audio)
==========================================================================
AO: [pulse] 44100Hz 2ch s16le (2 bytes per sample)
ID_AUDIO_CODEC=ffflac
Video: no video
Starting playback...


Exiting... (End of file)
ID_EXIT=EOF

##########################################################################

./mplayer -v ../../samples/luckynight_x4.flac
MPlayer SVN-r35447-4.7.2 (C) 2000-2012 MPlayer Team
CPU vendor name: AuthenticAMD  max cpuid level: 5
CPU: AMD Athlon(tm) II X2 260 Processor (Family: 16, Model: 6, Stepping: 3)
extended cpuid-level: 27
extended cache-info: 67141952
Detected cache-line size is 64 bytes
CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNowExt: 1 SSE: 1 SSE2: 1 SSE3: 1
SSSE3: 0 SSE4: 0 SSE4.2: 0 AVX: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowExt SSE SSE2
SSE3 CMOV
get_path('codecs.conf') -> '/home/ilja/.mplayer/codecs.conf'
Reading optional codecs config file /home/ilja/.mplayer/codecs.conf: No
such file or directory
Reading optional codecs config file /usr/local/etc/mplayer/codecs.conf:
No such file or directory
Using built-in default codecs.conf.
init_freetype
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
get_path('fonts') -> '/home/ilja/.mplayer/fonts'
Configuration: --disable-vidix --disable-lirc --language=en,de
CommandLine: '-v' '../../samples/luckynight_x4.flac'
Using nanosleep() timing
get_path('input.conf') -> '/home/ilja/.mplayer/input.conf'
Parsing input config file /home/ilja/.mplayer/input.conf
Input config file /home/ilja/.mplayer/input.conf parsed: 1 binds
get_path('luckynight_x4.flac.conf') ->
'/home/ilja/.mplayer/luckynight_x4.flac.conf'

Playing ../../samples/luckynight_x4.flac.
get_path('sub/') -> '/home/ilja/.mplayer/sub/'
[file] File size is 26546849 bytes
STREAM: [file] ../../samples/luckynight_x4.flac
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
libavformat version 54.37.100 (internal)
Configuration: --enable-gpl --enable-postproc
LAVF_check: raw FLAC
Checking for YUV4MPEG2
ASF_check: not ASF guid!
Checking for REAL
Checking for SMJPEG
Searching demuxer type for filename ../../samples/luckynight_x4.flac
ext: .flac
Trying demuxer 17 based on filename extension
==> Found audio stream: 0
demux_audio: seeking from 0x1A to start pos 0x0
demux_audio: audio data 0x0 - 0x19512A1
Audio only file format detected.
Load subtitles in ../../samples/
get_path('sub/') -> '/home/ilja/.mplayer/sub/'
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
dec_audio: Allocating 1536000 + 131072 = 1667072 bytes for output buffer.
FFmpeg's libavcodec audio codec
libavcodec version 54.76.100 (internal)
Configuration: --enable-gpl --enable-postproc
INFO: libavcodec "flac" init OK!
[NULL @ 0xf2a080]Junk frame till offset 211
AUDIO: 44100 Hz, 2 ch, s16le, 0.0 kbit/0.00% (ratio: 1->176400)
Selected audio codec: [ffflac] afm: ffmpeg (FFmpeg FLAC audio)
==========================================================================
Building audio filter chain for 44100Hz/2ch/s16le -> 0Hz/0ch/??...
[libaf] Adding filter dummy
[dummy] Was reinitialized: 44100Hz/2ch/s16le
[dummy] Was reinitialized: 44100Hz/2ch/s16le
Trying preferred audio driver 'pulse', options '[none]'
AO: [pulse] 44100Hz 2ch s16le (2 bytes per sample)
AO: Description: PulseAudio audio output
AO: Author: Lennart Poettering
Building audio filter chain for 44100Hz/2ch/s16le -> 44100Hz/2ch/s16le...
[dummy] Was reinitialized: 44100Hz/2ch/s16le
[dummy] Was reinitialized: 44100Hz/2ch/s16le
Video: no video
Freeing 0 unused video chunks.
Starting playback...
Increasing filtered audio buffer size from 0 to 46144
A: 240.2 (04:00.2) of 26546848.0 (7374:07:28.0)  0.6%
ds_fill_buffer: EOF reached (stream: audio)
A: 240.4 (04:00.4) of 26546848.0 (7374:07:28.0)  0.6%
ds_fill_buffer: EOF reached (stream: audio)
ds_fill_buffer: EOF reached (stream: audio)
A: 240.6 (04:00.5) of 26546848.0 (7374:07:28.0)  0.6%
ds_fill_buffer: EOF reached (stream: audio)
ds_fill_buffer: EOF reached (stream: audio)
A: 240.8 (04:00.8) of 26546848.0 (7374:07:28.0)  0.6%
ds_fill_buffer: EOF reached (stream: audio)
ds_fill_buffer: EOF reached (stream: audio)
A: 241.0 (04:01.0) of 26546848.0 (7374:07:28.0)  0.6%
ds_fill_buffer: EOF reached (stream: audio)
ds_fill_buffer: EOF reached (stream: audio)
A: 241.2 (04:01.2) of 26546848.0 (7374:07:28.0)  0.6%
ds_fill_buffer: EOF reached (stream: audio)
ds_fill_buffer: EOF reached (stream: audio)
A: 241.4 (04:01.4) of 26546848.0 (7374:07:28.0)  0.6%
ds_fill_buffer: EOF reached (stream: audio)
ds_fill_buffer: EOF reached (stream: audio)
ds_fill_buffer: EOF reached (stream: audio)
A: 241.6 (04:01.5) of 26546848.0 (7374:07:28.0)  0.6%
ds_fill_buffer: EOF reached (stream: audio)
A: 241.6 (04:01.5) of 26546848.0 (7374:07:28.0)  0.6%
EOF code: 1

Uninit audio filters...
[libaf] Removing filter dummy
Uninit audio: ffmpeg
vo: x11 uninit called but X11 not initialized..

Exiting... (End of file)


##########################################################################

As stated in
<http://lists.mplayerhq.hu/pipermail/mplayer-users/2012-November/085621.html>,
reverting the checkin from r35333 fixes the issue with long FLAC files.

Thanks,

-- 
Regards

Ilja


More information about the MPlayer-users mailing list