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. |
9th January 2024, 05:03 | #1 | Link |
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) 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 |
9th January 2024, 08:34 | #2 | Link |
Registered User
Join Date: May 2006
Posts: 4,015
|
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. |
9th January 2024, 16:12 | #3 | Link |
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. |
9th January 2024, 17:03 | #5 | Link | |
Registered User
Join Date: May 2006
Posts: 4,015
|
Quote:
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. |
|
9th January 2024, 19:25 | #6 | Link |
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. |
9th January 2024, 19:47 | #7 | Link | |||
Registered User
Join Date: Feb 2023
Posts: 10
|
Quote:
Sorry I should have been more clear, this is the answer to the question I didn't articulate before: is the artifact from TFM or from the source? Quote:
Quote:
|
|||
10th January 2024, 00:04 | #11 | Link | |
Registered User
Join Date: May 2006
Posts: 4,015
|
Quote:
Anyway the ugly artefacts have nothing to do with TFM or deinterlacing. It is baked into the video. |
|
11th January 2024, 16:12 | #12 | Link | |
Registered User
Join Date: Mar 2011
Posts: 4,897
|
Quote:
Metric=1 is often better at detecting very fine combing than the default metric. For PP=5, 6 or 7, TFM only de-interlaces where combing is detected rather than de-interlacing the whole frame. You can do something like this to see which parts of the frame are being de-interlaced to aid in adjusting TFM's combing detection. The parts of the frame being replaced with red are where combing is detected. A = last B = BlankClip(A, color=color_red) TFM(clip2=B, metric=1) |
|
1st May 2024, 05:35 | #13 | Link |
Registered User
Join Date: Jan 2015
Posts: 1,077
|
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. |
Thread Tools | Search this Thread |
Display Modes | |
|
|