Log in

View Full Version : BWDIF for VS


kolak
14th February 2020, 16:33
https://ffmpeg.org/ffmpeg-filters.html#toc-bwdif

Fairly new deinterlacing filter in ffmpeg. Good results for given speed. Could we get vs port?

Jukus
14th February 2020, 21:52
Is it better than QTGMC?

kolak
16th February 2020, 18:39
No, but 10x faster and much better than Yadif itself.
QTGMC even with Very Fast preset is still to slow for some usage.

Jukus
16th February 2020, 21:32
I don’t understand why some people complain about the speed of QTGMC, I calmly encode DVDs with Very Slow, while somewhere around 65% of the CPU’s resources go to encoding, not filtering. I can watch dvd in real time with Slower in VS Editor. In doing so, I use a CPU that is almost 10 years old.

kolak
16th February 2020, 22:38
Try HD :)
Besides- I don't trip DVDs but use QTMC on 1000s HD masters. Even 72 cores machines don't help.

Jukus
16th February 2020, 23:10
I use Fast for BD, 80-90% of the CPU is used for encoding.

poisondeathray
17th February 2020, 02:19
Try HD :)
Besides- I don't trip DVDs but use QTMC on 1000s HD masters. Even 72 cores machines don't help.

Did you look at the cuda ktgmc version for avisynth ? If you have fast GPU it could be your answer

Jukus
17th February 2020, 10:11
Interestingly, there is a https://handbrake.fr/downloads.php where it is suggested to use Yadif+EEDI2 - it's something incredible :confused:

Blue_MiSfit
18th February 2020, 02:26
I use bwdif in ffmpeg and am quite happy with it :)

kolak
18th February 2020, 21:39
Did you look at the cuda ktgmc version for avisynth ? If you have fast GPU it could be your answer

I got Tesla K80 old but not that bad.
KTGMC looks interesting, but still sort of beta. I need something 99.9% reliable :)

kolak
18th February 2020, 21:57
I probably would just use yadifmod(clip, order=1, mode=1, edeint=nnedi3(clip, field=3, nns=0)) for a quick and dirty deinterlacing.

It has to be fairly decent, not dirty :)
QTGMC (Very Fast) or BWDIF quality.
It runs over script which detects progressive parts and these are passed through. QTGMC is good as even if there is some false detection it doesn't look that different than next original frame.

Any suggestion? Tried other filters but somehow QTMC performs the best, but it's relatively slow. Any way to speed up Very Fast preset?

Cary Knoop
18th February 2020, 22:12
I don't see much of a point using QTGMC if you use the 'very fast' preset.

Some people want to eat the cake and have it. but you can't!

Doing a good deinterlacing cost computer time.

kolak
18th February 2020, 22:20
This is the point- it's still relatively good compared to other filters.

Jukus
18th February 2020, 22:26
I don't see much of a point using QTGMC if you use the 'very fast' preset.

Some people want to eat the cake and have it. but you can't!

Doing a good deinterlacing cost computer time.
I completely agree, in the worst case, can use Faster for a new high-quality BD and Slower for dvd, otherwise it makes no sense, can use any one-button converter.

kolak
18th February 2020, 22:35
It's used in totally different workflows than ripping BDs/DVDs. Very different world. There are sometimes 100s files a day. No time for any tweaking- you do it at some acceptable quality. If quality is not good enough client will reject.
It still makes perfect sense as other methods leave more deinterlacing 'signs'. I do use yadifmod in some cases (less demanding clients).

Sharc
24th February 2020, 10:34
https://ffmpeg.org/ffmpeg-filters.html#toc-bwdif

Fairly new deinterlacing filter in ffmpeg. Good results for given speed. Could we get vs port?
https://github.com/HomeOfVapourSynthEvolution/VapourSynth-Bwdif

kolak
28th February 2020, 21:30
:thanks:a lot!

Lets try it :)

Cary Knoop
29th February 2020, 00:15
Not impressed at all with this bwdif deinterlacer, QTGMC makes spaghetti out of it!

kolak
29th February 2020, 01:12
It's for speed, not quality :)
What is the difference in speed against QTGMC?

richardpl
12th January 2021, 20:25
What is QTGMC actually? NNEDI3 or EEDI3 or EEDI2 or something completely else?

Jukus
12th January 2021, 20:56
What is QTGMC actually? NNEDI3 or EEDI3 or EEDI2 or something completely else?
QTGMC is a whole complex of filters (noise reduction, anti-aliasing and others).
The default is NNEDI3, but can choose another plugin.

LoRd_MuldeR
13th January 2021, 18:22
QTGM evolved from TempGaussMC (http://avisynth.nl/index.php/TempGaussMC), originally created by Didée. It is "a motion-compensated bob deinterlacer, based on temporal gaussian blurring".

It is a highly complex Avisynth script, using all sorts of plug-ins. Most notably but not limited to MVTools2 (motion compensation), MaskTools v2 (masking), NNEDI3 (interpolation) as well as RemoveGrain (denoising).

The core algorithm is this:
Bob the source clip. Temporally smooth the bob to remove shimmer then analyse its motion
More accurately interpolate the source clip (e.g. NNEDI3). Use the motion analysis from previous step to temporally smooth this interpolate with motion compensation. This removes shimmer whilst retaining detail. Resharpen the result to counteract any blurring
A final light temporal smooth to clean the result
Stages 0 & 1 use a binomial smooth (similar to a Gaussian) to remove deinterlacing shimmer. Stage 2 uses a simple linear smoothing.


NNEDI/2/3 and EEDI2/3 "only" are interpolators.

Simply put, they take an image with only half the lines (one field) and interpolate the missing lines. That alone would not make good deinterlacer, but it is an important "ingredient" for implementing stuff like QTGMC.

(Well, I think NEEDI3 alone would make a decent half-rate deinterlacer, but you do not want to use "pure" NEEDI3 for bobbing)

kolak
19th January 2021, 21:59
BWDIF is "based on yadif with the use of w3fdif and cubic interpolation algorithms".
Could we replace w3fdif/cubic part for nnedi3 (or this filter described below) to have less jagged lines?
There is also very new deinterlacing filter in ffmpeg called estdif which is based on "Edge Slope+Tracing Deinterlacing Filter".
It seems to be some new approach and results are quite good, but can still produces jagged lines for static parts of image (this is where yadif is good). For actual combing removal it works very well- smooth diagonals and speed is not crazy bad.

Actually yadif could be bumped to yadifmod and then new interpolation filter. Could be best speed vs quality filter out there.

Selur
21st April 2025, 12:05
using:
clip = core.bwdif.Bwdif(clip, field=3)
on the source from https://forum.videohelp.com/threads/418101-QTGMC-made-a-logo-flicker
the first two frames are not deinterlaced.
Am I missing something?

PatchWorKs
23rd April 2025, 11:19
...pretty old 3ad, anyway for those who're looking for performances, there's also HW-deinterlacing (in QSV (https://github.com/rigaya/QSVEnc#readme)/NV (https://github.com/rigaya/NVEnc#readme)-Encs for example) nowdays...