Boulder
7th November 2004, 16:27
Hi all,
this question/problem derives from Scharfi's answer to my problem regarding converting Monty Python DVD's back to PAL.
He gave me the function to use on the interlaced based parts and I'm going to use Restore24 to get the progressive based parts restored. The source material is a mixture of these two cases and that's why I would like to treat them in the same script, combining the parts in the end and saving the intermediate file, which I would then process like a normal PAL encode.
My script is like this:
LoadPlugin("c:\progra~1\avisynth 2.5\cplugins\avisynth_c.dll")
LoadCPlugin("c:\progra~1\avisynth 2.5\cplugins\smartdecimate.dll")
video=MPEG2Source("c:\temp\dvd-rip\python\python.d2v",idct=7,cpu=4,ipp=true)
audio=WAVSource("g:\python\python.wav").ConverttoMono()
AudioDub(video,audio)
part1=Trim(0,1525).r24()
part2=Trim(1526,3753).ntsc2pal()
part3=Trim(3754,4345).r24()
part4=Trim(4346,7040).ntsc2pal()
part5=Trim(7041,7229).r24()
part6=Trim(7230,12696).ntsc2pal()
part7=Trim(12697,13734).r24()
part8=Trim(13735,26720).ntsc2pal()
part9=Trim(26721,27797).r24()
part10=Trim(27798,27992).ntsc2pal()
part11=Trim(27993,30056).r24()
part12=Trim(30057,36367).ntsc2pal()
part13=Trim(36368,47773).r24()
part14=Trim(47774,52780).ntsc2pal()
part15=Trim(52781,0).r24()
part1+part2+part3+part4+part5+part6+part7+part8+part9+part10+part11+part12+part13+part14+part15
function ntsc2pal(clip last){
x=KernelBob(order=1).AssumeFrameBased()
a=x.Trim(1,0).MergeLuma(x,0.5).MergeChroma(x,0.5)
b1=x.DeleteFrame(0).MergeLuma(x.DuplicateFrame(0),0.5).MergeChroma(x.DuplicateFrame(0),0.5)
b=b1.MergeLuma(x,0.5).MergeChroma(x,0.5)
Interleave(b,a).ChangeFPS(25)
}
function r24(clip last){
in=AssumeTFF().R24KernelBob(0)
out=AssumeTFF().MatchBob()
Restore24(in,out,1250,2997)
}
As I'm a total newbie when it comes to creating functions (I've studied very little C++ long time ago) and since there appears to be no tutorials regarding the matter, I need some help to get it working. Currently it only displays the last part (part15).
Could anyone please bash the thing in order?
this question/problem derives from Scharfi's answer to my problem regarding converting Monty Python DVD's back to PAL.
He gave me the function to use on the interlaced based parts and I'm going to use Restore24 to get the progressive based parts restored. The source material is a mixture of these two cases and that's why I would like to treat them in the same script, combining the parts in the end and saving the intermediate file, which I would then process like a normal PAL encode.
My script is like this:
LoadPlugin("c:\progra~1\avisynth 2.5\cplugins\avisynth_c.dll")
LoadCPlugin("c:\progra~1\avisynth 2.5\cplugins\smartdecimate.dll")
video=MPEG2Source("c:\temp\dvd-rip\python\python.d2v",idct=7,cpu=4,ipp=true)
audio=WAVSource("g:\python\python.wav").ConverttoMono()
AudioDub(video,audio)
part1=Trim(0,1525).r24()
part2=Trim(1526,3753).ntsc2pal()
part3=Trim(3754,4345).r24()
part4=Trim(4346,7040).ntsc2pal()
part5=Trim(7041,7229).r24()
part6=Trim(7230,12696).ntsc2pal()
part7=Trim(12697,13734).r24()
part8=Trim(13735,26720).ntsc2pal()
part9=Trim(26721,27797).r24()
part10=Trim(27798,27992).ntsc2pal()
part11=Trim(27993,30056).r24()
part12=Trim(30057,36367).ntsc2pal()
part13=Trim(36368,47773).r24()
part14=Trim(47774,52780).ntsc2pal()
part15=Trim(52781,0).r24()
part1+part2+part3+part4+part5+part6+part7+part8+part9+part10+part11+part12+part13+part14+part15
function ntsc2pal(clip last){
x=KernelBob(order=1).AssumeFrameBased()
a=x.Trim(1,0).MergeLuma(x,0.5).MergeChroma(x,0.5)
b1=x.DeleteFrame(0).MergeLuma(x.DuplicateFrame(0),0.5).MergeChroma(x.DuplicateFrame(0),0.5)
b=b1.MergeLuma(x,0.5).MergeChroma(x,0.5)
Interleave(b,a).ChangeFPS(25)
}
function r24(clip last){
in=AssumeTFF().R24KernelBob(0)
out=AssumeTFF().MatchBob()
Restore24(in,out,1250,2997)
}
As I'm a total newbie when it comes to creating functions (I've studied very little C++ long time ago) and since there appears to be no tutorials regarding the matter, I need some help to get it working. Currently it only displays the last part (part15).
Could anyone please bash the thing in order?