HomeOfAviSynthPlusEvolution / L-SMASH-Works

Forked from VFR-maniac/L-SMASH-Works; hydra3333/L-SMASH-Works; l33tmeatwad/L-SMASH-Works; HolyWu/L-SMASH-Works; AkarinVS/L-SMASH-Works.
87 stars 14 forks source link

Audio shift using LWLibavAudioCodec #72

Open radpopl opened 2 weeks ago

radpopl commented 2 weeks ago

I have an audio problem with a 4h MP4 file (H265 VFR + AAC) from a standalone recorder.

I open it in MPC-HC and at 4:00:59.500 I have synchronized video and audio. It looks and sounds OK. VLC too.

I open it in AviSynth using LWLibavVideoCodec:

name1="VFR.mp4"
a=AudioDub(LWLibavVideoSource(name1,fpsnum=50),LWLibavAudioSource(name1))
return a

And here is the problem, because the audio track is sped up and what was in 4:00:59.500 moves to approx. 4:00:49.180 In ffms2 it is the same.

(This is not a linear shift, because at time 0:13:00.000 I have only 1 frame of shift.)

If, however, in VirtualDub, load the same MP4 file as an audio track (Audio->Audio from another file), everything is perfectly synchronized.

radpopl commented 1 week ago

Discussion: https://forum.doom9.org/showthread.php?p=2006887