absinthe
10th September 2004, 13:49
So, I've been struggling for about a week to combine two SVCD MPG's into one movie. Both of the SVCD's themselves were fine, but whenever I would combine them together in this fashion
Movie=DirectShowSource("MY_DISC_1.MPG")+DirectShowSource("MY_DISC_2.MPG")
... the audio beginning at the point of the second CD would go slightly out of sync, just enough to be visibly annoying.
Another problem was that not only was the aspect ratio off (too tall) in the first disc, it was also too tall in the first half of the second disc and then wrong in another way (slightly too skinny) in the second half of the second disc.
Well, to make a long story short, I finally came up with this. As contorted as it seems, it actually works!! :D
## Fixing the audio offset in the second disc only
Movie1=DirectShowSource("MY_DISC_1.MPG")
Movie2=DirectShowSource("MY_DISC_2").DelayAudio(-0.3)
## Combining the two into one movie
WholeMovie=Movie1++Movie2
## Correcting the aspect ratio in two spots
FirstTrim=WholeMovie.Trim(0,159007).Crop(0,20,352,200).LanczosResize(352,174).AddBorders(0,33,0,33)
SecondTrim=WholeMovie.Trim(159008,0).Crop(0,40,352,156).LanczosResize(352,174).AddBorders(0,33,0,33)
## Final movie product
FirstTrim++SecondTrim
#### other postprocessing filters here ###
Everything actually worked. I am constantly amazed every day at the things you can do with AviSynth.
Anyone know of a way I could have done it more simply, or differently at all?
-abs
Movie=DirectShowSource("MY_DISC_1.MPG")+DirectShowSource("MY_DISC_2.MPG")
... the audio beginning at the point of the second CD would go slightly out of sync, just enough to be visibly annoying.
Another problem was that not only was the aspect ratio off (too tall) in the first disc, it was also too tall in the first half of the second disc and then wrong in another way (slightly too skinny) in the second half of the second disc.
Well, to make a long story short, I finally came up with this. As contorted as it seems, it actually works!! :D
## Fixing the audio offset in the second disc only
Movie1=DirectShowSource("MY_DISC_1.MPG")
Movie2=DirectShowSource("MY_DISC_2").DelayAudio(-0.3)
## Combining the two into one movie
WholeMovie=Movie1++Movie2
## Correcting the aspect ratio in two spots
FirstTrim=WholeMovie.Trim(0,159007).Crop(0,20,352,200).LanczosResize(352,174).AddBorders(0,33,0,33)
SecondTrim=WholeMovie.Trim(159008,0).Crop(0,40,352,156).LanczosResize(352,174).AddBorders(0,33,0,33)
## Final movie product
FirstTrim++SecondTrim
#### other postprocessing filters here ###
Everything actually worked. I am constantly amazed every day at the things you can do with AviSynth.
Anyone know of a way I could have done it more simply, or differently at all?
-abs