View Full Version : mencoder built-in filters VS avisynth filters (ivtc)
Major_Kong
3rd September 2009, 01:56
How do mencoder's filters compare to avisynth filters in terms of performing inverse telecine ?
roozhou
3rd September 2009, 04:16
mencoder's ivtc and pullup filters are easier to use.
Major_Kong
3rd September 2009, 17:01
mencoder's ivtc and pullup filters are easier to use.
But what about end result ?
Let's say i use -vf pullup,softskip on a telecined PAL DVD, how does the result compare to using the "best" avaliable ivtc filters for avisynth ?
Selur
3rd September 2009, 20:36
the sad story is: at least from my testing there's in general always a better and normally faster ways to do the filtering (not just ivtc) via avisynth.
iirc these are the main commen ivtc methods used with mencoder:
1. -vf decimate=2:1000:1600:.001 -ofps 24000/1001
2. -vf framestep=2,filmdint=dint_thres=256,harddup -ofps 24000/1001
3. -vf pullup,softskip
4. -vf filmdint
on the other hand mencoders ivtc normally isn't bad and does a decent job.
Cu Selur
Major_Kong
3rd September 2009, 21:46
Thanks for the reply,
Unfortunately i'm a bit disappointed with the results i'm having, haven't tried 1. and 2. though.
microchip8
3rd September 2009, 22:03
2. -vf framestep=2,filmdint=dint_thres=256,harddup -ofps 24000/1001
Cu Selur
filmdint has an IFPS and an OFPS option to convert down frame rates so I don't know why you use framestep=2. Also if you have "normal" telecine (29.970fps) there's no need for framestep=2 either as filmdint will convert it to 23.976 just fine
Selur
3rd September 2009, 22:07
wrote these 4 ways down in a small file called mencoderIVTC.txt in my encoderNotes-folder, don't really know when I last used this call :)
might be that I used it on a 60p sample to get it to 24p and just wrote it down there accidentally, might be that number 1. was a solution for the same 'problem', since I only use 3&4 in sx264
there should also be the possibitlity to do ivtc with:
-vf softpulldown,ivtc=1
and
-vf yadif=3:1,mcdeint=2:1:10,framestep=2,filmdint=dint_thres=256
iirc the last one delivered the best results, but was damn slow,...
nm
3rd September 2009, 23:03
1. -vf decimate=2:1000:1600:.001 -ofps 24000/1001
2. -vf framestep=2,filmdint=dint_thres=256,harddup -ofps 24000/1001
Yep, these are for decimating duplicated frames in 60p broadcasts when the original source is 24p.
Major_Kong
4th September 2009, 00:22
-vf yadif=3:1,mcdeint=2:1:10,framestep=2,filmdint=dint_thres=256
iirc the last one delivered the best results, but was damn slow,...
Indeed the best result so far (and the only one that didn't disappoint), but it really is unbearably slow. I'm going to have to give avisynth a try.
nm
4th September 2009, 09:25
-vf yadif=3:1,mcdeint=0:1:10,framestep=2,filmdint=dint_thres=256
Should be about 10 times faster without decreasing quality noticeably.
Could you post a sample clip where this works better than filmdint or pullup alone?
Major_Kong
4th September 2009, 18:38
Sure.
The source is a (bad) PAL DVD of Transformers TOS, and i've been only encoding the intro (there's a lot of movement so that should be enough) in order to test the filters.
Results:
-vf pullup,softskip
http://img122.imageshack.us/img122/3218/pullup.th.jpg (http://img122.imageshack.us/i/pullup.jpg/)
http://img42.imageshack.us/img42/7731/pullup2.th.jpg (http://img42.imageshack.us/i/pullup2.jpg/)
-vf filmdint
http://img122.imageshack.us/img122/8597/filmdintb.th.jpg (http://img122.imageshack.us/i/filmdintb.jpg/)
http://img216.imageshack.us/img216/8357/filmdint2.th.jpg (http://img216.imageshack.us/i/filmdint2.jpg/)
vf yadif=3:1,mcdeint=2:1:10,framestep=2,filmdint=dint_thres=256
http://img42.imageshack.us/img42/2929/slow.th.jpg (http://img42.imageshack.us/i/slow.jpg/)
http://img7.imageshack.us/img7/7224/slow2.th.jpg (http://img7.imageshack.us/i/slow2.jpg/)
Comparing filmdint with pullup, the latter would be the better choice, but yadif(...) does a better job.
PS: The codec options were: "-oac copy -ovc lavc -lavcopts vcodec=ffvhuff:vstrict=-1:pred=2:context=1"
EDIT:
-vf yadif=3:1,mcdeint=0:1:10,framestep=2,filmdint=dint_thres=256
http://img269.imageshack.us/img269/5962/slow0.th.jpg (http://img269.imageshack.us/i/slow0.jpg/)
http://img177.imageshack.us/img177/2929/slow.th.jpg (http://img177.imageshack.us/i/slow.jpg/)
Indeed faster, but something weird happened in the second frame.
So i guess quality/speed wise pullup is the winner afterall.
nm
4th September 2009, 22:32
The source is a (bad) PAL DVD of Transformers TOS, and i've been only encoding the intro (there's a lot of movement so that should be enough) in order to test the filters.
You didn't post a sample of the source video, so I don't know how it has been mistreated exactly. Since it's PAL, badly converted from NTSC, you can't use normal inverse telecine filters to recover the original video. There are only more or less bad solutions left.
Have you tried simply deinterlacing it, with -vf pp=lb (for smooth but ghosty effect), -vf yadif=0 or -vf yadif=3,mcdeint=0:0:10,framestep=2 (note the field order for yadif and mcdeint: probably top field first since it's from a PAL DVD) and compare that to pullup? Also compare fluidity of playback instead of just static screenshots.
I'd still be interested in seeing a video clip of the source.
microchip8
4th September 2009, 22:38
Yes, like nm said, that's definitely interesting source you have there. If you can, cut a small piece and upload it somewhere. I'm interested too ;)
Major_Kong
5th September 2009, 03:50
Oops..
Source:
http://img215.imageshack.us/img215/4760/17413016.th.jpg (http://img215.imageshack.us/i/17413016.jpg/)
http://img268.imageshack.us/img268/4028/93644333.th.jpg (http://img268.imageshack.us/i/93644333.jpg/)
I'd still be interested in seeing a video clip of the source.
If you can, cut a small piece and upload it somewhere.
http://rapidshare.com/files/275794995/sample.avi.html
microchip8
5th September 2009, 11:33
yadif=0 and pp=ci seem to do a good job on this sample, better than filmdint and pullup. Of course, yadif + mcdeint are the best out of all here
Major_Kong
5th September 2009, 13:30
yadif=0 and pp=ci seem to do a good job on this sample, better than filmdint and pullup. Of course, yadif + mcdeint are the best out of all here
Yes, yadif + mcdeint does a good job, should have tried them earlier... http://www.ptanime.net/img/smilies/wall.gif
Well, just for the sake of the topic, i'll compare the results of yadif + mcdeint with using avisynth filters, if and when i get wine+avisynth running.
nm
7th September 2009, 15:52
Srestore can deblend the video and restore the original framerate and smooth motion. This can't be done by MEncoder without coding/porting new filters.
Srestore with yadif:
http://www.mediafire.com/download.php?g5cyrxw5zmh
AviSynth script (transformers.yadif.avs):
LoadPlugin("ffms2.dll")
LoadCplugin("yadif.dll")
LoadPlugin ("ReduceFlicker.dll")
LoadPlugin("RemoveGrain.dll")
import("Srestore.avsi")
FFVideoSource("sample.avi")
d = last.bob(-0.2,0.6).reduceflicker(strength=1)
yadif(mode=1)
srestore(dclip=d)
Encoding commands:
mkfifo pipe.y4m
wine avs2yuv.exe transformers.yadif.avs -o pipe.y4m & \
x264 --preset slower --tune animation --crf 20 -o tr.yadif.264 pipe.y4m
mkvmerge -o tr.yadif.mkv --default-duration 0:24000/1001fps tr.yadif.264 -D sample.avi
rm -f tr.yadif.264 pipe.y4m
Encoding speed (Core2 Duo T7200, 2 GHz):
transformers.yadif.avs: 720x576, 24000/1001 fps, 1128 frames
encoded 1128 frames, 3.27 fps, 1720.87 kb/s
real 5m33.098s
user 1m8.104s
sys 0m0.676s
Srestore with TempGaussMC:
http://www.mediafire.com/download.php?iudniuyzynz
AviSynth script (transformers.tgmc.nnedi.avs):
LoadPlugin("ffms2.dll")
LoadPlugin("nnedi2.dll")
LoadPlugin ("ReduceFlicker.dll")
LoadPlugin("RemoveGrain.dll")
LoadPlugin ("mvtools2.dll")
import("TempGaussMC_beta1mod.avsi")
import("Srestore.avsi")
FFVideoSource("sample.avi")
d = last.bob(-0.2,0.6).reduceflicker(strength=1)
TempGaussMC_beta1mod(edimode="nnedi2")
srestore(dclip=d)
Encoding commands:
mkfifo pipe.y4m
wine avs2yuv.exe transformers.tgmc.nnedi.avs -o pipe.y4m & \
x264 --preset slower --tune animation --crf 20 -o tr.tgmc.nnedi.264 pipe.y4m
mkvmerge -o tr.tgmc.nnedi.mkv --default-duration 0:24000/1001fps tr.tgmc.nnedi.264 -D sample.avi
rm -f tr.tgmc.nnedi.264 pipe.y4m
Encoding speed:
transformers.tgmc.nnedi.avs: 720x576, 24000/1001 fps, 1128 frames
encoded 1128 frames, 0.95 fps, 1323.97 kb/s
real 19m44.908s
user 19m18.508s
sys 0m1.464s
Major_Kong
11th September 2009, 00:21
Althought the difference might be small, i'm afraid that, at least in my opinion, avisynth does win.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.