AVS Forum banner

1 - 20 of 1969 Posts

·
Registered
Joined
·
612 Posts
Discussion Starter · #1 ·
Ok folks, I've been getting a lot of responses and questions to the way I achieve the "motion morphing, 120hz" look on my videos from a PC rather than letting a new LCD screen do the work. Not only do I feel the results are better than the TVs, but depending on your hardware, you'd be saving a lot of $$$. Now my friend Kevin wrote this script after I told him I wanted to buy a 120hz projector. He advised me to wait until he could find a software solution, and sure enough he did with some plugins and tinkering around. I'm going to paste you folks right here the settings I'm using. I hope it makes sense to some of you out there. Also I'd like to mention I'm using a [email protected] to get very nice results in MPC. Also I am using the Haali splitter on the 720p MKVs. Boy do they look great. If any of you folks have better hardware, or tinker around with this script and find BETTER results, please let us all know!

Grab MVtools Here
Grab Avisynth MT Here



SetMtmode(2,10)

source=ffdshow_source()

source=changefps(source,source,true)

# assume progressive PAL 25 fps or NTSC Film 23.976 source

backward_vec = source.MVAnalyse(blksize=16, isb = true, chroma=false, pel=1, searchparam=1, idx=1)

# we use explicit idx for more fast processing

forward_vec = source.MVAnalyse(blksize=16, isb = false, chroma=false, pel=1, searchparam=1, idx=1)

source.MVFlowFps(backward_vec, forward_vec, num=2*FramerateNumerator(source), \\

den=FramerateDenominator(source), mask=0, idx=1)

distributor()
 

·
Registered
Joined
·
612 Posts
Discussion Starter · #2 ·
If you folks jsut want to test things out on your hardware, a quick and easy way is to go into FFdshow and go into Deinterlacer - > Frame Rate doubler. I'm using 1 pixel motionleft & right. It looks ok... give it a shot.
 

·
Registered
Joined
·
613 Posts
im pretty new to using avisynth, but THANKS SO MUCH for this.

all i need is avisynth, ffdshow, and mpc, right?
 

·
Registered
Joined
·
816 Posts

Quote:
Originally Posted by blazed /forum/post/13793850


im pretty new to using avisynth, but THANKS SO MUCH for this.

all i need is avisynth, ffdshow, and mpc, right?

You also need MVTools.


I was unable to get his script to work via Media Player Classic Home Cinema, though.


When I attempted to use it, the player would just crash immediately with a DLL error in mvtools.dll (That was when having add ffdshow video source was checked)


When I unchecked the add ffdshow video source box, I just got a black picture. When attempting to seek strange things happened but no video, sometimes just a still frame.


My settings looked just like this




No success with some 23.97 fps XviD videos I have.
 

·
Registered
Joined
·
816 Posts
After some playing around, I got it to work with FFDShow.


I checked the AVISynth tab, made sure add FFDShow video source was unchecked, had only input colorspaces of YV12 and YUY2 checked and used this script.

Code:
Code:
source=ffdshow_source()
# assume progressive PAL 25 fps or NTSC Film 23.976 source
backward_vec = source.MVAnalyse(blksize=16, isb = true, chroma=false, pel=1, searchparam=1, idx=1)
# we use explicit idx for more fast processing
forward_vec = source.MVAnalyse(blksize=16, isb = false, chroma=false, pel=1, searchparam=1, idx=1)
return source.MVFlowFps(backward_vec, forward_vec, num=48000,  den=1001, mask=0, idx=1)
Very similar to your script but I hardcoded num to 48000 and den to 1001.


48000 represents my desired frame doubling of 23.97fps to 48hz


Of course this only works with 23.97fps-24hz videos. Anything else will probably end up looking odd...


Good fun on my Intel Core 2 Duo E8400 @ 3.6ghz ;p
 

·
Registered
Joined
·
612 Posts
Discussion Starter · #6 ·
Which do you like more? the script or the info i posted in #2?
 

·
Registered
Joined
·
816 Posts
Script. most definitely.
 

