VideoHelp Forum




+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 40
  1. Member
    Join Date
    Jan 2006
    Location
    South Africa
    Search Comp PM
    I struggle with a sync problem.

    I captured all my VHS cassettes (not Super VHS cassettes) with a S-VHS player (a JVC HR-S8960 which has a Time Base Corrector with Digital Noise Reduction). I used Virtualdub with Lagaryth compression. I then edited the videos using Virtualdub. As there were multiple duplications, as well as areas that was not necessary to keep, I saved everything as video clips. I have nearly 300 clips now. These were weeks of work.

    While busy with the next step, using AviSynth to clean the clips, for the first time I noticed the audio and video was out of sync.

    I use Sony Vegas Pro 12 for the finer editing.

    I tried many programs to sync the A and V. I tried Video Audio Sync Fixer, YAAI- when I tried it numerous times times, seemed as if the audio was approximately 2 sec behind. I then bought PluralEyes 3, but I struggle with it. If I try to use it, it does not want to sync. It seems as if this program was made for a number of audio tracks to link with one video clip.

    It appears as if the time that the sound is behind the audio is the same for all the clips, but it is difficult to establish.

    I am still working on the original Avi clips, because those are the ones I want to keep.
    Last edited by avz10; 5th Dec 2013 at 06:34.
    Quote Quote  
  2. It's very likely all the clips are out by the same amount as you have observed.

    Find a clip that has a distinctive audio and video cue such as a handclap.
    Put it in a timeline.
    Unlink the video and audio tracks (ignore event grouping)
    Move either the audio or the video until they are in sync and note the difference. (right click synchronize)
    Create a new timeline with all your clips (or a lot of them)
    Again unlink audio and video
    Make the same adjustment to bring them into sync.
    Make subclips based on the newly resynced material and use those for editing.
    Last edited by smrpix; 17th Nov 2013 at 12:10.
    Quote Quote  
  3. You can easily set a delay in an AviSynth script and save out a WAV of the now resynched audio for use later on.

    It appears as if the time that the sound is behind the audio is the same for all the clips, but it is difficult to establish.
    Play the script (with or without the delay added) in a player such as MPC-HC/BE in which you can set and adjust a delay on-the-fly. When you find out what it is add or adjust one in the script and try it out before saving.
    Quote Quote  
  4. Member
    Join Date
    Jan 2006
    Location
    South Africa
    Search Comp PM
    I am still struggling with the sync issue.

    It's very likely all the clips are out by the same amount as you have observed.
    I have not gone through all the clips, but some are basically in sync and then there is a pattern that some are +8-9 ms out of sync according to SyncView. (Screen clips shown later in the post)

    I started off with just one clip, trying to sync it. It has a clear transition of scenes.

    Pluraleyes does not work for this, as multiple audio clips are used. I cannot find a way to just move the single audio stream.

    I used smrpix's suggestion and can get very close to sync, but lips are not totally right.

    I did a massive search on the internet, but could not really fix it 100% with the following programs and some clips do not have obvious transitions of scenes.

    I tried:
    Avidemux
    Audio Video Synchronizer
    Video Audio Sync Fixer

    I really struggled too much.

    Then I saw this:

    1. I use
    virtualdub to save the audio as a .wav file
    2. then load this with the video file in SyncView.
    3. When I have found the required delay
    4. I then re-encode the movie in virtualdub by selecting
    5. direct stream copy under video and
    6. full processing for the audio (you can again compress it as an mp3 file and enter the offset value from SyncView in the audio skew correction box offset under audio/interleaving).


    The problem is to go through all my clips, splitting the audio stream into a wav, to find if there is a sync issue. This is, if Syncview is accurate. If it is accurate, then it is still a massive job.

    Some clips gives me a a -2 or -3 ms value and others give me a +8/9 ms according to SyncView. I suppose these also need to be corrected.

    Apart from trial and error, does anyone know of a good program that can accurately measure the delay?

    Here are some examples:

    Code:
    General
    Complete name                            : C:\Users\User\Desktop\a.avi
    Format                                   : AVI
    Format/Info                              : Audio Video Interleave
    File size                                : 54.3 MiB
    Duration                                 : 8s 160ms
    Overall bit rate                         : 55.8 Mbps
    Writing library                          : VirtualDub build 32842/release
     
    Video
    ID                                       : 0
    Format                                   : Lagarith
    Codec ID                                 : LAGS
    Duration                                 : 8s 160ms
    Bit rate                                 : 54.2 Mbps
    Width                                    : 720 pixels
    Height                                   : 576 pixels
    Display aspect ratio                     : 5:4
    Frame rate                               : 25.000 fps
    Standard                                 : PAL
    Color space                              : YUV
    Chroma subsampling                       : 4:2:2
    Bit depth                                : 8 bits
    Bits/(Pixel*Frame)                       : 5.232
    Stream size                              : 52.8 MiB (97%)
     
    Audio
    ID                                       : 1
    Format                                   : PCM
    Format settings, Endianness              : Little
    Format settings, Sign                    : Signed
    Codec ID                                 : 1
    Duration                                 : 8s 160ms
    Bit rate mode                            : Constant
    Bit rate                                 : 1 536 Kbps
    Channel(s)                               : 2 channels
    Sampling rate                            : 48.0 KHz
    Bit depth                                : 16 bits
    Stream size                              : 1.49 MiB (3%)
    Alignment                                : Aligned on interleaves
    Interleave, duration                     : 42 ms (1.06 video frame)
    Interleave, preload duration             : 500 ms




    The "delay" in sync is shown right from the bottom part of SyncView.

    I found Windows Media Player shows the delay quite good.

    MPEG version:

    https://vimeo.com/81079696

    When I was busy encoding it for this post with TPMG, I saw this



    I thought this would be an easy way to screen the clips

    Second example:



    But the delay in TMPG looks quite similar comparing with the first example:




    MPEG version:

    https://vimeo.com/81079695

    So, my questions:

    1. Any suggestions how to screen the clips to see if there is a sync issue with each clip?

    2. What is the best way to sync them as close as possible to 100% sync?

    3. Apart from trial and error, does anyone know of a good program that can accurately measure the delay between audio and video?

    4. If one has got the delay, I suppose one can go the AviSynth route as Manano suggested.

    Thanks for any suggestions.
    Last edited by avz10; 5th Dec 2013 at 12:15. Reason: Added detail; one picture did not display; duplicate link to one video
    Quote Quote  
  5. Originally Posted by avz10 View Post
    I am still struggling with the sync issue.
    I have not gone through all the clips, but some are basically in sync and then there is a pattern that some are +8-9 ms out of sync.
    If you can tell the audio is out of sync by 8-9ms then you've surely got a bionic brain. I'm kind of used to checking for sync issues and it probably takes a de-sync of at least 40ms before I can start to be confident it's out, if I notice. Sometimes I don't until later down the track when I'm watching the encode. Most people probably wouldn't be likely to notice a sync issue until it's at least 100ms or more.

    Originally Posted by avz10 View Post
    Apart from trial and error, does anyone know of a good program that can accurately measure the delay?
    MediaInfo will accurately display any audio delay. It'll be listed under Audio as "Delay Relative To Video". If there's no "delay relative to video" listed (as per your example) then there's no delay being used for the audio stream (the audio and video begin at the same time).
    A lack of an audio delay in the AVI itself doesn't necessarily mean the audio and video are in sync though. If for some reason the sync was out during the capture process then you'd need to remux the AVI while manually specifying an appropriate audio delay, and the only method I've found for discovering what that might be is trial and error.
    And of course if for some reason the amount of audio/video de-sync isn't consistent (ie it changes as the video progresses) then setting an audio delay while re-muxing won't be able to fix it properly.[/QUOTE]
    Quote Quote  
  6. Member
    Join Date
    Jan 2006
    Location
    South Africa
    Search Comp PM
    Thanks for your comments.

    If you can tell the audio is out of sync by 8-9ms then you've surely got a bionic brain.
    I surely do not have one, but this is what Syncview is telling me.

    MediaInfo will accurately display any audio delay. It'll be listed under Audio as "Delay Relative To Video". If there's no "delay relative to video" listed (as per your example) then there's no delay being used for the audio stream (the audio and video begin at the same time).
    I analysed approximately 20 clips with MediaInfo and they all showed that there were no delay.



    By accident, I played a number of clips with different video players. I used VLC, Windows Media Player and Media Player Classic-Home Cinema. The audio and video started exactly at the same time when I played it with VLC and WMP, but there is a significant delay if I play it with Media Player Classic. The audio starts late and continues after the video has ended.

    So, this does not really look like a sync issue.

    I uploaded a video on YouTube and then downloaded it on my laptop

    http://www.youtube.com/watch?v=7wJMQcdd4Eo

    I played it, using all 3 players, and the trend was the same: The audio and video started exactly at the same time when I played it with VLC and WMP, but there is a significant delay if I play it with Media Player Classic.

    Does anyone know of a solution- perhaps send the clips through VirtualDub with different settings?
    Quote Quote  
  7. Member
    Join Date
    Jan 2006
    Location
    South Africa
    Search Comp PM
    Duplicate post
    Last edited by avz10; 6th Dec 2013 at 03:07. Reason: Duplicate post
    Quote Quote  
  8. Originally Posted by avz10 View Post
    [I surely do not have one, but this is what Syncview is telling me.
    If it's really off by 8-9ms, then for all intents and purposes it's in synch. No one can tell a difference that small. If it's noticeably out of synch then the delay is a helluva lot greater than 8-9ms.
    I analysed approximately 20 clips with MediaInfo and they all showed that there were no delay.
    There was no delay set (or 'no delay being used' as hello_hello put it). There's a difference. You can get a zero delay all day and your video can be quite a bit out of synch.

    I used to use MPC-HC and never noticed any delay problems. Now I use MPC-BE and still no problems as compared to other players. You can't trust YouTube. I upload stuff I know is in synch and sometimes when I play it it's in synch and at other times there's a roughly -200ms delay. I don't know why.

    As for your YouTube video, if we're supposed to hear that woman in the blue sweatshirt, I have no idea what she's saying, and whatever it is it's obviously way out of synch. If your material was capped from VHS tape, there can be several reasons why it might be out of synch.

    Apart from trial and error, does anyone know of a good program that can accurately measure the delay?
    If by 'trial and error' you mean the ears, that's what I use. That and the + and - keys in MPC-BE to discover the amount of the delay.
    Last edited by manono; 6th Dec 2013 at 03:36.
    Quote Quote  
  9. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Analyzing this problem is compounded because the original capture is not available. We have no way of comparing MediaInfo data between the original videos and the modified videos. We can't play a sample from the original and compare it by playing the newer sample of the same thing. One basic question: when did you notice this sync problem? At what stage in editing did it become apparent? Are some of your scenes out of sync more than other scenes? If you listen to a scene that was cut from the the early part of a capture, and then compare scenes that were cut from a later part of the same capture, is the sync problem worse in the later segment? Or is the out-of-sync condition constant throughout all the scenes from the same capture session?

    If the delay is short or non-existent in early scenes from a capture, but increases with scenes that were originally later in the same capture, then audio sync was off-speed during the original capture. Why the audio is OK in some players but not in other players is baffling to me: I've never had that experienc.
    Last edited by sanlyn; 19th Mar 2014 at 10:24.
    Quote Quote  
  10. Member 2Bdecided's Avatar
    Join Date
    Nov 2007
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by sanlyn View Post
    Why the audio is OK in some players but not in other players is baffling to me: I've never had that experienc.
    I'm guessing avz10 doesn't know whether all these players will play "good" video properly or in-sync anyway. Not all players on all systems will play lossless or Lagarith encoded video perfectly, and few PCs manage to sync audio and video as perfectly as a good DVD player connected to a CRT. When correctly authored, those are locked to the audio sample and pixel (really!). This is the best way of verifying lipsync (audio/video synchronisation) of arbitrary video IMO - burn it to a DVD and watch it on a CRT TV. Using a DV stream with a good DV converter box connected to a CRT is fine too.

    The old professional way to verify that a player or piece of equipment is maintaining A/V sync is to use a flash/beep test stream. Every second it has one white frame co-timed with a 20ms beep on the audio, and the rest is black+silent. You connect the audio and video to a scope, one to each scope channel. When A/V sync is perfect, the white frame and audio beep clearly line-up on the scope screen. If one leads or lags, this is also apparent, and the timing error can be measured from the scope screen.


    As others implied, the threshold for being able to detect lipsync errors is if the audio is more than 5ms early, or more than 20ms late (relative to the video). The thresholds for being annoyed are higher. The threshold for being really disconcerted and confused by the effect is about 200ms.


    There's no automatic way of fixing broken lipsync. Trying to read the sync error from data in the bitrstream won't help either - that's there when there's a known offset (usually caused by cutting an MPEG-stream, because the audio and video chunks are different lengths, to they don't line up at the newly cut start point), and it's used by all good players to put the audio back in sync during playback so you wouldn't see lipsync errors due to this value anyway.





    None of this really helps avz10. What you can do is try whatever seems best on a PC, and then burn versions with +100ms, +50, 0, -50, and -100ms audio delay (relative to that "best" value) to a DVD, and see which looks right on a TV. If you have hundreds of clips with different offsets, this is pretty hopeless. I don't know which software is best on a PC because I've never tried to fix it just in a PC. Sorry. I'm sure someone else has though.


    If you want to provide samples for others to look at, they'll have to be DirectStreamCopys/cuts from the original AVIs. As someone else said, YouTube and the like are no good - these sites re-encode and introduce their own lipsync errors to some formats.


    David.
    Quote Quote  
  11. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    It would be instructive to see three or four clips joined together, in their original sequence. That might not be practidal if the scnes are really loing, encoding them to make them smaller wouldn't help matters. Or take one longer clip and include only its beginning and end.

    It depends, again, on how the clips were cut and joined. If I want a scene from an AVI capture, I capture its first frame and then include about 20 ending frames to keep the tail end the audio, which is usually ahead of the video by a few m-seconds in a similar way that movie audio is few frames ahead of the image. When you join that clip to another one, you trim off that trailing end of the first clip in Avisynth and join the two. Doing it that way never gave me a sync problem, nor does it give me a sharp cutoff of audio from the first clip or any kind of "tick" or audio dropout, and the subsequent clips joined to it were in sync. Now, every time I explain this I have to remember if I used AlignedSplice (+) or UnalignedSplice (++). It does make a difference.
    Last edited by sanlyn; 19th Mar 2014 at 10:24.
    Quote Quote  
  12. Originally Posted by avz10 View Post
    I played it, using all 3 players, and the trend was the same: The audio and video started exactly at the same time when I played it with VLC and WMP, but there is a significant delay if I play it with Media Player Classic.
    What about other video, does MPC-HC introduce a similar delay? Specifically other AVIs?

    Not that the settings are likely to have changed by themselves, but I'd feel remiss if I didn't suggest you go into MPC-HC's options for a quick look-see.

    Click image for larger version

Name:	1.gif
Views:	840
Size:	41.6 KB
ID:	21721

    Under Internal Filters, and after clicking on the Audio decoder button:

    Click image for larger version

Name:	2.gif
Views:	1009
Size:	18.5 KB
ID:	21722

    You might also want to try disabling all the output formats except 16 bit integer. You might have to restart MPC-HC for it to take effect. Admittedly those ideas are fairly improbable, but if you're correct and the audio is delayed when MPC-HC plays a file (and I'm not saying you're not) then something must be causing it.
    Quote Quote  
  13. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Now that hello_hello mentions it, you might have an audio setting in the processing chain somewhere that was set at a different sampling rate than the one you needed. We've seen that happen in the past. How they get re-set (or were never properly set to begin with) is anyone's guess. It does get to be a pain in the neck to re-check that sort of thing, but I do it now and then anyway, even when things seem to be going well. I suppose it's part of my computer programming past: assumptions can often mislead.
    Last edited by sanlyn; 19th Mar 2014 at 10:25.
    Quote Quote  
  14. Take a couple of supposedly out of synch clips. Convert to final format, author, and test.

    My guess would be than on the vast majority there is no human-detectable loss of synch whatsoever.

    The extremely small time difference, plus the fact that some players are correct and some not, indicates to me that you are chasing
    a phantom problem.
    Quote Quote  
  15. Member
    Join Date
    Jan 2006
    Location
    South Africa
    Search Comp PM
    There is so much valuable information in this thread, thanks everyone.

    I would like to sort the sync issue out this weekend, so that I can start using the scripts and then eventually produce DVD’s for the children by Christmas (more than 1 year after I have started the project).

    I have gone through the posts and then I want to answer what I can.

    When did you notice this sync problem
    Were the original captures in sync
    I never tested them, before right at the end when we were experimenting with the scripts. When I was capturing, I used Virtualdub, but set it up to see if it was capturing (enabled volume meter), but I never checked to see if the clips were in sync.

    With a previous project, someone suggested that I use these settings to prevent sync issues. I am just totally unsure what settings I used for capturing this time.




    At what stage in editing did it become apparent?
    As VD does not have sound, I did not test the sync until I have encoded it to MPEG with TMPGEnc, burnt a number of clips on a DVD and played it on the TV.

    Are some of your scenes out of sync more than other scenes? If you listen to a scene that was cut from the early part of a capture, and then compare scenes that were cut from a later part of the same capture, is the sync problem worse in the later segment? Or is the out-of-sync condition constant throughout all the scenes from the same capture session?
    My clips are very short, so this is difficult to establish, but I will try my utmost to find out if the sync gets worse. I still need to watch the numerous clips to see which ones are out of sync.
    I have not yet joined clips. Perhaps with the cutting/editing part in VD something went wrong.

    Is the sync problem in the split-AVIs, or only the AVIs that have gone through
    AVIsynth, or only on the final encoded MPEGs?
    All the AVI’s are split. I do not have the original captured VHS cassettes as files any more, as they took up too much space. I only noticed it in the mpeg clips on TV and then I went back and saw that the problems were already apparent in the AVI clips.

    With regards to the video player settings, that is now fixed:

    Make sure you don't have
    MPC's audio time shift option set. View -> Options -> Internal Filters -> Audio Switcher -> Audio Time Shift.
    This was the case, so I have corrected it. Thanks! I also downloaded MPC-BE and the Auto Time Shift was also on. I corrected this.
    With regards to the finding that the “delay relative to video=0ms” and the fact that in all the clips the length of the video and audio is equal, one can only assume that perhaps either the audio or video started earlier than the other.

    I do not have time now to go through a number of clips to see if there are sync problems, but what is the suggestion- play it on VLC/MPC-HE and if there is a problem , try to measure the delay?

    Here is one example:


    I loaded a clip "1C 1998" in Vegas Pro (64 bit) and played it. I attach this clip, showing the transition area as the original AVI (after clipping). Here are screen shots of the results:



    Trying as good as I can, I used markers where the music continue in the garden.





    This looks as if the delay is 1 second.

    I cut the relevant area, uploaded it so that all you clever people can analyze it. I found that WMP and MPC-BE struggled to play this short clip, but VLC played it well.


    I need to be realistic- I will struggle to watch all the clips to see if they are in sync and many would not have a good audio transition point that one can link with the video to see the delay.

    If I want a scene from an AVI capture, I capture its first frame and then include about 20 ending frames to keep the tail end of the audio, which is usually ahead of the video by a few m-seconds in a similar way that movie audio is few frames ahead of the image.
    I have done so- clip f

    For those who have not followed the initial thread- I was looking for help with scripts to improve the quality of the captured VHS cassettes. All work was done in Virtualdub. Due to duplication of video files, I had to create a number of clips and did some preliminary editing in VD. I have not used a NLE. I have not even used any of the AviSynth scripts.

    What you can do is try whatever seems best on a PC, and then burn versions with +100ms, +50, 0, -50, and -100ms audio delay (relative to that "best" value) to a DVD, and see which looks right on a TV.
    I suppose you do it in VD (Audio>Interleaving), save clips with different settings, convert to MPEG and watch on TV.

    So, my job is:
    1. Identify which clips have a delay (What will be the best video player to use? Are there no short cuts?)
    2. Establish the length of the discrepancy (so this will need to be a trial and error). In some clips there are no clear transition where one can establish a fault in the sync of the audio and video- I suppose, those ones I can just leave.
    3. Insert it in VD
    4. Save as a new file
    5. And only then start to use the scripts which were created
    6. Then I am dead!!!
    Thanks for all the comments


    Albie


    Nelson, I only saw your comment now- will give it a try
    Image Attached Files
    • File Type: avi b.avi (19.06 MB, 63 views)
    • File Type: avi e.avi (32.30 MB, 58 views)
    • File Type: avi f.avi (6.43 MB, 58 views)
    Last edited by avz10; 7th Dec 2013 at 13:51.
    Quote Quote  
  16. Originally Posted by avz10 View Post
    MPC's audio time shift option set. View -> Options -> Internal Filters -> Audio Switcher -> Audio Time Shift.
    This was the case, so I have corrected it. Thanks![/QUOTE]

    That's odd and odder... the fact that MPC-BE had an audio delay specified when you first installed it. I'm not sure, but it's possible MPC-HC and MPC-BE keep settings in the same place in the Windows registry, so if you change a setting in one it could change it for the other too. I'm not sure that's how it works, but both players have a setting in their options to "save settings to an ini file" which would mean changing a setting for one player should have no effect on the other.

    I'm glad it's sorted now. My oten used MPC-HC problem solver is the Reset button under Miscellaneous options. Use the Backup button first if you want to restore your settings. Resetting mightn't necessarily fix everything, but it fixes enough
    Quote Quote  
  17. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Below, the first frame of the scene change at frame 33 of the b.avi sample. From watching this short clip, it would appear that audio is supposed to be silent in the outdoor scene that begins at frame 33. One would make these assumptions because: (a) the Audio View in VirtualDub indicates that the audio is silent at some point before the entire clip ends, and (b) the viewer hears no sound shortly after the outdoor scene begins. As it happens, this is not exactly the case, but those assumptions served as a starting point. Notice that in Audio View, the shape of the audio track has no significant change when the video cuts from one shot to the next shot at frame 33. You can left-click these images to enlarge them.
    Image
    [Attachment 21785 - Click to enlarge]


    Below, the same frame 33 has its audio re-synch (offset) by minus 1480 ms (-1480 at the bottom of the audio dialog for skew correction), or about 1.5 seconds of added delay. This places the audio cutoff at frame 33 of the clip. However, at the left-hand side of this audio display you will see a sudden blip or "peak", which indicates a sudden, very short sound.
    Image
    [Attachment 21786 - Click to enlarge]


    Below, audio skew is adjusted farther to -1960 ms (or almost 2 seconds). The audio "blip" will be heard when the boy presses the button on the toy, at frame 9.
    Image
    [Attachment 21787 - Click to enlarge]


    Unfortunately, this means that the audio track included in this clip will end at frame 22. So there will be no audio between frame 22 and the scene change at frame 33. The audio for that scene is located somewhere on another of your cut sections; likely, that audio is 2 seconds off sync.

    How do you retrieve the original and complete audio for these scenes for re-sync work? You have to retrieve it from the original capture (which you didn't keep) and overlay onto your modified scenes. Otherwise, you can hunt through your scene cuts and find the scene that followed the bathroom shot, and retrieve what video you can from the scene that followed it.

    You are trying to work too quickly. Original captures should be moved or copied in their entirety to an external area or another hard drive, and should be left unaltered. It's too late to start thinking about that now. It might be possible to retrieve pieces of audio by temporarily reassembling some of your cuts scenes into their original sequence, a few scenes at a time. Save the audio-only, then overlay it onto the modified scenes and adjust audio skew.
    Last edited by sanlyn; 19th Mar 2014 at 10:25.
    Quote Quote  
  18. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    In clip e, I noticed a spot where the woman paused speaking for a brief few frames, then began speaking again with a word that seemd to begin with the letter "m", followed by "o" or "a". An audio skew adjustment of -350 ms laced that "m" approximately on frame 56. Because I cannot understand the language, this adjustment was as close as I could get, but the sounds seem to coincide with movements of her mouth. This is also made difficult by another voice speaking at the same time. You undedrstand the language better than I do, so you might be able to make a more precise adjustment.
    Image
    [Attachment 21789 - Click to enlarge]


    The remaining clip f.avi dos not have enough video or audio to determine what is happening.

    These three clips and some clips posted earlier lead me to conclude that your original capture was going out of sync progressively, being mild shortly after the beginning and getting more off sync at the end.
    Last edited by sanlyn; 19th Mar 2014 at 10:26.
    Quote Quote  
  19. Hey, how do you get a WAV file to show in VDub? And can you adjust the amplitude (is that the right word?) so the waveforms are higher and more obvious?
    Quote Quote  
  20. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    I dunno. couldn't open a .wav all by itself. I always had to load a video (any vid will do) and use "audio from another file...". The only way I know to perk up the waveforms is to raise the volume.
    Last edited by sanlyn; 19th Mar 2014 at 10:26.
    Quote Quote  
  21. Originally Posted by sanlyn View Post
    I always had to load a video (any vid will do) and use "audio from another file...".
    Thanks. That's what I wanted to know.
    Quote Quote  
  22. Member
    Join Date
    Jan 2006
    Location
    South Africa
    Search Comp PM
    Sanlyn, with regards to clip f in #15, This is why I included it:

    I capture its first frame and then include about 20 ending frames to keep the tail end of the audio, which is usually ahead of the video by a few m-seconds in a similar way that movie audio is few frames ahead of the image.
    This is what I tried to do here, but forgot to include the detail off the entire clip. I included the first 3 frames and the last 20 frames. I am not sure if you will be able to do something with this clip.


    Code:
    General
    Complete name                            : C:\Users\User\Desktop\Sync A & V\Video clips\1 C 1998.avi
    Format                                   : AVI
    Format/Info                              : Audio Video Interleave
    File size                                : 588 MiB
    Duration                                 : 1mn 23s
    Overall bit rate                         : 59.0 Mbps
    
    Video
    ID                                       : 0
    Format                                   : Lagarith
    Codec ID                                 : LAGS
    Duration                                 : 1mn 23s
    Bit rate                                 : 57.5 Mbps
    Width                                    : 720 pixels
    Height                                   : 576 pixels
    Display aspect ratio                     : 5:4
    Frame rate                               : 25.000 fps
    Standard                                 : PAL
    Color space                              : YUV
    Chroma subsampling                       : 4:2:2
    Bit depth                                : 8 bits
    Bits/(Pixel*Frame)                       : 5.543
    Stream size                              : 572 MiB (97%)
    
    Audio
    ID                                       : 1
    Format                                   : PCM
    Format settings, Endianness              : Little
    Format settings, Sign                    : Signed
    Codec ID                                 : 1
    Duration                                 : 1mn 23s
    Bit rate mode                            : Constant
    Bit rate                                 : 1 536 Kbps
    Channel(s)                               : 2 channels
    Sampling rate                            : 48.0 KHz
    Bit depth                                : 16 bits
    Stream size                              : 15.3 MiB (3%)
    Alignment                                : Aligned on interleaves
    Interleave, duration                     : 40 ms (1.01 video frame)
    Interleave, preload duration             : 500 ms
    With regards to the delay:
    frame 33 has its audio re-synch (offset) by minus 1480 ms
    audio skew is adjusted farther to -1960 ms
    How do you establish this precise values?

    You are trying to work too quickly. Original captures should be moved or copied in their entirety to an external area or another hard drive, and should be left unaltered.
    As I have stated before, I have been busy with this project for more than a year, spending all my off-time on it.
    1. My first post in this regard was in October 2012 about buying a S-VHS machine with TBR and DNR.
    2. I captured all my cassettes and edited them for the next few months.
    3. In May 2013 I posted a video with 8mm films (original films are gone) and scripts were developed.
    4. I posted my "big"project on 29 June and due to numerous errors that I have made, posted on 7 July that I will capture all the cassettes again, remove the duplicates, etc.
    5. At that stage, what I did not think about and no one mentioned it, was to check for sync issues.

    So, I am not sure why you say I work too quickly?

    The reason why I deleted the original VHS video captures, was space. The clips currently take up an entire 1 TB external drive, which I am also saving on another drive.
    If I would have saved all the videos from the VHS cassettes, I surely would have had another 3TB of videos with most of it duplicates.

    These three clips and some clips posted earlier lead me to conclude that your original capture was going out of sync progressively, being mild shortly after the beginning and getting more off sync at the end.
    As I stated before, my steps are:
    1. Identify which clips have a delay (What will be the best video player to use? Are there no short cuts?)
    2. Establish the length of the discrepancy (so this will need to be a trial and error). In some clips there are no clear transition where one can establish a fault in the sync of the audio and video- I suppose, those ones I can just leave. David suggests to use 50 ms increments in VD and observe, but Sanlyn, you seem to have a more professional method.
    3. Try to correct the synchronization
    4. Insert it in Virtualdub.
    5. Save as a new file
    6. And only then start to use the scripts which were created
    Any advice will be useful. I really want to move forward, if possible. Too many hours have been spent on this. Missing sound in a few frames, are not the end of the world. My family do not even notice the biggest of errors!


    Thanks



    Albie
    Quote Quote  
  23. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    I understand that you have been working on this project for some time. By working too quickly I mean that you skipped some elementary steps, such as checking to see if you had any audio at all. But it's too late to worry about that. The safest way that most use for such work is to save their captures to external drives, then draw what they want from their capture as the needs arise. The primary way to retrieve the sound properly is to recapture the videos that are badly synchronized. Otherwise, you must work with what you have.

    The bad video-audio match seems to have begun during the capture. I say that because some of your scenes seem only slightly out of sync, while others were out of the playing field altogether. Like two different cars traveling at two different speeds, their distance from each other varies with time. At first, the two cars are only a few feet apart. After some time passes, they are hundreds of yards apart. After a couple of hours, the two cars are many miles apart. If you took an overhead camera shot from high in the sky, you would have a photo of the two cars that shows one car located far ahead of the other. Modify that photo by chopping off one side of the image, and you will see only one of the cars. The "other" car exists in the discarded part of the modified photo.

    The small video of 20-plus frames contains video whose audio is so far out of sync that the audio exists on another section of the original capture. Think of bad sync as meaning that, physically, audio and video exist in different parts of the file. If audio is being recorded "behind" the video, then during playback you won't hear the audio for that scene until later in the video -- this is what is happening to your videos. So you configure an offset (called the "skew"), which plays the audio earlier or later than the audio would normally play. At the same time, it means that you must also have some of the captured data that lies "ahead" of the current scene, in order to retrieve the audio for that scene, because the audio is playing "too late" -- meaning that the audio is located in a position that is "father down the road" from the video. If audio is out of sync by 2 seconds, you need an additional 2 seconds of material to regain the audio for the current scene. If you have that additional 2 seconds, you can figuratively "move the audio farther back" to an earlier position during playback. It is like moving the text of page 4 back to page 2. As you read a book, you will see page 2 sooner than you will see page 4.

    Code:
    VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV (VIDEO) = 4 seconds
              aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa (AUDIO not in sync) = 4 seconds
    
    
    Cut off last 2 seconds of the scene:
    
    VVVVVVVVVVVVVVVVVVVV (VIDEO) = 2 seconds
              aaaaaaaaaa (AUDIO not in sync) = 1 second
    
    
    Include only 1 second of the scene:
    
    VVVVVVVVVV (VIDEO) = 1 second
               (AUDIO not in sync) = 0 seconds 
    
    You determine the amount of skew by observing the video and looking for "clues" in the shapes of the audio display. If you know that a particular video scene came from a part of the capture where sync is off by 1.5 seconds, then scenes from the same approximate area in that capture will have the same problem. If you change the amount of skew in Virtualdub, move the playing cursor back and forth a frame or two to "activate" your change and observe what happens in the display.
    Last edited by sanlyn; 19th Mar 2014 at 10:27.
    Quote Quote  
  24. Member
    Join Date
    Jan 2006
    Location
    South Africa
    Search Comp PM
    As usual Sanlyn, I can only say thanks for all the efforts.

    Clips b and e are in perfect sync and in clip e, you have synced the lips 100%, although you do not know Afrikaans, our mother tongue (A mix of Dutch, German, Flemish, French as well as some of the words that the "slaves" brought in during the early 1700's.). I would like to burn all these clips on a DVD and watch them on TV, before I seriously start working.

    As usual, my problems. I do not want to go the wrong way if I do not need to.

    1. I am not able to open the wav stream, as explained. I have tried it with a few clips. I load an AVI file, would go to Audio>Audio from another file, open that file, but there is no change. The file that I initially loaded would still be there.
    2. I need to identify which clips have a delay, so I can put them aside, to work on later. Should I play them in one of the players like VLC media player, MPC, etc or load them into my Vegas Pro and see if there is a discrepancy between A and V? I would like to start with this ASAP.
    3. Establish the length of the discrepancy (so this might be a trial and error). In some clips there are no clear transition where one can establish a fault in the sync of the audio and video- I suppose, those ones I can just leave. David suggests to use 50 ms increments in VD and observe, but Sanlyn seems to have a more professional method. I really need help on this one or is it just a matter of trying different values?
    4. Correct the sync problem in Audio skew correction and then save with Virtualdub. Also there I am unsure- should I leave video in direct stream copy and audio in full processing mode or what should my settings be, even in number 3 above?
    5. Save as a new file
    6. And only then start to use the scripts which were created

    Thanks

    Albie
    Quote Quote  
  25. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    I believe David and I are doing very much the same thing. The temptation is to use different variable controls (such as "preload" and "skew" at the same time). Probably better to work with skew alone, as trying to play catch up with multiple controls can drive you crazy.

    The clips you submitted had audio imbedded. The audio I used was the audio that was already in the avi clip. What you could do to speed things up is to to gather a few scenes that are from the same parts of the original captures and that were originally joined together, whether they are of the same subject or not. All of those scenes will very likely have the same or similar bad audio timing. It appears that the audio is always "late" in the scenes you posted, so the remaining audio for that scene would be located later in the clip. Unfortunately, if that clip is cut too early when the scene changes and if the next scene was discarded, then part of the audio for that scene can't be retrieved. That will be a setback.

    On the other hand, if you can locate a few scenes that were originally together in the original capture, joining them temporarily, you could re-sync those scenes together and save them again. But I have a feeling it will take quite a while just to get those scenes together. I have also seen where someone made a new capture but saved only the audio to sav space. That was a headache, but at least everything that could be heard was in one file.

    As far as I know, and as I told manono, it's apparently not possible to simply load an audio .wav by itself into VirtualDub. I've tried it several times. VirtualDuib expects a video to be loaded before it will open an audio file from another location. If you want to extract only parts of an audio file, it can be done with the free Audacity program.

    I have several terabytes of 25 to 50 GB captures that are all on external hard drives. Several of these drives are inexpensive USB drives. These 2.5" USB drives are too slow for real-time or continuous work. Instead, I simply open one of those captures in VirtualDub, extract the scene or scenes I want, and put the drive away. One drive contains many hours of short TV commercials that I taped in the 1980's and 1990's, captured to my PC, and then saved to an external drive (examples of very humorous or artistic commercials). This means that the fast internal hard drives in my PC's are used only for capturing and processing, not for permanent backup. There is no way that I could keep all those external drives in my computers: I would need a PC the size of a large office filing cabinet, not a computer.
    Last edited by sanlyn; 19th Mar 2014 at 10:27.
    Quote Quote  
  26. Another source for the problem is when the audio and video are of different lengths. For example, when the audio ends before the video, is shorter than the video. When playing that single clip the audio is in perfect synch. When another clip is joined after it the audio for the second clip which might have been in perfect synch when played on its own is suddenly thrown out of synch as it 'slides' into the empty space of the earlier audio. Not sure if that makes sense or not. But if you have clips that seemed to be in perfect synch that became out of synch only after being joined to another, that's a likely cause. The remedy is to add silence to the end of that clip. Or to use a joining program that takes this into account. I believe MPEG2Cut2 does, for MPEG video. AviSynth's AlignedSplice should also take care of the problem:

    http://avisynth.nl/index.php/AlignedSplice

    But each individual clip has to be in synch to begin with for that to work. With the clips joined with AlignedSplice you can 'SaveWAV' to extract it if you wish. I wouldn't want to deal with these synch issues once the clips are joined as it's a nightmare. And I'd want to make damned sure none of this was caused by the dropping of frames during capture.
    Last edited by manono; 9th Dec 2013 at 22:12.
    Quote Quote  
  27. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    An example of joining videos in Avisynth with AlignedSplice ("++") and UnalignedSplice ("+"). I joined the two re-synced e and b files. the re-synced "e" file is the longer one, the re-synched "b" file is the short one. The "b" file plays last and is the clip where the boy presses the big button on the toy. The clips play twice in each video: e - b - e -b.

    AlignedSplice: pressing on the button has audio in sync.
    UnalignedSplioce: the pressed button is out of sync.

    AlignedSplice:
    Code:
    v1=AViSource("Drive:\path\to\video\e resync.avi")
    v2=AViSource("Drive:\path\to\video\b resync.avi")
    v3=v1++v2
    return v3
    UnalignedSplice
    Code:
    v1=AViSource("Drive:\path\to\video\e resync.avi")
    v2=AViSource("Drive:\path\to\video\b resync.avi")
    v3=v1+v2
    return v3
    Note that the reason unaligned splice doesn't work here is because the audio in the first audio-modified clip ends several frames before the second clip begins.
    Last edited by sanlyn; 19th Mar 2014 at 10:27.
    Quote Quote  
  28. Member
    Join Date
    Jan 2006
    Location
    South Africa
    Search Comp PM
    Thanks for the comments.

    To get started, I need two questions that I am not clear if they have been answered:

    1. I need to identify which clips have a delay, so I can put these in one folder. Should I play them in one of the players like VLC media player, MPC, etc and with simple observation see if they are in sync, or load them into my Vegas Pro and see if there is a discrepancy between A and V?
    2. Establish the length of the discrepancy probably with "skew" (Try a number of values until the audio and video sync) and then save with Virtualdub.
    Opinions on this, please?


    Thanks
    Albie
    Quote Quote  
  29. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Originally Posted by avz10 View Post
    Thanks for the comments.

    To get started, I need two questions that I am not clear if they have been answered:

    1. I need to identify which clips have a delay, so I can put these in one folder. Should I play them in one of the players like VLC media player, MPC, etc and with simple observation see if they are in sync, or load them into my Vegas Pro and see if there is a discrepancy between A and V?
    2. Establish the length of the discrepancy probably with "skew" (Try a number of values until the audio and video sync) and then save with Virtualdub.
    Opinions on this, please?
    1. You can play them in any player. I used VirtualDub. You will have to open them in VirtualDub anyway to observe the audio and re-set sync.

    2. When you are ready to save the file, set the "Video" drop-down menu to "fast recompress". Set the "Audio" drop-down menu to "full processing mode". The save the AVI.
    Last edited by sanlyn; 19th Mar 2014 at 10:28.
    Quote Quote  
  30. 1. You play them since you've said they all have zero delay. They have zero delay yet they're out of synch. Personally, I would never use VDub as a player for something like this. None of this tells you, if a video is in synch, whether or not the audio and video are of different lengths and will get out of synch when joined to something else.

    2. You play them. You don't test out various delays by setting an audio skew and saving out a new video. That'll take forever. You use a player (MPC-HC, MPC-BE) which can adjust the delay on the fly in 10ms increments until you find out what it is. Only after you've established what the delay is do you fix it in VDub. And, once again, none of this tells you whether or not it'll go out of synch when joined with something else.

    If you capped lossless with WAV audio, nothing should ever have gotten out of synch to begin with. Either the cap itself or the later editing you did is responsible, I suspect.
    Quote Quote  



Similar Threads

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