Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Newbies

Reply
 
Thread Tools Search this Thread Display Modes
Old 9th January 2024, 05:03   #1  |  Link
VictiniSter
Registered User
 
Join Date: Feb 2023
Posts: 10
Any way to improve deinterlacing quality?

So I got this interlaced video I'm trying to deinterlace however I am curious if there's anyway to further reduce the noticeable artifacts from deinterlacing.

Below are three sets of screenshots to compare the quality of three different deinterlacers (well, two deinterlacers and one field matcher) I've tried TFM, TDeInt, and QTGMC+.

I should clarify that the source I'm working with I believe does not contain progressive frames, I believe most if not all the frames are interlaced.
Here's a five minute sample for anyone to double check

The following sets of screenshots are ordered as follows from top to bottom:
- raw (only using source filter)
- TFM
- TDeInt
- QTGMC+

Here are the various function calls I used when using the various deinterlacers, note these were not all in the script at once, just one at a time.

Code:
QTGMCp(preset="Slower", FpsDivisor=2)
TDeint()
tfm(PP=5, cthresh=8)
Frame 1:
https://i.ibb.co/857Qwxm/pressure-point-1-raw.png
https://i.ibb.co/518jRwZ/pressure-point-1-tfm.png
https://i.ibb.co/PmD8H6j/pressure-point-1-tdeint.png
https://i.ibb.co/pbhpxTb/pressure-point-1-qtgmcp.png

Frame 2:
https://i.ibb.co/QKkSwyV/pressure-point-2-raw.png
https://i.ibb.co/FqXyhmv/pressure-point-2-tfm.png
https://i.ibb.co/SwStrvH/pressure-point-2-tdeint.png
https://i.ibb.co/PGY37ss/pressure-point-2-qtgmcp.png

Frame 3:
https://i.ibb.co/3yhnh0h/pressure-point-3-raw.png
https://i.ibb.co/tpx8PgY/pressure-point-3-tfm.png
https://i.ibb.co/2g15GcF/pressure-point-3-tdeint.png
https://i.ibb.co/ZGySsC3/pressure-point-3-qtgmcp.png

Frame 4:
https://i.ibb.co/bLnk7fc/pressure-point-4-raw.png
https://i.ibb.co/wW8L6Kp/pressure-point-4-tfm.png
https://i.ibb.co/8jNdbrm/pressure-point-4-tdeint.png
https://i.ibb.co/CWJw6Vv/pressure-point-4-qtgmcp.png

Thanks in advance
VictiniSter is offline   Reply With Quote
Old 9th January 2024, 08:34   #2  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 4,006
Taking a look at your 5 minutes sample:
Your source is not really interlaced IMO. It is just flagged as interlaced, but the video is progressive. Fields are pairwise from the same instant in time, means there is no motion between these fields.
Separate the fields and step through the fields and you will see that there is motion with every 2nd field only. If it would be truly interlaced you would see motion with every field advancement.
So deinterlacing is actually moot.
The combs you see on a progressive monitor is because the progressive video is field-shifted. The fields of a frame are taken from different progressive (movie) pictures rather than from the same movie picture. Field matching like TFM() will restore the progressive frames. (QTGMC includes field matching AFAIK ).
Did you somehow process it? Is it a TV recording/capture? If so, what tools did you use?
So my recommendation is to apply TFM(...). There may remain some orphaned fields though which TFM() deinterlaces depending on its post-processing (pp) options. You can also experiment which deinterlacer you want to kick in for best results where no field matches are found by TFM().

Analyzing single frames only can be misleading for drawing general conclusions as your examples above indicate.

Last edited by Sharc; 9th January 2024 at 15:12.
Sharc is offline   Reply With Quote
Old 9th January 2024, 16:12   #3  |  Link
VictiniSter
Registered User
 
Join Date: Feb 2023
Posts: 10
I see what you mean when you say there's only motion on every second field advancement, after adding in the SeparateFields call I see motion on every second frame (I assume every frame corresponds with every field advancement).

