I am trying to time remap some videos in virtualdub. I do this by:
1. Lowering the frame rate in virtualdub and selecting "Save .wav"
2. opening the .wav in audacity and changing the tempo to match the slowed down video as much as possible then exporting it as a new .wav
3. going to the slowed down video in virtualdub and selecting "audio from other file" and opening the new .wav
4. Going back into the virtualdub framerate settings and selecting "change so that audio and video durations match"
But after doing all this, the audio starts playing noticeably late and makes the audio and video out of sync when it shouldn't be - I can fix this with the audio interleave option, but I was wondering if there was a more accurate way to fix it
+ Reply to Thread
Results 1 to 11 of 11
-
-
Sometimes I have to select "change so that audio and video durations match " because audacity sometimes changes the duration of the audio to one that's rounded off from what I typed in so it won't match the speed of the video exactly unless I select it sometimes. And the delay still happens even when I don't select that option
-
I normally just take the original audio(converted to wav) and the new wav audio and load both into Reaper.....then change the playback rate of the new audio to match the original.
I have/keep an OLD free version of Reaper just for this scenario.
After sometimes hours of fiddling and they match....I just replace the original audio with the new audio in AviDemux....no re-encoding the video. -
Have you checked the AVI to make sure original audio doesn't have a delay? There's no guarantee the audio and video are the same length to begin with, so using the option to adjust the frame rate to match the audio could cause sync issues as well as fix them.
I couldn't guess why the audio is late after the tempo has been altered. If you save the wave file, then add the wave file to the AVI and remux without changing the frame rate or the audio speed, and the new AVI still has the same audio delay, at least you'll know it's not the rest of the process causing it. I suspect that'll be the case. Maybe it's MP3 and VirtualDub is upset it's variable bitrate and not decoding it properly? Try "File/Export/Raw Audio" instead and import that into Audacity, if it can, rather than convert to wave first.
Do you use Avisynth, and how much are you changing the frame rate? Many GUIs have options for PAL speedup and slowdown, but if you're doing something else you'd have to create an Avisynth script yourself, but whatever you tell it to do, it should be pretty accurate. I had a quick look and to slow down from 25fps to 24fps, MeGUI adds the following to a script for re-encoding the audio (no pitch correction in this case), but you can specify any original/output frame rates as a fraction if you create your own script, so there's no need to calculate durations or percentages etc.
SSRC(Round((AudioRate()*25.0)/24.0)).AssumeSampleRate(AudioRate())
Speeding up from 24fps to 25fps looks like this:
AssumeSampleRate(Round((AudioRate()*25.0)/24.0)).SSRC(AudioRate())
Or ffmpeg has similar speed options. There's some command line examples in this post. I don't normally use ffmpeg for that sort of thing but when I tried it during the discussion I linked to, I thought the quality of the speed change function was a bit suspect on it's own. If you also adjust the pitch to match the speed change (so the pitch lowers when slowing the speed and increases when speeding up) it seems okay.Last edited by hello_hello; 31st May 2017 at 11:19.
-
Both the audio and the video comefrom the exact same source. The synchronization would be perfect that the audio starts about 2000 milliseconds late. Could it be because the video Hasan unusual framerate? Should I convert the video to 29.97 fps before adding the audio?
-
-
That could be the problem, I'll have to check when I get home. The weird thing is, this only happens when I try to slow down a video. It doesn't happen when I try to speed up a video.
On a somewhat unrelated note, is it possible to use AviDemux to replace a small portion of a video's audio without causing any generation loss or compatability issues? -
That's interesting. I assumed the "save wave" function would always convert the audio to PCM, but when I tested an AVI with MP3 audio, I got mp3 audio in a wav container unless full processing mode for the audio was active. Even then, if the chosen compression method isn't "no compression", you end up with some other type of audio in a wav container. You learn something every day......
Mind you that shouldn't cause any problems if Audacity is importing it okay, but I think at this point a sample is required. -
I'll provide a sample when I have time, but I just got home and checked and I can indeed confirm that the virtualdub audio was set to "direct stream copy" the entire time
-
Okay, here's a samole, going to full processing mode didn't work
Similar Threads
-
VIrtualDub issue with aspect ratio
By david.dgc in forum EditingReplies: 17Last Post: 8th May 2017, 00:12 -
ffmpeg audio delay - how to get the video to start before the audio ?
By Selur in forum Newbie / General discussionsReplies: 6Last Post: 13th Mar 2017, 14:30 -
Using VirtualDub and there's no audio. Capture card issue???
By Sporttster in forum Capturing and VCRReplies: 3Last Post: 21st Feb 2015, 12:37 -
audio delay
By chazz spacey in forum AudioReplies: 3Last Post: 25th Sep 2014, 12:39 -
Facing audio and subtitle delay issue using XviD4PSP.
By Haroon Khan in forum Video ConversionReplies: 12Last Post: 18th Jan 2014, 07:54