[Mplayer-users] changing audio playback rate

Arpi arpi at thot.banki.hu
Fri Apr 20 07:28:34 CEST 2001


Hi,

> On Wednesday, April 18, 2001 at 03:48, Arpi wrote:
> > > > > Hi... I recently came across a DivX (DIV3) video with MPEG layer-3 audio
> > > > > that plays at an incorrect framerate... It is reported as 23.98 fps
> > > > > but should be played at 27-30 fps. I fixed this with -fps 30 but
> > > > > unfortunately this does not change the audio playback rate.
> > > > > Can this be changed as well? (Let me know if you need the .avi file)
> 
> > > > Isn't the problem is 44khz vs 48khz audio? (48khz in file, but soundcard is
> > > > limited to 44?)
> > > 
> > > Yeah, that's likely - it's a Creative SB64 Gold (ISA PnP)...
> > > Any way to fix that in software? I'm using linux OSS drivers right
> > > now... (no alsa)
> 
> > Not yet. We'll move to libxmm, it supports (or at least will support) 
> > downsampling.
> > Currently the only way is changing the card :)
> 
> I just checked with another 48000 Hz audio DivX, no problems with that one.
> So it seems related to these DivX files in particular... I did some manual
> timing (with a stopwatch) too see how many frames elapsed during a physical
> minute. I found it to be 22, instead of 24 as reported by the file!
> 
> physical      mplayer
> time          output
> 00:00:00   => A:   2.7  V:   2.7  A-V:  0.002  ct: -0.007   66  37%   5%  5.8% 
> 00:01:00   => A:  57.6  V:  57.6  A-V:  0.002  ct: -0.025  1381  29%   5%  5.0% 
Hmm, it's interesting. there is no A-V correction... so it means that audio
and video are in sync. but it differs from realtime, so your audio card runs
on different rate than it was initialized to.

what to do?
1. try with -noalsa option (it disables timer)
2. measure time with stopwatch using mplayer -nosound

i'm very interested in the results.

> Notice that the difference in time according to mplayer is 57.6 - 2.7 = 54.9 seconds.
> Multiply this by the initiallity reported framerate (24) and you'll get:
> 
>   (57.6 - 2.7) * 24 = 1317.6
> 
> A striking similarity between the frame index at those two times:
> 
>   1381 - 66 = 1315
of course. it means that mplayer plays it at correct rate.

> My guess would be that mplayer has messed up timing somehow...
timing is based on your audio card. so it plays at wrong rate, it will
mess up the whole timing. if you use -nosound, then system timer will be
used.

> Want a piece of the DivX file?
I think it plays well for me. But upload it to thot.banki.hu, i'll check.


A'rpi / Astral & ESP-team

--
mailto:arpi at thot.banki.hu
http://esp-team.scene.hu

_______________________________________________
Mplayer-users mailing list
Mplayer-users at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-users



More information about the MPlayer-users mailing list