This source is a TV capture, it occurred to me that perhaps posting more of the source might be good to gauge what I'm working with in terms of preventing artifacts. The artifacts I'm talking about are where there's some form of outline, in between two full progressive frames, of an object in motion from one full progressive frame to the next. On every field advancement in sections where this artifact is present, you can see a lighter section of the frame moving between field advancements despite there being no motion in the rest of the frame.

Here's a 22 min long sample this time.

Note that the main places I'm having trouble with getting rid of artifacts are around the 10:22-10:32 mark.
VictiniSter is offline   Reply With Quote
Old 9th January 2024, 16:51   #4  |  Link
VictiniSter
Registered User
 
Join Date: Feb 2023
Posts: 10
Quote:
Originally Posted by eac3to_mod View Post
In the scene of the pilots in the cockpit, it's in the source and it's not field blending. There's nothing you can do about it.
I am referring to the scene with the woman in the cabin as she manipulates an oxygen mask and sits down.
VictiniSter is offline   Reply With Quote
Old 9th January 2024, 17:03   #5  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 4,006
Quote:
Originally Posted by VictiniSter View Post
I am referring to the scene with the woman in the cabin as she manipulates an oxygen mask and sits down.
As I wrote, don't throw deinterlacers to field-shifted (aka phase-shifted) video. It damages the video. Use Field matching only.
The ugly artifacts (banding and blocking) you are getting are most probably caused by the encoder. Was the encoding (with possibly deinterlacing the source?) done on the fly in real time? It's better to capture lossless or visually lossless and do the encoding offline to give the encoder sufficient time to do a decent job. Maybe it was already flawed in the TV broadcasted version?
There is not much to nil you can do about it now, as I see it.

Last edited by Sharc; 9th January 2024 at 17:33.
Sharc is offline   Reply With Quote
Old 9th January 2024, 19:25   #6  |  Link
VictiniSter
Registered User
 
Join Date: Feb 2023
Posts: 10
I got that artifact while using TFM FWIW with the same settings I put in the OP. My understanding is that TFM does field matching if it detects what it calls a "clean frame" which from my understanding means it doesn't detect enough combing in the frame. When it does detect enough combing that's when TFM performs deinterlacing.

Yeah I had a hunch that the banding and stuff I can't do much about, I'm recording off an h264 stream. Capturing straight from a cable box is a bit out of the question for me.

EDIT: or is it that when it detects a clean frame it just performs post processing and it does field matching when it detects a combed frame?

Last edited by VictiniSter; 9th January 2024 at 19:28.
VictiniSter is offline   Reply With Quote
Old 9th January 2024, 21:57   #7  |  Link
VictiniSter
Registered User
 
Join Date: Feb 2023
Posts: 10
For anyone (including myself) who finds this thread later on, setting the PP (post-processing) parameter of TFM to 0 seems to do field matching, but not look for or do anything with, any combed frames.
VictiniSter is offline   Reply With Quote
Old 10th January 2024, 00:04   #8  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 4,006
Quote:
Originally Posted by VictiniSter View Post
For anyone (including myself) who finds this thread later on, setting the PP (post-processing) parameter of TFM to 0 seems to do field matching, but not look for or do anything with, any combed frames.
Correct, as per its documentation. It's worth to study it.
Anyway the ugly artefacts have nothing to do with TFM or deinterlacing. It is baked into the video.
Sharc is offline   Reply With Quote
Old 1st May 2024, 05:35   #9  |  Link
Katie Boundary
Registered User
 
Katie Boundary's Avatar
 
Join Date: Jan 2015
Posts: 1,072
If what Sharc says is true, then use tfm(mode=0,pp=0,micmatching=0)

Setting mode and micmatching to 0 will mostly just speed things up slightly with no effect on quality or accuracy. Setting pp to 0 will improve accuracy/quality and also speed things up.
__________________
I ask unusual questions but always give proper thanks to those who give correct and useful answers.
Katie Boundary is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 19:34.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.