VideoHelp Forum
+ Reply to Thread
Results 1 to 8 of 8
Thread
  1. Hi, i have a video file and an audio file but after i mux them they are not in sync
    I tried to guess the delay but it is not working. Any idea how to determine the delay in ms ?
    Last edited by Kand; 15th Jul 2017 at 07:27.
    Quote Quote  
  2. Member Krispy Kritter's Avatar
    Join Date
    Jul 2003
    Location
    St Louis, MO USA
    Search Comp PM
    There isn't an automated way that I'm aware. Just best guess, and keeping increasing/decreasing until you don't notice it.
    Google is your Friend
    Quote Quote  
  3. I do this in my NLE (Vegas). It provides a waveform display for the audio. I try to find a visual cue that will sync to the sound. The audio clap board used in the movies provides a spike in the waveform that happens at the exact moment the hinged stick hits the board.That is the ultimate, and it is trivial to get sync. Lacking that, you can look at people's lips when they come together to form plossive sounds like words beginning with "p". You get a spike in the waveform at that point, so you move forward on the timeline to where their lips come together, and then move the audio waveform spike under that frame. There are hundreds of other examples, like a car door slam, that will get you to the same place.

    If your NLE lets you slide the audio forward/backward in time while continuously looping a segment of video, you can keep looping while playing until you sense that he audio is in sync. It is a little like "racking focus" when you manually focus a camera while looking at the image on the ground glass of the camera. You intentionally go way past the focus point, on either side and then, by racking back and forth you begin to physically as well as visually sense the exact center point of the focus.
    Quote Quote  
  4. Mod Neophyte Super Moderator redwudz's Avatar
    Join Date
    Sep 2002
    Location
    USA
    Search Comp PM
    You could also use a video player like MPC-HC and adjust the sync manually,
    then use the resulting offset number to correct the sync in an video editor.

    This only works where the sync error stays the same throughout the playback.
    If the sync error changes, then often the length of the audio and video are different.
    Quote Quote  
  5. I didn't know MPC-HC had that feature. Thanks for that tip. I'm going to try that out right away. Very useful information. Thanks!
    Quote Quote  
  6. Mod Neophyte Super Moderator redwudz's Avatar
    Join Date
    Sep 2002
    Location
    USA
    Search Comp PM
    In MPC-HC, the 'Audio time shift' is in 'Play>Audio Track>Options>Audio time shift'. Time is in milliseconds, + or -.
    If I'm editing using Avidemux, the offset adjustments are in 'Audio Output>Shift'.
    Quote Quote  
  7. Originally Posted by redwudz View Post
    In MPC-HC, the 'Audio time shift' is in 'Play>Audio Track>Options>Audio time shift'. Time is in milliseconds, + or -.
    It's easier to use the hotkeys. Default are "+" and "-", I believe. Can be set via the hotkey options. When pressing +/- the status bar will display the new delay.
    Quote Quote  
  8. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    Looks like MPC-HC is the way to go for ease of operation but for a visual display, I often use 2 different ffmpeg methods. For anyone interested in a programmatical method:

    1. Create a line graph video of the audio and compare them

    Code:
    ffmpeg -f lavfi -ss 00:00:00.000 -i "amovie='C\:\\Users\\Bud\\Desktop\\Various test Formats\\[dp]Manjandani-1.mp4',asplit[out0],showwaves=r=23.976:s=704x320:mode=line[out1]" -r 23.976 -s 704x320 -vcodec libx264 -vsync 1 -y "C:\Users\Bud\Desktop\Various test Formats\[dp]Manjandani-1LAV_line.MP4"
    Then use avisynth to stack them:

    v1=DirectShowSource(("C:\Users\Bud\Desktop\Various test Formats\[dp]Manjandani-1.mp4"), Pixel_Type="yuy2").Crop(0,0,-0,-0)
    v2=DirectShowSource(("C:\Users\Bud\Desktop\Various test Formats\[dp]Manjandani-1LAV_line.mp4"), Pixel_Type="yuy2").Crop(0,0,-0,-0)
    stackvertical(v2, v1)
    Subtitle("C:\Users\Bud\Desktop\Various test Formats\[dp]Manjandani-1LAV_line.mp4", font="Arial", size=24, text_color=$ff0000, align=6)
    Subtitle("C:\Users\Bud\Desktop\Various test Formats\[dp]Manjandani-1.mp4", font="Arial", size=24, text_color=$ff0000, align=3)
    ShowFrameNumber(scroll=true, x=10, y=27, font="Arial", size=24, text_color=$ff0000)
    ShowTime(x=72, y=44, font="Arial", size=24, text_color=$ff0000)
    ShowSMPTE(fps=23.976, x=68, y=61, font="Arial", size=24, text_color=$ff0000)
    Click image for larger version

Name:	line.jpg
Views:	77
Size:	62.8 KB
ID:	42346


    2. Use Audiograph to display overlay of audio

    Code:
    DirectShowSource(("C:\Users\Bud\Desktop\Various test Formats\[dp]Manjandani-1.mp4"), Pixel_Type="yuy2").Crop(0,0,-0,-0).DelayAudio(-0.0).AudioGraph(2)
    LanczosResize(864,368)
    ShowFrameNumber(scroll=true, x=10, y=27, font="Arial", size=24, text_color=$ff0000)
    ShowTime(x=72, y=44, font="Arial", size=24, text_color=$ff0000)
    Click image for larger version

Name:	audiograph.jpg
Views:	90
Size:	48.3 KB
ID:	42347
    Quote Quote  



Similar Threads

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