·
Registered
Joined
·
816 Posts

Quote:
Originally Posted by NickB /forum/post/13795963


So what does this do exactly? Is this mostly for xvid/divx or does this work on dvd/hdtv?

Adds intermediate frames for a "MotionFlow" type look to film.


Also, I've been playing with the script and came to terms that MVTools doesn't properly convert some numerator and denominator combinations, like when you use the auto calculation for 2* the FrameNumerator, AVISynth sometimes returns 2997 for Numerator and 125 for Denominator.. if you auto multiply the 2997 by 2 and feed both 5994 and 125 into the MVFlowFPS, it won't work right. It has to be changed to 48000 and 1001...


I made a script to detect 23.976 and 29.97 fps input and use the appropriate values and pass them to MVFlowFPS... it doesn't mess with any odd numbered ones, or shouldn't.

Code:
Code:
source=ffdshow_source()
SetMTMode(2,2)
frn = int ( FrameRateNumerator(source) )
frd = int ( FrameRateDenominator(source) )
# If the denominator is 1, multiply the numerator by 1000
frn = ( frd == 1 )  ? ( frn * 1000 ) : frn
# If the denominator is 1, now change it to 1001
frd = ( frd == 1 ) ? 1001 : frd
# If the numerator is 2997 and the denominator is 125, change the numerator to 24000
frn = ( ( frn == 2997 ) && ( frd == 125 ) ) ? 24000 : frn
# If the numerator is 2997 and the denominator is 100, change the numerator to 30000
frn = ( ( frn == 2997 ) && ( frd == 100 ) ) ? 30000 : frn
# If the denominator is 125 and the numerator was changed earlier to 24000, change the denominator to 1001
frd = ( ( frd == 125 ) && ( frn == 24000 ) ) ? 1001 : frd
# If the denominator is 100 and the numerator was changed earlier to 30000, change the denominator to 1001
frd = ( ( frd == 100 ) && ( frn == 30000 ) ) ? 1001 : frd
# If the denominator is 1001, which is the only denominator MVTools seems to work with, multiply the numerator by 2.
frn = ( frd == 1001 ) ? ( frn * 2 ) : frn
# assume progressive PAL 25 fps or NTSC Film 23.976 source
backward_vec = ( frd == 1001 ) ? source.MVAnalyse(blksize=16, isb = true, chroma=false, pel=1, searchparam=1, idx=1) : 0
# we use explicit idx for more fast processing
forward_vec = ( frd == 1001 ) ? source.MVAnalyse(blksize=16, isb = false, chroma=false, pel=1, searchparam=1, idx=1) : 0
# If the denominator is 1001, return the MVFlowFPS version of the source, otherwise return the original source
return (  frd == 1001 ) ? source.MVFlowFps(backward_vec, forward_vec, num=frn,  den=frd, mask=0, idx=1) : source
.. Haven't tested it with PAL stuff... I know the code could stand to be cleaned up and I don't understand the if then else crap in AVISynth mostly at all. Wish the syntax was as easy as C.
 

·
Registered
Joined
·
612 Posts
Discussion Starter · #10 ·
Soda, I just ordered new hardware, I'll be messing around with the script. BTW I was talking with my friend Kevin and the script I gave to all of you was the "FAST" one. There's two more scripts that do "good" and "insane" quality. I ordered an Asus Geforce 8200 mATX board with an AMD Phenom 9550 CPU. I'll let you guys in on all the results.
 

·
Registered
Joined
·
612 Posts
Discussion Starter · #11 ·
Soda, I just ordered new hardware, I'll be messing around with the script. BTW I was talking with my friend Kevin and the script I gave to all of you was the "FAST" one. There's two more scripts that do "good" and "insane" quality. I ordered an Asus Geforce 8200 mATX board with an AMD Phenom 9550 CPU. I'll let you guys in on all the results.
 

·
Registered
Joined
·
613 Posts

Quote:
Originally Posted by sodaboy581 /forum/post/13799634


Adds intermediate frames for a "MotionFlow" type look to film.


