[MPlayer-users] How to correct samplerate of mp3 stream in avi?
rgselk
rgselknospam at yahoo.com
Wed Oct 29 19:14:47 CET 2003
Now without buggy yahoo spell check :-(
Okay, some more information...
The file is indeed screwed up big time.
The first 8 to 10 seconds are 32kHz (intro).
Afterward it switches to 48kHz :-(((
I found out how to change the mp3 header but it is not possible to find
a setting which uses the same bit per frame at 48kHz at layer III.
Also the audio decoder is not able to switch after initialization.
Maybe something for G2?
Regards,
rgselk.
BTW: the file is DBZ-084 from AHQ. size 208388096.
--- rgselk <rgselknospam at yahoo.com> wrote:
> --- D Richard Felker III <dalias at aerifal.cx> wrote:
> > On Tue, Oct 07, 2003 at 06:13:10AM -0700, rgselk wrote:
> > > I have an avi file with a mp3 stream which is claiming to have a
> > > samplerate of 32kHz. However this should be 48kHz. The two bits
> in
> > the
> > > header indicating the frequency (bit 10,11) now read '10' and
> > should
> > > read '01'.
> > > Is there a tool to modify this direct? Or else how do I know the
> > offset
> > > of this header, so I can write a small perl script to do the
> > > manipulation.
> >
> > Are you sure this is the problem? The samplerate is also stored in
> > the
> > avi header, so IMO it's much more likely that it's correct in the
> > actual mp3 stream and wrong in the avi header. Try dumping the mp3
> > stream with -dumpaudio and check that it plays correctly. Dumping
> > also
> > has the effect that you can write down the first few bytes of the
> mp3
> > stream, then search for them with a hex editor in the avi file, in
> > case you do end up needing to edit the mp3 stream.
> >
> > On the other hand, if it's the avi header you need to edit, just
> > search with a hex editor for the first occurrance of 32000 (little
> > endian) in the avi file and change it to 48000.
>
> In the attached (edited) log I see a 'Samplerate: 48000' in the
> STREAM
> header / WAVE Format. mp3lib/sr1.c prints '32000 Hz'.
> I tried mplayer -dumpaudio, but that did not result in a mp3 file at
> all. The first 996 bytes of the resulting stream.dump are zero. :-(
>
> It seems the avi header is correct in this case and not the mp3
> header...
__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/
More information about the MPlayer-users
mailing list