Opened 13 years ago

Last modified 12 years ago

#270 new defect

Wrong samplingrate while watching certian AVI files.

Reported by: spikeygg@… Owned by: reimar
Priority: normal Component: demuxer
Version: HEAD Severity: minor
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: Analyzed by developer:

Description

I have a bunch of shows stored in AVI files, most of them play correctly but a
few of them have audio problems playing in MPlayer. The problem files have a
short audio glitch at the start when played in MPlayer. MPlayer recognizes the
audio in the broken files as 32000Hz while it should be 48000Hz.

I've been able to use media player in windows to play them without issue, also

aviplay works well (and neither of them have a glitch at the start). I used
avifix to attempt to fix it but it looks like avifix just rewrites the header
information (which appeared to already be correct).

My question is, does mplayer ignore the header information in the AVI files?

If it doesn't what could be wrong? It seems like MPlayer attempts to determine
the samplingrate but doesn't do it correctly. I've been able to use transcode
to hack off the very start of the file (where it's broken) and that seems to
work. Any ideas?

Thanks,
-Greg
Just updated CVS tonight
I love MPlayer, it's excellent!

Attachments (1)

Small_Futurama_File.avi (1000.0 KB) - added by spikeygg@… 13 years ago.
First 1MB of one of the AVI files that doesn't play correctly.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 13 years ago by spikeygg@…

I thought of another question right after hitting the commit button. :( I've
scoured through the docs and man page and haven't found a switch for forcing a
specific audio sampling rate, is it possible?

comment:2 Changed 13 years ago by dominik@…

Please upload a sample to ftp: mplayerhq.hu/MPlayer/incoming with a text file
pointing to this bug report.

Changed 13 years ago by spikeygg@…

First 1MB of one of the AVI files that doesn't play correctly.

comment:3 Changed 13 years ago by spikeygg@…

This is the begining of one of the AVI files that doesn't play correctly.
There are two streams embedded.

"mplayer Small_Futurama_File.avi -aid 1"

Will play the 1st stream which gets detected as 32000Hz

"mplayer Small_Futurama_File.avi -aid 2"

Will play what the 1st stream should sound like (at 48000Hz)

Anywho, thanks for taking a look at it,
-Greg

comment:4 Changed 13 years ago by reimar

(In reply to comment #0)

My question is, does mplayer ignore the header information in the AVI files?

Yes. Actually it overwrites it with the value in the MP3 header (so the problem
is actually a broken file) in the decoder (see the ad_*.c files).
Maybe this should be changed, but it would be far nicer if the decoder would
find out the right value from the mp3 data, but I see no way for doing that
without making it a hack.
Btw. using -dumpaudio and -audiofile is a hackish way of playing it for the
moment *g*

comment:5 Changed 12 years ago by diego@…

  • Component changed from ao to demuxer
  • Owner changed from alex@… to Reimar.Doeffinger@…

This problem persists in current CVS. Using the libavformat demuxer fixes the
problem, the FFmpeg MP3 decoder also does not suffer from the wrongly detected
samplerate, but it also has a pop at the beginning when combined with the native
demuxer.

Note: See TracTickets for help on using tickets.