Log in

View Full Version : DeBlock_QED_MT2


Cunhambebe
6th September 2006, 19:06
I've seen some guys talking about this filter around here. I have an MPEG2 source showing some small blocking. I'd like to know where I can download the filter (maybe it is just a script) and the prerequisites for using it.
Thanks in advance.

foxyshadis
6th September 2006, 23:39
(responding to pm)

I already posted the link, but just for completeness: http://www.avisynth.org/mediawiki/wiki/Deblock_QED
The script is the filter, although it relies on a few dlls.

Requisite filters can almost always be found at warpenterprises (http://www.avisynth.org/warpenterprises/), like deblock and dctfilter. Only a few update enough to need checking elsewhere. Some people like to package scripts with all the filters they need, I just have a personal aversion to it.

Cunhambebe
7th September 2006, 03:32
Thanks for the input and for responding the pm. Now I guess I've got to figure out how to make it work :) This one seems difficult :D
Thank you.
Cheers,
Mark

Didée
7th September 2006, 08:17
Usage looks like

LoadPlugin("wherever\DGDecode.dll")
LoadPlugin("wherever\DCTFilter.dll")
LoadPlugin("wherever\mt_masktools.dll")

Import("wherever\DeBlock_QED_MT2.avs")

Mpeg2Source("wherever\yoursource.d2v")

deblock_qed( quant1=20,quant2=24, aOff1=2,bOff1=4,aOff2=4,bOff2=8 )

Note: the current script-internal defaults for those "Off" parameters are not very clever. The ones posted above I like more ... but as always, it highly depends on the source. What's good for one, might be miserably bad for another.

techmule
7th September 2006, 11:34
Usage looks like

LoadPlugin("wherever\DGDecode.dll")
LoadPlugin("wherever\DCTFilter.dll")
LoadPlugin("wherever\mt_masktools.dll")

Import("wherever\DeBlock_QED_MT2.avs")

Mpeg2Source("wherever\yoursource.d2v")

deblock_qed( quant1=20,quant2=24, aOff1=2,bOff1=4,aOff2=4,bOff2=8 )

Note: the current script-internal defaults for those "Off" parameters are not very clever. The ones posted above I like more ... but as always, it highly depends on the source. What's good for one, might be miserably bad for another.
And what kind of source are you talking about for your script.

Cunhambebe
7th September 2006, 13:39
Thanks to all who took time to respond.
At least my source is MPEG2 - a hybrid video that some sections present severe blocking. Since it is a hybrid video, I was thinking about following this tutorial
http://avisynth.org.ru/docs/english/advancedtopics/hybrid_video.htm
..on how to re-encode to 120fps, but this seems to be far away from my little knowledge :) lol
Thanks in advance. I'll try your script, Didée; using the filer and the requisites (Deblock, MaskTools 1.5x and DCTFilter). Thanks so much for your help. I'll reply as soon as I have the results here.

Cunhambebe
8th September 2006, 05:55
The script is not working. I've got an error message that says:
Script Error: there's no function named "binarize".
???
Anyone?
Thanks in advance.

foxyshadis
8th September 2006, 06:59
Binarize is part of masktools 1, and is only in the script for that. In MT2, it's mt_binarize. Sure you didn't mean to download the second one (for masktools 2)?

Cunhambebe
8th September 2006, 13:26
Thanks again for your help.
These are the versions of the filter I have downloaded:
-MaskTools v2 - alpha 2;
-DeBlock plugin for Avisynth 2.5
I used the filter for the first version, you were right. Using the filter for the MT2, I've got this error:
I don't know what "avsplugins" means...The applc. gives me the first line of the script for the filter...

-This is what my script looks like:

LoadPlugin("C:\unzipped\dgmpgdec148\DGDecode.dll")
LoadPlugin("c:\avs_filters\Decomb.dll")
LoadPlugin("C:\deblock_qed\dct\DCT.dll")
LoadPlugin("C:\deblock_qed\mt_masktools.dll")
Import("C:\deblock_qed\DeBlock_QED_MT2.avs")
LoadPlugin("C:\avs_filters\ColorMatrix\Release\colormatrix.dll")
MPEG2Source("C:\clodo.d2v", info=3).AudioDub(WavSource("C:\clodo.wav"))
ColorMatrix(hints=true, interlaced=true)
deblock_qed( quant1=20,quant2=24, aOff1=2,bOff1=4,aOff2=4,bOff2=8 )
FieldDeinterlace()
Trim(0,403)+Trim(2395,15174)+Trim(16857,17305)
Crop(6,0,-6,0)
Lanczos4Resize(640,480)
FadeOut(30)

I have put the dlls in that folder I named deblock_qed (unit C).
Thanks in advance :)

foxyshadis
8th September 2006, 20:25
Shoot, I uploaded my copy and forgot to strip the first line. If you remove the loadplugin line from the top of the script (or redownload) it'll work.

Didée
8th September 2006, 23:04
However Deblock_qed is not suited to be applied on interlaced footage.
It's the used "h.264" deblock-filter that assumes progressive content. The script function isn't really a deblocker on it's own ... it's fully based on the deblock() - filter, plus some mangling of it's result.

Cunhambebe
9th September 2006, 03:10
Thanks to you both who have replied to this thread.
foxyshadis: thanks for the input, but no, it doesn't work at all. Another error warning:

there's no function named dctfiler
(C:\debloq_qed\DeBlock_QED_MT2.avs,line 51)
(C:\clodo2.avs, line9)

-I really don't know what to do :(

Didée: thanks for the input. So what would you suggest me do? Using Deblock()? What about Blockbuster? I know you all are very advanced users - thanks for your patience, but's it's difficult to learn AviSynth :)

