View Full Version : Deinterlacing content that has both 29.97 progressive and interlaced portions
fatpizza
18th February 2016, 14:15
I've done a search on the forum but haven't been able to find any solutions that work for me.
Basically I have a video source which alternates between fully interlaced 29.97fps content and fully progressive content.
What I want to do is 'bob' the interlaced content to 59.94fps but leave the progressive content as is by creating duplicate frames. I can do this with Handbrake by choosing the bob decomb filter and manually setting the output fps to 59.94fps, but I've become a fan of avisynth through ripbot and I'm determined to figure this out.
The main one I tried was TDeint using the rather simple script:
TDeint(mode=1,full=false).
The issue was that even though I set full to false, the progressive frames are still being deinterlaced as I can see shimmering on angled edges and blended frames on movement.
Any better alternatives I can try? Does qtgmc have a comb detection? Example scripts would be appreciated.
Sharc
18th February 2016, 14:41
Are you sure it's not telecined material?
Can you upload a sample which includes a progressive and an interlaced section?
Edit:
When you step through the frames do you see something like: PPPIIPPPIIPPPII.... with P=progressive and I=Interlaced frames?
If so, it is telecined material which you should IVTC (inverse telecine) instead of deinterlace.
fatpizza
18th February 2016, 16:05
It's definitely not telecined. I have a good eye for that. :P
For the most part on second inspection it looks ok, but there are moments where it seems to be interpolating instead of duplicating frames. Such as the part showing the stadium, and the earlier part where there's a upwards pan looking at the bridge. If you do a step by step you can tell there's changes in the frames even though they should be duplicated.
Here's a raw clip from the Blu-ray:
http://www.solidfiles.com/d/bb49a044cc/
Here's the processed clip:
http://www.solidfiles.com/d/066d37afeb/
Sharc
18th February 2016, 18:23
Interesting clip indeed:
A) Up to frame 212 the clip is progressive video which is encoded as interlaced for blu-ray standards compliance.
B) Frame 213 to 293 (blue team) is poorly 24 => 30 converted: 2 duplicated progressive frames out of 5 like A B C D D A B C D D ...... (also called 2:2:2:4 pulldown). Creates judder.
C) Frame 293 to about 300 (banner) starts truly interlaced with every second field slightly blended, before it ...
D) ... changes with a hickup to progressive video, encoded interlaced with one field slightly blended
E) Frame 358 ....505 progressive video encoded as interlaced
F) Frame 506 .... 563 is the only truly interlaced section in this clip!
G) Frame 564 .... 612 (end) is again poor 24 => 30 conversion (judder, same as section B)
I didn't check your processed version.
With all 59.94 progressive 1920x1080 you may risk player incompatibility. The short Section F) is the only true interlaced scene which can immediately benefit from bobbing for preserving motion fluidity (but the player+TV would do this anyway). But you have to try what is/looks best for you.
fatpizza
19th February 2016, 00:14
Thanks for all the info, it's really interesting how mixed this clip is. However I'm quite happy with how TDeint is handling the interlaced and combed content, it's the fact that it seems to be processing some of the progressive content even though I've put full=false into the script. That's why I uploaded the processed script as well just so you have an idea as to what it's doing.
As for player compatibility I used Kodi on my HTPC so that's not an issue. I own this disc so there's no problem with watching it elsewhere.
fatpizza
19th February 2016, 09:56
OK, I've gotten something I'm happy with. It turns out that there is some telecined content in there as well. Also I looked really closely as the progressive images I thought were being deinteraced and I can see very minor combing or shimmering that was probably interpreted as such. Anyways I tried using tfm and then passing the deinterlacing onto TDeint, but even using hints etc. the field order wasn't coming out right. I used telecide instead of tfm and everything seems to work fine now. Although there are still some badly done parts of the video at least I know I'm doing the best I can to clean it up.
I am a bit confused about why I was having field order issues with tfm though.
I told it to use pp=1, then I set field order within TDeint to 1 as well but it came out horribly.
Sharc
19th February 2016, 14:06
Section B) and G) are 2:2:2:4 pulldown, if you mean these by telecined. TFM() or telecide() do not make much sense IMO.
Tdecimate() would remove the pulled down repeated frame in these 2 sections, but make all the rest of the clip jerky.
If you want to clean up the clip I would suggest to use QTGMC() or even QTGMC(preset="fast"), nothing else. It would bob everything to 59.94 and clean up any residual combing.
fatpizza
19th February 2016, 14:25
Section B) and G) are 2:2:2:4 pulldown, if you mean these by telecined. TFM() or telecide() do not make much sense IMO.
Tdecimate() would remove the pulled down repeated frame in these 2 sections, but make all the rest of the clip jerky.
If you want to clean up the clip I would suggest to use QTGMC() or even QTGMC(preset="fast"), nothing else. It would bob everything to 59.94 and clean up any residual combing.
Firstly, I really appreciated the tips. :)
Secondly, sorry for the confusion but the hard-telecined segment wasn't inside the clip I uploaded. It was just afterwards.
I've heard a lot of good things about QTGMC, but it confuses me a little bit. When I downloaded it, it wasn't a dll plugin like everything else but an avsi file. Where do I put the file and how do I invoke it into an avisynth script? Do I just load it like a normal plugin?
Also how does QTGMC handle sources which have both progressive and interlaced frames? When I was looking at the options I couldn't find a parameter for it to only process combed frames.
Also can I use it as a post process after setting the telecide parameter to post=1?
Sharc
19th February 2016, 14:48
Download the 2 packages
- QTGMC v3.32
- Plugins package
from here:
http://forum.doom9.org/showpost.php?p=1423459&postcount=1
(You may have to use one of the mirrors)
Open the .zip and look for files "where to put ...txt" and follow the instructions accordingly.
The .avsi goes into the Avisynth Plugins folder
And yes, you can use QTGMC for post-processing as well.
fatpizza
19th February 2016, 15:01
Thanks again. :)
Are you able to comment on how QTGMC handles progressive frames within mixed sources? I haven't found anything definitive about it.
Sharc
19th February 2016, 15:14
I don't know the details, but it handles it well.
As you want to bring up everything to 59.94 you would operate QTGMC in its default bobbing mode (mode=0).
When the footage is progressive video, I assume it will separate the fields and process these accordingly. The "progressive" parts of your clip are encoded or flagged as interlaced anyway for Blu-ray compliance.
You just have to see how clean it looks.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.