[MPlayer-users] flac files not showing bitrates, throwing off timing in statusline etc.

SciFi sci-fi at hush.ai
Mon Jul 23 05:20:46 CEST 2007


More investigation, added a few clues to the debug MSGT_ things:

[...]
  DEMUXER: ==> Found audio stream: 0
 IDENTIFY: ID_AUDIO_ID=0
    DEMUX: [demux_audio] fLaC info found: size=32971840, srate=0, 
num_samples=44100, sh_audio->i_bps=14467152.  [ <== I added this to 
demux_audio.c under the 'if' on lines 513-514 but not part of that 
'if', then completely commented out the underneath 'if' that sets i_bps 
to 64*1000 ]
   STREAM: s->pos=1800  newpos=0  new_bufpos=4  buflen=0  
    DEMUX: demux_audio: seeking from 0x8 to start pos 0x1248
   STREAM: s->pos=800  newpos=1000  new_bufpos=1248  buflen=0  
    DEMUX: demux_audio: audio data 0x1248 - 0x1F72E88  
  DEMUXER: Audio file file format detected.
 IDENTIFY: [mplayer.c] ID_FILENAME=01 - Space Shuffle , Chaos.flac
 IDENTIFY: [mplayer.c] ID_DEMUXER=audio
 IDENTIFY: [mplayer.c] ID_AUDIO_FORMAT=fLaC
 IDENTIFY: [mplayer.c] ID_AUDIO_BITRATE=804056  [ <== this value is 
good already! ]
 IDENTIFY: [mplayer.c] ID_AUDIO_RATE=0
 IDENTIFY: [mplayer.c] ID_AUDIO_NCH=0
 IDENTIFY: [mplayer.c] ID_LENGTH=328.00
  CPLAYER: 
==========================================================================
 

DECAUDIO: Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
 DECAUDIO: dec_audio: Allocating 192000 + 65536 = 257536 bytes for 
output buffer.
 DECAUDIO: [ad_ffmpeg.c] FFmpeg's libavcodec audio codec
 DECAUDIO: [ad_ffmpeg.c] INFO: libavcodec init OK!
 DECAUDIO: [ad_ffmpeg.c:114] INFO: 
sh_audio->i_bps=lavc_context->bit_rate/8 = 8000
[ sprung!! 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
]
 DECAUDIO: AUDIO: 44100 Hz, 2 ch, s16le, 64.0 kbit/4.54% (ratio: 8000->176400)
 IDENTIFY: [dec_audio.c] ID_AUDIO_BITRATE=64000  [ ^^ <== wrong again 
already! ]
[dec_audio.c] ID_AUDIO_RATE=44100
[dec_audio.c] ID_AUDIO_NCH=2
 DECAUDIO: Selected audio codec: [ffflac] afm: ffmpeg (FFmpeg FLAC 
audio decoder)
  CPLAYER: 
==========================================================================
 

DECAUDIO: Building audio filter chain for 44100Hz/2ch/s16le -> 0Hz/0ch/??...
[...]

For some reason line 114 of ad_ffmpeg.c is getting a value of 8000
despite mplayer.c already having a decent value for sh_audio->i_bps.
(I had a trace for line 122 in ad_ffmpeg.c, too, which did not spring.)

Ok... now either I can chase down why lavc_context->bit_rate is
wrong, or we can wrap lines 114 & 122 with, say, an
  if(!sh_audio->i_bps)
or similar, to not change our good i_bps ATM?
But this could mess with other formats?

Thanks for helping with this...






More information about the MPlayer-users mailing list