foxyshadis
9th September 2006, 05:47
DCTfilter is on warpenterprise's page, made by tom barry.

You could probably either separatefields or bob(0,0) first, depending on how tall the blocks are (which depends on how it was encoded). Or if you're aiming for progressive anyway, just do it after the ivtc/deinterlace.

Cunhambebe
9th September 2006, 22:10
Thanks for taking time to respond.
I had already downloaded DCTFilter, that's wny I don't know what the problem is...
Or if you're aiming for progressive anyway, just do it after the ivtc/deinterlace
-That's difficult to do this since my source is a hybrd video, most portions are interlaced 29,97, some portions are FILM at 29,97 (interlaced)...
I used this script (please note that I used blockbuster) - with no practical results at all. I also had to use Telecide after the Trim function, otherwise I would not work properly. Anyway, this is about deinterlacing. What about the Deblocking? Help is greatly appreciated. Thanks in advance.

LoadPlugin("C:\unzipped\dgmpgdec148\DGDecode.dll")
LoadPlugin("c:\avs_filters\Decomb.dll")
LoadPlugin("C:\avs_filters\ColorMatrix\Release\colormatrix.dll")
MPEG2Source("C:\clodo.d2v", info=3).AudioDub(WavSource("C:\clodo.wav"))
ColorMatrix(hints=true, interlaced=true)
BlockBuster(method="dither")
AssumeBFF()
Trim(0,403)+Trim(2395,15174)+Trim(16857,17305)
Telecide(guide=1)
Decimate(mode=1,threshold=1.0)
Crop(6,0,-6,0)
Lanczos4Resize(640,480)
FadeOut(30)

foxyshadis
9th September 2006, 22:27
Telecide/Decimate on hybrid video is pretty much guaranteed to have problems, especially without hybrid detection on. You'd be better off with TFM/TDecimate, which has extensive support for hybrid video; see VFR at the wiki (http://www.avisynth.org/mediawiki/wiki/VFR). Once you have it progressive, you can place Deblock_QED right after the IVTC.

Placing BlockBuster before the IVTC is somewhat dangerous for proper field detection, and AssumeBFF is already given by the MPEG2Source.

Are you sure you got DCTFilter, and not DCT, which is a different plugin? It seems from your previous script that they might've been mixed up...

Cunhambebe
10th September 2006, 16:51
Thanks again for taking time to respond...
...see VFR at the wiki... (...) Placing BlockBuster before the IVTC is somewhat dangerous for proper field detection...
-Thanks for the input.
AssumeBFF is already given by the MPEG2Source
-Thanks again. I've already read about this.. that MPEG files "tell" you what the field order is.
Are you sure you got DCTFilter, and not DCT, which is a different plugin? It seems from your previous script that they might've been mixed up...
-Ops.... it's DCT... :o
I'll download the right file this time - but anyway, how about what Didée said? What should I do anyway?
Thank you very much for your help. I'm finishing some work here and post back as soon as possible.
Greetz,
Mark

Cunhambebe
11th September 2006, 14:56
Hi...
I'm still making some tests here. Deblock_QED seems to work OK with my video, but there are some strange artifacts:

http://img233.imageshack.us/img233/8933/vdmod2bf8.jpg (http://imageshack.us)

IS tehre any way to remove them? Thanks in advance.
About the Deblock-QED: I can only see subtle changes).

For the IVTC stuff, I have downloaded TIVTC but some problems remain:
1) Don't know where to put the line Trim (probably I'll have to re-edit the whole video again after IVTC). Anyway, video looks strange, lot's of ghosts...

Here's teh script I used:

LoadPlugin("C:\unzipped\dgmpgdec148\DGDecode.dll")
LoadPlugin("C:\deblock_qed\dctfilter\DctFilter.dll")
LoadPlugin("c:\deblock_qed\mt_masktools.dll")
LoadPlugin("C:\deblock_qed\TIVTC\TIVTC.dll")
Import("C:\deblock_qed\Deblock_QED_MT2.avs")
LoadPlugin("C:\avs_filters\ColorMatrix\Release\colormatrix.dll")
MPEG2Source("C:\clodo.d2v", info=3).AudioDub(WavSource("C:\clodo.wav"))
ColorMatrix(hints=true, interlaced=true)
Tfm(d2v="c:\clodo.d2v")
tdecimate(mode=1,hybrid=1)
deblock_qed( quant1=20,quant2=24, aOff1=2,bOff1=4,aOff2=4,bOff2=8 )
Trim(0,403)+Trim(2395,15174)+Trim(16857,17305)
Crop(6,0,-6,0)
Lanczos4Resize(640,480)
FadeOut(30)

2) I'd like to use timecodes files from mkv2vfr - but I don't know how. Is there a good tutorial on this subject around here? Thanks in advance.

-another option would be using MEGUI to find out what it tells me about the hybrid video...

If that's is impossible, I'll stick to Decomb and Telecide with no Decimate (). That'd do it all right - I guess... maybe :)
Thanks in advance.

Cunhambebe
15th September 2006, 02:44
All right, I have rendered the video but with no IVTC at all, neither timecodes for rendering at 120 fps since I wanna leave it compatible with most DVD players that support Xvid. Despite Didée's remark, the filter seemed to work with my video and made a lot of difference in the final result (I used TomsMoComp). Some portions are jerky, but there are just a few ones (source as you know is hybrid). Thanks to all who have helped.

BTW, i hope someone can give me a hand on how to render at 120 fps for testing purposes. Tutorials seem a bit difficult. Let's see what I'll do. Thanks again.