k0r0n4
24th August 2004, 04:33
I'm doing a 3:2 pulldown on some video ripped from DVD, but even though I've figured out the field order, and gotten the 3:2 pulldown to work, I'm still having problems. In order to find the frame offset for the deinterlace, I made all 5 possibilities for the 3:2 pulldown and put them together using ShowFiveVersions.
Actually, it would be easier to explain if you just look at the script:
# Type A
#
# 0 1 2 3 4 5 6 7 8 9
# A1 A2 B1 A2 C1 B2 C1 C2 D1 D2
#
# 0, 1, 2, 5, 6, 7, 8, 9
# A1 A2 B1 B2 C1 C2 D1 D2
# Type B
#
# 0 1 2 3 4 5 6 7 8 9
# A1 D2 B1 A2 B1 B2 C1 C2 D1 D2
#
# 0, 3, 4, 5, 6, 7, 8, 9
# A1 A2 B1 B2 C1 C2 D1 D2
# Type C
#
# 0 1 2 3 4 5 6 7 8 9 10 11
# A1 xx A1 A2 B1 B2 C1 C2 D1 C2 xx D2
#
# 2, 3, 4, 5, 6, 7, 8, 11
# A1 A2 B1 B2 C1 C2 D1 D2
# Type D
#
# 0 1 2 3 4 5 6 7 8 9
# A1 A2 B1 B2 C1 C2 D1 C2 A1 D2
#
# 0, 1, 2, 3, 4, 5, 6, 9
# A1 A2 B1 B2 C1 C2 D1 D2
# Type E
#
# 0 1 2 3 4 5 6 7 8 9
# A1 A2 B1 B2 C1 B2 D1 C2 D1 D2
#
# 0, 1, 2, 3, 4, 7, 8, 9
# A1 A2 B1 B2 C1 C2 D1 D2
AviSource("video.avi")
AssumeFrameBased
SeparateFields
a = Weave(AssumeBFF(SelectEvery(10, 0,1, 2,5, 6,7, 8,9).Subtitle("Type A")))
b = Weave(AssumeBFF(SelectEvery(10, 0,3, 4,5, 6,7, 8,9).Subtitle("Type B")))
c = Weave(AssumeBFF(SelectEvery(10, 2,3, 4,5, 6,7, 8,11).Subtitle("Type C")))
d = Weave(AssumeBFF(SelectEvery(10, 0,1, 2,3, 4,5, 6,9).Subtitle("Type D")))
e = Weave(AssumeBFF(SelectEvery(10, 0,1, 2,3, 4,7, 8,9).Subtitle("Type E")))
ShowFiveVersions(a, b, c, d, e)
Now at first Type B looks good and is in synch with the video, performing a very good looking 3:2 pulldown, as seen here:
http://img.photobucket.com/albums/v16/yoitsmeremember/Doom9/img0.jpg
However, later in the video you start seeing interlaced frames on Type B, but a good looking pulldown on one of the other syncronizations, as can be seen here (NOTE: I couldn't find another frame where all but one of the types produced interlaced frames, but these two images were taken from frames that were VERY close to each other):
http://img.photobucket.com/albums/v16/yoitsmeremember/Doom9/img1.jpg
-AND-
http://img.photobucket.com/albums/v16/yoitsmeremember/Doom9/img2.jpg
Now Type D is the only successful pulldown.
It would appear that a "3:2 pulldown" isn't really what I need....or rather, that it won't suffice.
My guess is that the problem occures because after a 3:2 pulldown, the video is 23.976 FPS, and NOT 24 FPS. Could the slight difference have caused an extra interlaced or a dropped interlaced frame every now and then? And, if so, is there an easy way to correct such a problem (other than going through the video to manually find the extra/lost frame and decimating/adding it)?
EDIT: Removed BB IMG tags so text would fit on the page ;-)
Actually, it would be easier to explain if you just look at the script:
# Type A
#
# 0 1 2 3 4 5 6 7 8 9
# A1 A2 B1 A2 C1 B2 C1 C2 D1 D2
#
# 0, 1, 2, 5, 6, 7, 8, 9
# A1 A2 B1 B2 C1 C2 D1 D2
# Type B
#
# 0 1 2 3 4 5 6 7 8 9
# A1 D2 B1 A2 B1 B2 C1 C2 D1 D2
#
# 0, 3, 4, 5, 6, 7, 8, 9
# A1 A2 B1 B2 C1 C2 D1 D2
# Type C
#
# 0 1 2 3 4 5 6 7 8 9 10 11
# A1 xx A1 A2 B1 B2 C1 C2 D1 C2 xx D2
#
# 2, 3, 4, 5, 6, 7, 8, 11
# A1 A2 B1 B2 C1 C2 D1 D2
# Type D
#
# 0 1 2 3 4 5 6 7 8 9
# A1 A2 B1 B2 C1 C2 D1 C2 A1 D2
#
# 0, 1, 2, 3, 4, 5, 6, 9
# A1 A2 B1 B2 C1 C2 D1 D2
# Type E
#
# 0 1 2 3 4 5 6 7 8 9
# A1 A2 B1 B2 C1 B2 D1 C2 D1 D2
#
# 0, 1, 2, 3, 4, 7, 8, 9
# A1 A2 B1 B2 C1 C2 D1 D2
AviSource("video.avi")
AssumeFrameBased
SeparateFields
a = Weave(AssumeBFF(SelectEvery(10, 0,1, 2,5, 6,7, 8,9).Subtitle("Type A")))
b = Weave(AssumeBFF(SelectEvery(10, 0,3, 4,5, 6,7, 8,9).Subtitle("Type B")))
c = Weave(AssumeBFF(SelectEvery(10, 2,3, 4,5, 6,7, 8,11).Subtitle("Type C")))
d = Weave(AssumeBFF(SelectEvery(10, 0,1, 2,3, 4,5, 6,9).Subtitle("Type D")))
e = Weave(AssumeBFF(SelectEvery(10, 0,1, 2,3, 4,7, 8,9).Subtitle("Type E")))
ShowFiveVersions(a, b, c, d, e)
Now at first Type B looks good and is in synch with the video, performing a very good looking 3:2 pulldown, as seen here:
http://img.photobucket.com/albums/v16/yoitsmeremember/Doom9/img0.jpg
However, later in the video you start seeing interlaced frames on Type B, but a good looking pulldown on one of the other syncronizations, as can be seen here (NOTE: I couldn't find another frame where all but one of the types produced interlaced frames, but these two images were taken from frames that were VERY close to each other):
http://img.photobucket.com/albums/v16/yoitsmeremember/Doom9/img1.jpg
-AND-
http://img.photobucket.com/albums/v16/yoitsmeremember/Doom9/img2.jpg
Now Type D is the only successful pulldown.
It would appear that a "3:2 pulldown" isn't really what I need....or rather, that it won't suffice.
My guess is that the problem occures because after a 3:2 pulldown, the video is 23.976 FPS, and NOT 24 FPS. Could the slight difference have caused an extra interlaced or a dropped interlaced frame every now and then? And, if so, is there an easy way to correct such a problem (other than going through the video to manually find the extra/lost frame and decimating/adding it)?
EDIT: Removed BB IMG tags so text would fit on the page ;-)