View Full Version : Resynching A/V
EpheMeroN
18th April 2005, 08:51
I have an MPEG-1 video that goes out of sync about 5 different times in the video. I know how to correct audio / video sync in Vdub for 1 correction only, but when it goes out of sync around 5 different times and then resynchs, I don't know how to resync it. Is this possible in AviSynth?
IanB
21st April 2005, 15:20
...Source("video.mpg")
Part1=Trim(0, 1234)
Part2=Trim(1235, 4567)
Part3=Trim(4568, 9012)
Part4=Trim(9013, 12345)
Part5=Trim(12346, 0)
Part1=Part1.FixSegment1()
Part2=Part2.FixSegment2()
...
Part5=Part5.Fixsegment5()
Part1 ++ Part2 ++ Part3 ++ Part4 ++ Part5
IanB
EpheMeroN
21st April 2005, 20:05
Glad to see someone finally replied :-) but what does FixSegment() actually do? I've never seen / heard of that command before.
Wilbert
21st April 2005, 20:47
but what does FixSegment() actually do?
It fixes the segment.
I've never seen / heard of that command before.
That doesn't surprise me.
EpheMeroN
21st April 2005, 21:56
Well by fixing the segment... you mean that auto-resynchs the audio and video?
Wilbert
22nd April 2005, 09:58
Yes. Using DelayAudio (delays), and SSRC or ResampleAudio with AssumeSampleRate (stretching).
stickboy
22nd April 2005, 10:32
Originally posted by EpheMeroN
Glad to see someone finally replied :-) but what does FixSegment() actually do? I've never seen / heard of that command before. Uhm, you'll note that IanB used "FixSegment1", "FixSegment2", ...
These are functions that you are expected to write specifically to for those particular segments.
It's just an example. There is no magical "FixSegment" function.
PhillipWyllie
24th April 2005, 15:54
Why not do the same edits in VDubMPEG2, then save the wav(full processing mode).The resulting sound file will have the edits in them. A note though the sound must be in sync to start with.
stickboy
24th April 2005, 23:12
Originally posted by PhillipWyllie
Why not do the same edits in VDubMPEG2, then save the wav(full processing mode).The resulting sound file will have the edits in them. A note though the sound must be in sync to start with. Because as EpheMeroN said, he needs to resync it at five different places.
PhillipWyllie
25th April 2005, 01:51
Reason the sounds out of sync at 5 places is because he's edited 5 times.
stickboy
25th April 2005, 03:10
I'm not sure how you came to that conclusion. Perhaps someone edited the video five times, but it sounds like he's trying to fix an existing problem and doesn't have access to the original source. Most people don't start off with MPEG1 video by choice.
Mug Funky
25th April 2005, 05:44
i just had this problem with video that had several seconds of black between segments, but the audio did not.
try use audition or something similar (that loads video+wav) to find the correct edit points, then use either Cuttermaran (it wasn't behaving itself for me) or TMPG mpeg editor to cut the video down to the audio.
this way there's no need to re-encode the audio (which is good), and the only parts that get re-encoded in the video are where edits are made (ie, edit on a b-frame, and it gets re-encoded as an I-frame, along with anything else in the GOP that needs it).
note: with TMPGenc MPEG editor, you'll have to work backwards because it re-adjusts the timecodes after each edit (meaning you lose all your nice edit-points from Audition every edit unless you go from back-to-front). cuttermaran doesn't have this issue, but it may not behave itself for you either (it was seeking the wrong frames? messed up the output too).
EpheMeroN
25th April 2005, 19:17
Originally posted by PhillipWyllie
Reason the sounds out of sync at 5 places is because he's edited 5 times.
Very untrue. A friend of mine captured a tv show for me, and it had all these parts go out of sync. It's in sync usually for the majority of the video, then just goes out of sync at random 5 times, then goes right back to being in sync.
PhillipWyllie
25th April 2005, 21:23
Ok
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.