FeB
26th March 2014, 23:08
Hi, it's my first post here.
I've been encoding music DVDs to mkv/m4v using HandBrake for few years, but since almost all music DVDs are interlaced and HandBrake's decomb/deinterlace Yadif filter doesn't give very good quality, I decided to use QTGMC (with MeGui).
I have a lot of music DVDs where the main title is fully interlaced except for the first few seconds where there is a computer-made logo introduction that is progressive and should not be deinterlaced. For example, MTV Unplugged DVDs.
What I want is to write a code where I manually select which segments of the title I want to fully deinterlace and which ones I don't want to deinterlace.
Since I want double frame rate, the segments on the input that I don't want to be deinterlaced need to have frames duplicated (untouched) in the output.
I will use as example a NTSC DVD of mine where the first 17 seconds have a computer-made logo and text in a full black background and this segment should not be deinterlaced. The rest of the title, beginning in time 00:00:17 (hh:mm:ss) should be fully deinterlaced.
17 seconds * 59.94 frame/second = 1019 frames
(since 1019 is odd, I will use 1020)
So, what I want is:
- The first 1020 frames (from frame number zero to frame number 1019) in the 59.94fps h.264 output (which correspond to the first 510 frames from the 29.97fps DVD input) will not be deinterlaced, each frame from DVD source within this segment will only be duplicated untouched
- Starting on frame 1020 (which is the 1021th frame) until the end of the title, I want everything fully deinterlaced with double frame rate
I wrote this code:
initial_frame_to_deinterlace = 1020
ConditionalFilter(QTGMC(xxxxxxxx), TDeint(mode=1, full=false, cthresh=12, MI=256), "current_frame", ">", "initial_frame_to_deinterlace - 1", show=true)
("show=true" option in ConditionalFilter is only for testing)
It seems to work pretty good, but I'm not certain if TDeint is keeping frames untouched, only duplicating them. What do you think?
And I think using TDeint like this is a waste of CPU processing, because TDeint will have to check if each of the first 510 frames is interlaced (and of course using cthresh=12 and MI=256 in a computer-made logo which is progressive I guarantee that none of the first 510 frames will ever be detected as interlaced!). It's like using a cannon to kill a fly. Is there a simpler filter that I could use instead of TDeint, only to duplicate frames to double frame rate, keeping video/audio sync?
I've been encoding music DVDs to mkv/m4v using HandBrake for few years, but since almost all music DVDs are interlaced and HandBrake's decomb/deinterlace Yadif filter doesn't give very good quality, I decided to use QTGMC (with MeGui).
I have a lot of music DVDs where the main title is fully interlaced except for the first few seconds where there is a computer-made logo introduction that is progressive and should not be deinterlaced. For example, MTV Unplugged DVDs.
What I want is to write a code where I manually select which segments of the title I want to fully deinterlace and which ones I don't want to deinterlace.
Since I want double frame rate, the segments on the input that I don't want to be deinterlaced need to have frames duplicated (untouched) in the output.
I will use as example a NTSC DVD of mine where the first 17 seconds have a computer-made logo and text in a full black background and this segment should not be deinterlaced. The rest of the title, beginning in time 00:00:17 (hh:mm:ss) should be fully deinterlaced.
17 seconds * 59.94 frame/second = 1019 frames
(since 1019 is odd, I will use 1020)
So, what I want is:
- The first 1020 frames (from frame number zero to frame number 1019) in the 59.94fps h.264 output (which correspond to the first 510 frames from the 29.97fps DVD input) will not be deinterlaced, each frame from DVD source within this segment will only be duplicated untouched
- Starting on frame 1020 (which is the 1021th frame) until the end of the title, I want everything fully deinterlaced with double frame rate
I wrote this code:
initial_frame_to_deinterlace = 1020
ConditionalFilter(QTGMC(xxxxxxxx), TDeint(mode=1, full=false, cthresh=12, MI=256), "current_frame", ">", "initial_frame_to_deinterlace - 1", show=true)
("show=true" option in ConditionalFilter is only for testing)
It seems to work pretty good, but I'm not certain if TDeint is keeping frames untouched, only duplicating them. What do you think?
And I think using TDeint like this is a waste of CPU processing, because TDeint will have to check if each of the first 510 frames is interlaced (and of course using cthresh=12 and MI=256 in a computer-made logo which is progressive I guarantee that none of the first 510 frames will ever be detected as interlaced!). It's like using a cannon to kill a fly. Is there a simpler filter that I could use instead of TDeint, only to duplicate frames to double frame rate, keeping video/audio sync?