VideoHelp Forum




+ Reply to Thread
Results 1 to 11 of 11
  1. Member
    Join Date
    Jan 2009
    Location
    United States
    Search Comp PM
    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
    Quote Quote  
  2. Skip step 4! Same problem?
    Quote Quote  
  3. Member
    Join Date
    Jan 2009
    Location
    United States
    Search Comp PM
    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
    Quote Quote  
  4. Member hech54's Avatar
    Join Date
    Jul 2001
    Location
    Yank in Europe
    Search PM
    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.
    Quote Quote  
  5. 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.
    Quote Quote  
  6. Member
    Join Date
    Jan 2009
    Location
    United States
    Search Comp PM
    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?
    Quote Quote  
  7. When you extract the .wav is "Audio"->"Full Processing mode" activated?

    Originally Posted by DaneClark View Post
    Could it be because the video Hasan unusual framerate?
    Maybe. Without a sample we cannot tell.
    Quote Quote  
  8. Member
    Join Date
    Jan 2009
    Location
    United States
    Search Comp PM
    Originally Posted by sneaker View Post
    When you extract the .wav is "Audio"->"Full Processing activated?
    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?
    Quote Quote  
  9. 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.
    Quote Quote  
  10. Member
    Join Date
    Jan 2009
    Location
    United States
    Search Comp PM
    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
    Quote Quote  
  11. Member
    Join Date
    Jan 2009
    Location
    United States
    Search Comp PM
    Okay, here's a samole, going to full processing mode didn't work
    Image Attached Files
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!