Also, I've been playing with the script and came to terms that MVTools doesn't properly convert some numerator and denominator combinations, like when you use the auto calculation for 2* the FrameNumerator, AVISynth sometimes returns 2997 for Numerator and 125 for Denominator.. if you auto multiply the 2997 by 2 and feed both 5994 and 125 into the MVFlowFPS, it won't work right. It has to be changed to 48000 and 1001...


I made a script to detect 23.976 and 29.97 fps input and use the appropriate values and pass them to MVFlowFPS... it doesn't mess with any odd numbered ones, or shouldn't.

Code:
Code:
source=ffdshow_source()
SetMTMode(2,2)
frn = int ( FrameRateNumerator(source) )
frd = int ( FrameRateDenominator(source) )
# If the denominator is 1, multiply the numerator by 1000
frn = ( frd == 1 )  ? ( frn * 1000 ) : frn
# If the denominator is 1, now change it to 1001
frd = ( frd == 1 ) ? 1001 : frd
# If the numerator is 2997 and the denominator is 125, change the numerator to 24000
frn = ( ( frn == 2997 ) && ( frd == 125 ) ) ? 24000 : frn
# If the numerator is 2997 and the denominator is 100, change the numerator to 30000
frn = ( ( frn == 2997 ) && ( frd == 100 ) ) ? 30000 : frn
# If the denominator is 125 and the numerator was changed earlier to 24000, change the denominator to 1001
frd = ( ( frd == 125 ) && ( frn == 24000 ) ) ? 1001 : frd
# If the denominator is 100 and the numerator was changed earlier to 30000, change the denominator to 1001
frd = ( ( frd == 100 ) && ( frn == 30000 ) ) ? 1001 : frd
# If the denominator is 1001, which is the only denominator MVTools seems to work with, multiply the numerator by 2.
frn = ( frd == 1001 ) ? ( frn * 2 ) : frn
# assume progressive PAL 25 fps or NTSC Film 23.976 source
backward_vec = ( frd == 1001 ) ? source.MVAnalyse(blksize=16, isb = true, chroma=false, pel=1, searchparam=1, idx=1) : 0
# we use explicit idx for more fast processing
forward_vec = ( frd == 1001 ) ? source.MVAnalyse(blksize=16, isb = false, chroma=false, pel=1, searchparam=1, idx=1) : 0
# If the denominator is 1001, return the MVFlowFPS version of the source, otherwise return the original source
return (  frd == 1001 ) ? source.MVFlowFps(backward_vec, forward_vec, num=frn,  den=frd, mask=0, idx=1) : source
.. Haven't tested it with PAL stuff... I know the code could stand to be cleaned up and I don't understand the if then else crap in AVISynth mostly at all. Wish the syntax was as easy as C.


soda,

sorry for all the lame questions, but after everything is installed, i just copy your script, and paste it in ffdshow under avisynth, right?
 

·
Registered
Joined
·
816 Posts

Quote:
Originally Posted by blazed /forum/post/13801559


soda,

sorry for all the lame questions, but after everything is installed, i just copy your script, and paste it in ffdshow under avisynth, right?

Yes, but make sure you have installed the MVTools plugin for AVISynth too.


You can download it from http://avisynth.org.ru/mvtools/mvtools.html


The "SetMtMode" line there needs the AVISynth MT version as well.


So, you'll need FFDShow, AVISynth MT, and MVTools and that should be it.
 

·
Registered
Joined
·
56 Posts

Quote:
Originally Posted by sodaboy581 /forum/post/13801845


Yes, but make sure you have installed the MVTools plugin for AVISynth too.


You can download it from http://avisynth.org.ru/mvtools/mvtools.html


The "SetMtMode" line there needs the AVISynth MT version as well.


So, you'll need FFDShow, AVISynth MT, and MVTools and that should be it.


Is there anything online that can walk me through how to install and use plugins and various filters for Avisynth? For a novice user, Avisynth has been a huge pain in the butt for me; the one time I tried to throw in the LimitedSharpen filter files into my Avisynth folder, Avisynth in MeGUI gave me an error message.


