1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Seperating AVI into pieces to rejoin them with seperate delays?

Discussion in 'DivX / XviD' started by KeyLee19, Mar 24, 2010.

  1. KeyLee19

    KeyLee19 Member

    Joined:
    Feb 27, 2010
    Messages:
    53
    Likes Received:
    0
    Trophy Points:
    16
    I have a DVD I have spent way too long on trying to fix. The movie starts off perfectly then after about 10mins. the audio/video sync is off by about a second/two. its not a constant growing delay in the movie as you would fix with frame rate changing/editing.. I tried fixing it that way. However, the problem is the higher I change the frame rate to offset that 1-2second jump around the 14min. mark it offsets the audio in the first 10mins., So short version I guess the first 14 or so mins. of the movie the audio/video lip sync is correct then at about 14mins. it jumps off a second or two immediately and then it may have the tiniest exponential offset growing for the rest of the movie after that also.

    So, I was wondering it it is possible to cut the movie with VirtualDub right before that 1-2second exponential growth save that portion, then edit the second portion with virtualdub to offset that tiny growing delay and save the rest of the movie in a second file and rejoin them making it a full movie again.. Or would that just put me back in square one with it being the first 14mins. fine then a 1-2sec. immediate growth w/very small exponential seperation on lip-sync the rest of the movie? Is there a program to conjoin them together again after fixing? Or maybe an easier way as frame rate changing is not solving the problem?

    Thanks in advance!
     
  2. attar

    attar Senior member

    Joined:
    Jun 17, 2005
    Messages:
    11,147
    Likes Received:
    41
    Trophy Points:
    128
    Assume the AVI movie is half good and half async:
    Load the AVI in VirtualDub.
    Select the first good part (highlight using the flags and slider and the little key frame selectors) and cut on a key frame.
    (you must use key frames else the file has to be recompressed)

    Under 'Video', select 'Direct Stream Copy' and save the first section.

    'Edit' > 'Cut' to remove the first part.

    Under 'Audio' > 'Interleaving', for 'Skew', insert the value that is the delay.

    Save the adjusted second part.
    Set the skew back to zero.

    Without closing VirtualDub, load the first good part and 'File' 'Append' the adjusted second part.

    Save the joined files.

    (if you are not sure of the delay, just save the second part without adjusting the skew. Open it in Media Player Classic and use the - or + keys to adjust the delay and note it)
    Set the skew value in VirtuaDub and save the adjusted file.
     
  3. KeyLee19

    KeyLee19 Member

    Joined:
    Feb 27, 2010
    Messages:
    53
    Likes Received:
    0
    Trophy Points:
    16
    Awesome, fantastic.. I am glad it is that simplistic and can be done with virtualdub. Thanks attar.
     
  4. KeyLee19

    KeyLee19 Member

    Joined:
    Feb 27, 2010
    Messages:
    53
    Likes Received:
    0
    Trophy Points:
    16
    For the first 14mins. the sound is perfect. I save that portion and then cut it out leaving the rest of the video. I set the delay to match the audio/video sync correctly right at the start but the rest of the movie that is left (14min. mark and on) has an increase in delay. Do I just save this portion of the movie and try to fix a frame rate issue that may be there in that portion. After I do this and get the frame rate to fix that second potion (majority of the video) corrected how can I Merge the then fixed portions back together? OR will it screw up the first portion of the movie since the frame rate is being changed on the second portion?
     
  5. attar

    attar Senior member

    Joined:
    Jun 17, 2005
    Messages:
    11,147
    Likes Received:
    41
    Trophy Points:
    128
    Run VirtualDub.
    Load the source avi file.
    Video > Direct Stream Copy
    Select and save part1 as before and cut.
    Video > Frame Rate > Source Rate Adjustment > Change so video and audio match (note the number shown).
    Save part2.

    Close VirtualDub

    Test part2
    If it's in sync, open VirtualDub - if it isn't, give up.
    Load part1, Video > Frame rate > Frame Rate Conversion > Convert to fps and insert the number that you noted.
    Set Video > Direct Stream Copy and save part1a.

    Close VirtualDub
    Open VirtualDub, load part1a.
    Append part2 - it will probably give an error so close VirtualDub because it's very finicky about frame rates.
    If they are not exactly the same, it won't join them.
    Try joining with AviDemux - it's more flexible.

    Run Avidemux.
    Load part1a and append part2
    Save with a new name (you have to include the extension, eg newfile.avi)
     
  6. KeyLee19

    KeyLee19 Member

    Joined:
    Feb 27, 2010
    Messages:
    53
    Likes Received:
    0
    Trophy Points:
    16
    Alright, I did what you said but I ran into another small problem. After Saving the Part1 (perfect sync). On part 2 I did the Video > Frame Rate > Source Rate Adjustment > Change however the audio was still off on part 2. I then opened Ifrate 1.10 and I tweaked the frame rate and got it working correctly. Part 2 now has perfect lip sync.. the problem I later ran into is I had to use Avidemux like you said because virtualdub is too picky on frame rate differences. I Open part 1 with this program and it says "Index is not up to date - You should use Tool->Rebuild frame. Do it now? (yes) (no) I choose yes and then I open the part 2 and it comes up with the same thing on the second and I hit yes again. Both files are now loaded but when I play the video in AVIdemux the first part is perfect sync but it resets the second part to being off-sync again. I figured it was because I hit yes on both so I reloaded the program and selected no on both and it causes the picture when playing to bounce up and down like crazy..

    So the question now is... Now that I have both portions seperated (one being 14mins., the other being 50mins.) can I merge them together without the second ones sound being reset back to the frame rate of the first or the first being set to the seconds frame rate as they are both in perfect sync seperately.
     
  7. attar

    attar Senior member

    Joined:
    Jun 17, 2005
    Messages:
    11,147
    Likes Received:
    41
    Trophy Points:
    128
    Did you try making the first part the same frame rate as the second?
     
  8. KeyLee19

    KeyLee19 Member

    Joined:
    Feb 27, 2010
    Messages:
    53
    Likes Received:
    0
    Trophy Points:
    16
    sorry I know this is insanely late but thought I would post back in case someone else in the future runs into same problem and they come across this posting to help them a bit. I tried making the first the same as the second after the seperation and fixing of the second parts sync. I still had no luck of merging them together without one resetting the other parts frame rate to its frame rate so they share the same. I think ive run out of options with this DVD so I believe my next option is im going to rip it back on my computer from the original disk as I did before and shrink it. After doing so I'll try converting it with handbrake to MP4 and see if I have the same problems as converting to AVI with AGK and Staxrip. I have been using hand brake a lot lately and out of every movie I have done so far I have not run into the syncing problem. i'll post back when I know if that works or not hopefully in the next day or so.
     
  9. KeyLee19

    KeyLee19 Member

    Joined:
    Feb 27, 2010
    Messages:
    53
    Likes Received:
    0
    Trophy Points:
    16
    Yeah, don't waste your time if your having the same problem I had. I converted to MP4 since I couldn't get the AVI in sync from the problem above. Just convert to MP4 with hand brake as it is perfectly in sync now.
     

Share This Page