VideoHelp Forum
+ Reply to Thread
Results 1 to 12 of 12
Thread
  1. Hello! I have a 25 FPS video from which I want to extract audio and sync it to a 23.976 FPS video. I managed to do it fairly easily by converting 23.976 FPS video to 25 FPS with MKVToolnixGUI, copying it to MP4 with FFmpeg and loading it in Sony Vegas. From there, I opened the audio I wanted to sync, used the original one as a reference (I stretched it first in Toolnix by 960/1001) and voilà! I synced it just by moving the audio track and splitting it in one place. I changed the video track because I read the following on MKVToolnix's GitHub: "First of all: don't. If you can avoid it then do not do it. Instead apply the opposite to the video and subtitle tracks present." I asked a guy who has experience with this kind of stuff, he said the opposite; do change the audio track (he recommended Sound Forge) and don't touch the video. Whom should I listen to? I feel like modyfing the audio is a better thing to do because I don't want to re-encode the video, and I feel like MKVToolnix's FPS change option is just a workaround, not a real deal. It does work, but it's just a set of commands inside the container.

    Anyway, this isn't why I'm posting this thread. I came across 29.970 FPS video and I need to do the same thing as above; sync an audio file from a 25 FPS video. I again tried MKVToolnixGUI to apply FPS change to 25, but the ending file is five minutes longer and there's no way to do anything with it. 23.976 to 25 FPS conversion shortened the video by 59 seconds, so now I'm wondering how I did sync the audio without stretching it or doing anything besides moving and splitting one time. This shit is confusing. Any tips regarding this? I tried MeGUI with AviSynth script and AssumeFPS, it extended the video just like Toolnix. ConvertFPS kept the original duration, which is nice, but as I said earlier, I don't really want to re-encode the video. Is there any other solution? What should I do to an audio file in order to sync it with 29.970 FPS video?

    Thank you in advance!
    Quote Quote  
  2. Just load it in Vegas and stretch the audio (CTRL-drag) to fit.
    Quote Quote  
  3. That doesn't work when FPS is different. I just tried it and audio gets out of sync very quickly. At the end of the file, it's late a whole lot.
    Quote Quote  
  4. Originally Posted by Ranching View Post
    That doesn't work when FPS is different. I just tried it and audio gets out of sync very quickly. At the end of the file, it's late a whole lot.
    If you're comparing waveform to waveform you should be stretching (or shrinking) audio to match. If the audio and video come from different edits of the movie, that's a different can of worms.
    Quote Quote  
  5. Tried that with no success. It's the same version of the movie.
    Quote Quote  
  6. Member
    Join Date
    Aug 2015
    Location
    South Africa
    Search PM
    Create an Avisynth script for the audio.

    Use TimeStretch() Function

    Syntax:

    TimeStretch(clip,tempo=(newFPS)/(oldFPS)*100)

    pitch and rate also count as parameters if you want to use it.

    - tempo deals with speed with no pitch shift
    - pitch doesn't deal with speed
    - rate deals with speed and pitch

    The syntax above is for all and default for any parameter is 100.

    Just do some tests with this.
    Last edited by Shaylen; 18th Sep 2015 at 07:22. Reason: Parameters all have 100 as default
    Quote Quote  
  7. Originally Posted by Ranching View Post
    Tried that with no success. It's the same version of the movie.
    Are you sure you're starting from a common point? Sync and split the tracks at a common audio peak if you need a reference point. This is really spectacularly simple in Vegas.
    Quote Quote  
  8. I am sure. It is indeed simple, that's how I synced an audio as I said in the first post (by using a common audio peak as a reference), but this 29.970 FPS video is a whole different story.

    @Shaylen Thanks! I will give it a try now.
    Quote Quote  
  9. I get an error when opening .avs script: "I don't know what 'clip' means".

    Code:
    A = FFAudioSource("C:\Users\GUEST\Desktop\000.mkv")
    TimeStretch(clip,tempo=(25)/(29.970)*100)
    Sorry if I'm doing something stupid, I am a newbie.
    Quote Quote  
  10. When you tried the control drag function ( not velocity) in Vegas , did you also right click on the audio track after your desired control drag and tick the box "lock audio to stretch".
    Quote Quote  
  11. Member
    Join Date
    Aug 2015
    Location
    South Africa
    Search PM
    Originally Posted by Ranching View Post
    I get an error when opening .avs script: "I don't know what 'clip' means".

    Code:
    A = FFAudioSource("C:\Users\GUEST\Desktop\000.mkv")
    TimeStretch(clip,tempo=(25)/(29.970)*100)
    Sorry if I'm doing something stupid, I am a newbie.
    clip actually stands for a variable that's containing the source. It's in all Avisynth functions.
    In this case, 'A' is the containing variable so here's what it should look like:
    TimeStretch(A,tempo=(25)/(29.970)*100)

    When using frames rates that's not whole numbers use fractions. e.g. 29.970 --> 30/1.001
    because it may or may not distort the audio a bit.

    Also audio scripts usually contain a BlankClip() for video when piping to an encoder.

    If you want to learn more about how these scripts are structured, download RipBot264. It gives you complete access to
    the process on how it does it's encodes from input to scripts to encodes to new files. This is partially how I learned how
    it works.

    These temp files for RipBot264 should be in "C:\\Temp"
    Last edited by Shaylen; 18th Sep 2015 at 10:54.
    Quote Quote  
  12. I finally succeeded! Thank god. A guy on Doom9 said I needed to do 25 to 23.976 FPS audio conversion instead of 25 to 29.970 FPS (which created a five minutes shorter file), so I did. I stretched the audio for 55 seconds (I used Vegas' Élastique Pro, is that a better method than none?) and voilà!

    Thank you, guys, for helping!
    Quote Quote  



Similar Threads

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