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 > Linux, Mac OS X, & Co

Reply
 
Thread Tools Display Modes
Old 3rd September 2009, 01:56   #1  |  Link
Major_Kong
Registered User
 
Major_Kong's Avatar
 
Join Date: Jun 2007
Location: Earth
Posts: 51
mencoder built-in filters VS avisynth filters (ivtc)

How do mencoder's filters compare to avisynth filters in terms of performing inverse telecine ?
Major_Kong is offline   Reply With Quote
Old 3rd September 2009, 04:16   #2  |  Link
roozhou
Registered User
 
Join Date: Apr 2008
Posts: 973
mencoder's ivtc and pullup filters are easier to use.
roozhou is offline   Reply With Quote
Old 3rd September 2009, 17:01   #3  |  Link
Major_Kong
Registered User
 
Major_Kong's Avatar
 
Join Date: Jun 2007
Location: Earth
Posts: 51
Quote:
Originally Posted by roozhou View Post
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 ?

Last edited by Major_Kong; 3rd September 2009 at 19:59.
Major_Kong is offline   Reply With Quote
Old 3rd September 2009, 20:36   #4  |  Link
Selur
member of flaskmpeg.info
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 2,224
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
__________________
Hybrid
Selur is offline   Reply With Quote
Old 3rd September 2009, 21:46   #5  |  Link
Major_Kong
Registered User
 
Major_Kong's Avatar
 
Join Date: Jun 2007
Location: Earth
Posts: 51
Thanks for the reply,
Unfortunately i'm a bit disappointed with the results i'm having, haven't tried 1. and 2. though.
Major_Kong is offline   Reply With Quote
Old 3rd September 2009, 22:03   #6  |  Link
froggy1
h264enc & xvidenc author
 
froggy1's Avatar
 
Join Date: May 2007
Location: /dev/video0
Posts: 845
Quote:
Originally Posted by Selur View Post
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
__________________
openSUSE Linux 64-bit - h264enc - xvidenc - divxenc

Fedora & openSUSE repo: http://download.opensuse.org/reposit...me:/microchip8
froggy1 is offline   Reply With Quote
Old 3rd September 2009, 22:07   #7  |  Link
Selur
member of flaskmpeg.info
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 2,224
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,...
__________________
Hybrid

Last edited by Selur; 3rd September 2009 at 22:22.
Selur is offline   Reply With Quote
Old 3rd September 2009, 23:03   #8  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 1,826
Quote:
Originally Posted by Selur View Post
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.
nm is offline   Reply With Quote
Old 4th September 2009, 00:22   #9  |  Link
Major_Kong
Registered User
 
Major_Kong's Avatar
 
Join Date: Jun 2007
Location: Earth
Posts: 51
Quote:
Originally Posted by Selur View Post
-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.
Major_Kong is offline   Reply With Quote
Old 4th September 2009, 09:25   #10  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 1,826
-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?
nm is offline   Reply With Quote
Old 4th September 2009, 18:38   #11  |  Link
Major_Kong
Registered User
 
Major_Kong's Avatar
 
Join Date: Jun 2007
Location: Earth
Posts: 51
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






-vf filmdint





vf yadif=3:1,mcdeint=2:1:10,framestep=2,filmdint=dint_thres=256






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=-1red=2:context=1"


EDIT:

-vf yadif=3:1,mcdeint=0:1:10,framestep=2,filmdint=dint_thres=256





Indeed faster, but something weird happened in the second frame.


So i guess quality/speed wise pullup is the winner afterall.

Last edited by Major_Kong; 4th September 2009 at 19:48.
Major_Kong is offline   Reply With Quote
Old 4th September 2009, 22:32   #12  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 1,826
Quote:
Originally Posted by Major_Kong View Post
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.
nm is offline   Reply With Quote
Old 4th September 2009, 22:38   #13  |  Link
froggy1
h264enc & xvidenc author
 
froggy1's Avatar
 
Join Date: May 2007
Location: /dev/video0
Posts: 845
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
__________________
openSUSE Linux 64-bit - h264enc - xvidenc - divxenc

Fedora & openSUSE repo: http://download.opensuse.org/reposit...me:/microchip8
froggy1 is offline   Reply With Quote
Old 5th September 2009, 03:50   #14  |  Link
Major_Kong
Registered User
 
Major_Kong's Avatar
 
Join Date: Jun 2007
Location: Earth
Posts: 51
Oops..

Source:





Quote:
I'd still be interested in seeing a video clip of the source.
Quote:
If you can, cut a small piece and upload it somewhere.
http://rapidshare.com/files/275794995/sample.avi.html

Last edited by Major_Kong; 5th September 2009 at 04:05.
Major_Kong is offline   Reply With Quote
Old 5th September 2009, 11:33   #15  |  Link
froggy1
h264enc & xvidenc author
 
froggy1's Avatar
 
Join Date: May 2007
Location: /dev/video0
Posts: 845
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
__________________
openSUSE Linux 64-bit - h264enc - xvidenc - divxenc

Fedora & openSUSE repo: http://download.opensuse.org/reposit...me:/microchip8
froggy1 is offline   Reply With Quote
Old 5th September 2009, 13:30   #16  |  Link
Major_Kong
Registered User
 
Major_Kong's Avatar
 
Join Date: Jun 2007
Location: Earth
Posts: 51
Quote:
Originally Posted by froggy1 View Post
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...

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.
Major_Kong is offline   Reply With Quote
Old 7th September 2009, 15:52   #17  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 1,826
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):
Code:
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:
Code:
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):
Code:
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):
Code:
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:
Code:
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:
Code:
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
nm is offline   Reply With Quote
Old 11th September 2009, 00:21   #18  |  Link
Major_Kong
Registered User
 
Major_Kong's Avatar
 
Join Date: Jun 2007
Location: Earth
Posts: 51
Althought the difference might be small, i'm afraid that, at least in my opinion, avisynth does win.
Major_Kong is offline   Reply With Quote
Reply

Thread Tools
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 15:26.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.