JnZ
16th February 2006, 23:43
Hi evryone,
I want to ask everyone, who gets some skills with good IVTC method for HDTV .ts files, and share my experiances too, of course.
Last few months I do some HDTV encodings (.ts 1080i -> 720p XviD). But after testing many 29,97->23.976 conversion filters discovered this:
Some HDTV's is FILM > 95%, so this isn't problem, but I met some pieces, which was film, but manytimes switched to "interlaced". When uses "Forced film" in DGindex, gets video, which was choppy.
So I analyzed this types HDTV's and discovered this:
Frames are stored: (P - progresive, I - interlaced)
P P P I I P P P I I P P P I I P P P I I ........
- Two interlaced frames contains four fields 0,1,2,3, fields 1+2 are my wanted progresive frame.
- Problem is, this pattern usual changes few times in whole video (someone cut-out adverts?).
Tried:
1)
doubleweave()
pulldown(0,3)
Result: Choppy in some scenes.
2)
Telecide(order=1,guide=0).Decimate()
Result: Ok, but little slow and no good quality
Today I make own script exactly "made-by-measure" for this purpose. It make fully progresive 23.976fps video, and can be adapted for many HDTV (but maybe for many not?). You must only manually find cutting points and rewrite this frames.
LoadPlugin("DGDecode.dll")
mpeg2source("blablabla.d2v") #project from dgindex, don't check forced film!
crop(0,0,1920,1080) #crop as you need
#this is first part of video
video1 = trim(4,80647)
I1 = video1.SelectEvery(5,3,4).SeparateFields().SelectEvery(4,1,2).Weave()
P11 = video1.SelectEvery(5,0)
P21 = video1.SelectEvery(5,1)
P31 = video1.SelectEvery(5,2)
Video1 = Interleave(P11,P21,P31,I1)
#this is second part of video
video2 = trim(80648,171976)
I2 = video2.SelectEvery(5,3,4).SeparateFields().SelectEvery(4,1,2).Weave()
P12 = video2.SelectEvery(5,0)
P22 = video2.SelectEvery(5,1)
P32 = video2.SelectEvery(5,2)
Video2 = Interleave(P12,P22,P32,I2)
#this is third part of video
video3 = trim(171977,193518)
I3 = video3.SelectEvery(5,3,4).SeparateFields().SelectEvery(4,1,2).Weave()
P13 = video3.SelectEvery(5,0)
P23 = video3.SelectEvery(5,1)
P33 = video3.SelectEvery(5,2)
Video3 = Interleave(P13,P23,P33,I3)
return (video1+video2+video3).LanczosResize(1280,720) #I want 720p output
- video1+2+3 = 3 parts, which had "shifted" pattern. You may extend for more parts as you wants.
- You must find cutting points manually, then find next first I-frame, and your frame is: ([this I-frame] - [3]).
- best way is disable LanczosResize and first looks, if all frames are deinterlaced properly, then activate resize.
I'm apologizing for this long "spam", but many HDTV's is too different, and good script/filter is welcomed.
If you know better way, pls share. Thx.
Johnny
I want to ask everyone, who gets some skills with good IVTC method for HDTV .ts files, and share my experiances too, of course.
Last few months I do some HDTV encodings (.ts 1080i -> 720p XviD). But after testing many 29,97->23.976 conversion filters discovered this:
Some HDTV's is FILM > 95%, so this isn't problem, but I met some pieces, which was film, but manytimes switched to "interlaced". When uses "Forced film" in DGindex, gets video, which was choppy.
So I analyzed this types HDTV's and discovered this:
Frames are stored: (P - progresive, I - interlaced)
P P P I I P P P I I P P P I I P P P I I ........
- Two interlaced frames contains four fields 0,1,2,3, fields 1+2 are my wanted progresive frame.
- Problem is, this pattern usual changes few times in whole video (someone cut-out adverts?).
Tried:
1)
doubleweave()
pulldown(0,3)
Result: Choppy in some scenes.
2)
Telecide(order=1,guide=0).Decimate()
Result: Ok, but little slow and no good quality
Today I make own script exactly "made-by-measure" for this purpose. It make fully progresive 23.976fps video, and can be adapted for many HDTV (but maybe for many not?). You must only manually find cutting points and rewrite this frames.
LoadPlugin("DGDecode.dll")
mpeg2source("blablabla.d2v") #project from dgindex, don't check forced film!
crop(0,0,1920,1080) #crop as you need
#this is first part of video
video1 = trim(4,80647)
I1 = video1.SelectEvery(5,3,4).SeparateFields().SelectEvery(4,1,2).Weave()
P11 = video1.SelectEvery(5,0)
P21 = video1.SelectEvery(5,1)
P31 = video1.SelectEvery(5,2)
Video1 = Interleave(P11,P21,P31,I1)
#this is second part of video
video2 = trim(80648,171976)
I2 = video2.SelectEvery(5,3,4).SeparateFields().SelectEvery(4,1,2).Weave()
P12 = video2.SelectEvery(5,0)
P22 = video2.SelectEvery(5,1)
P32 = video2.SelectEvery(5,2)
Video2 = Interleave(P12,P22,P32,I2)
#this is third part of video
video3 = trim(171977,193518)
I3 = video3.SelectEvery(5,3,4).SeparateFields().SelectEvery(4,1,2).Weave()
P13 = video3.SelectEvery(5,0)
P23 = video3.SelectEvery(5,1)
P33 = video3.SelectEvery(5,2)
Video3 = Interleave(P13,P23,P33,I3)
return (video1+video2+video3).LanczosResize(1280,720) #I want 720p output
- video1+2+3 = 3 parts, which had "shifted" pattern. You may extend for more parts as you wants.
- You must find cutting points manually, then find next first I-frame, and your frame is: ([this I-frame] - [3]).
- best way is disable LanczosResize and first looks, if all frames are deinterlaced properly, then activate resize.
I'm apologizing for this long "spam", but many HDTV's is too different, and good script/filter is welcomed.
If you know better way, pls share. Thx.
Johnny