[MEncoder-users] How to change the audio timestamps
Jorge Peixoto de Morais Neto
please.no.spam.here at gmail.com
Fri May 30 00:20:41 CEST 2008
>> About the skipped/duplicated frames: another poster suggested me to
>> mess with .asoundrc, but I have not yet studied ALSA. So messing with
>> .asoundrc may (or may not) solve my skipped/duplicated frames problem
>> in the future, but I already have video with a 0.1% sync discrepancy
>
> I suspect the other poster was me ;-)
> And yes, I could solve the skips-and-duplicates problem (which led to a
> jerky video) with the .asoundrc modifications. But the audio-video
> drifting is still there :-/
I decided that to fix the desynch in the existing video video by
simply making the audio play 0.1% slower, that is:
extract the audio as pcm with mplayer -vc null -vo null -ao pcm:fast
ORIGFILE.avi
use sox to change the file header so the file will be interpereted as
having a different samplerate:
sox -V4 -r 31968 audiodump.wav audioalongado.wav
The original samplerate was 32000. I know this changes pitch, but a
0.1% will not be noticeable. I am more comfortable about changing only
the header of my audio file than using a tempo-changing algorithm that
will change the sound data itself.
Now I compress the sound with flac -8 and mux it into matroska.
So I now mainly want to avoid this skipping/dupplicate problem in the
future without using -noskip.
Oh, an interesing fact: when I capture with -noskip (and thus get a
0.1% drift) the memory usage of mencoder slowly increases. I suspect
it is because mencoder is using audio data faster than video data, so
video frames accumulate in a buffer.
Now to .asoundrc
From the ALSA wiki, it seems that .asoundrc is complicated...
Do you know how can I change period_size without changing anything else?
And, of course, thank you very much for all your time.
More information about the MEncoder-users
mailing list