Right now, I'm just using DGIndex to build me a .d2v file, which I open up in Avisynth creator, and resize to the appropriate resolution with Spline36 (I'm also using tdeint(mode=1) to speed up my 1080i caps to 60fps), which in most cases is 1280x704.


I then use a Level 4.1 720p video profile for the actual encoding.


But yeah, if anyone could spare some time to walk me through what I need that would be sweet. Would even Paypal you $10 for your time. (I'm that frustrated with this)
 

·
Registered
Joined
·
612 Posts
Discussion Starter · #16 ·
#1. Place MVtools into the Avisynth/plugins folder.

#2. MT.dll is placed in the Avisynth folder. MT.dll is for people who can multithread. So if you have quad core, it's SetMtMode (2,2) for dual, SetMtMode (2,3) for Tri, SetMtMode (2,4) for quad.

#3. The avisynth.dll is then placed into the Windows/system32 folder.


I'll be bringing my friend Kevin over and he'll post up different settings(for those with the hardware that can push it!). Also as I stated above I just purchased new hardware, so I'll run through the gamut and let you guys have the results of all my tests with various media(Blu-ray, HD-DVD, MKVs).


Avsforum has done a lot for me, and I appreciate some of the responses I've gotten. We're all here to share info and possibly save us $$$ from the greedy companies. My best friend saved me thousands of dollars, I hope these results can do the same for you.


Thanks to Soda for bringing that up, I'll get Kevin to do a proper tutorial tomorrow.
 

·
Registered
Joined
·
816 Posts

Quote:
Originally Posted by Bahn Yuki /forum/post/13802741


#2. MT.dll is placed in the Avisynth folder. MT.dll is for people who can multithread. So if you have quad core, it's SetMTmode(4), instead of 2...Tri-Core is 3, and so on and so forth.

This is absolutely wrong, it's SetMtMode(2,x) where x is the number of processors you have.


So SetMtMode (2,2) for dual, SetMtMode (2,3) for Tri, SetMtMode (2,4) for quad.
 

·
Registered
Joined
·
612 Posts
Discussion Starter · #18 ·

Quote:
Originally Posted by sodaboy581 /forum/post/13803061


This is absolutely wrong, it's SetMtMode(2,x) where x is the number of processors you have.


So SetMtMode (2,2) for dual, SetMtMode (2,3) for Tri, SetMtMode (2,4) for quad.

This is Bahn's friend Kevin.


Yes, it's SetMtMode (2, x), with x being the number of threads you want running at once. The performance seemed to work better having a high number of threads (6-10), even on a dual core, instead of matching the number of threads to the number of cores.
 

·
Registered
Joined
·
613 Posts

Quote:
Originally Posted by Bahn Yuki /forum/post/13802741


#1. Place MVtools into the Avisynth/plugins folder.

#2. MT.dll is placed in the Avisynth folder. MT.dll is for people who can multithread. So if you have quad core, it's SetMtMode (2,2) for dual, SetMtMode (2,3) for Tri, SetMtMode (2,4) for quad.

#3. The avisynth.dll is then placed into the Windows/system32 folder.


I'll be bringing my friend Kevin over and he'll post up different settings(for those with the hardware that can push it!). Also as I stated above I just purchased new hardware, so I'll run through the gamut and let you guys have the results of all my tests with various media(Blu-ray, HD-DVD, MKVs).


Avsforum has done a lot for me, and I appreciate some of the responses I've gotten. We're all here to share info and possibly save us $$$ from the greedy companies. My best friend saved me thousands of dollars, I hope these results can do the same for you.


Thanks to Soda for bringing that up, I'll get Kevin to do a proper tutorial tomorrow.

yes i agree 100%. almost everyone here at AVS is very kind and helpful.
 

·
Registered
Joined
·
1,931 Posts
has anyone tried it ?? How are the results ? Can someone post screen shots with and without the script/method described above ?
 
1 - 20 of 1969 Posts
Top