Avisynth Script for doubling video frame rates - Page 24 - AVS Forum | Home Theater Discussions And Reviews
Forum Jump: 
Reply
 
Thread Tools
post #691 of 1969 Old 11-18-2010, 05:11 PM
Senior Member
 
SubJunk's Avatar
 
Join Date: May 2010
Posts: 331
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 3 Post(s)
Liked: 10
Quote:
Originally Posted by johnifehr View Post
Make sure you have the Add FFDshow video source unchecked in the avysynth tab, Your video card has nothing to do with mkv playback, its all in the cpu and memory, only nvidia has hardware support in their video cards for mkv playback. I only use Windows Media center or Windows media player for playback and have always had good results with these players.
It's funny you should say that, because I have noticed playback in Windows Media Player is the smoothest, too. In VLC, Media Player Classic HC, and all the others I get frame-drops but in WMP it is perfect.
As much as I hate to say this... Microsoft did a great job with that player
SubJunk is offline  
Sponsored Links
Advertisement
 
post #692 of 1969 Old 11-22-2010, 05:52 AM
Member
 
dzid_'s Avatar
 
Join Date: May 2010
Location: Poland
Posts: 32
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
I have general question. Is anybody capable of telling me why actually our avisynth scripts don't use 100% of cpu? For me a smooth playback is with 60% of cpu. Maybe not all functions are parallelized..

I am also interested which part of script is the most cpu consuming but probably there is no tool for profiling avisynth scripts.
dzid_ is offline  
post #693 of 1969 Old 11-22-2010, 07:26 AM
Member
 
neograniceni's Avatar
 
Join Date: Jan 2008
Posts: 20
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by johnifehr View Post

Yeah, its by far my favorite can't remember who posted it but I just modified it for my needs and the best part is you don't have to change the scripts between 720p and 1080p, it does it automaticaly as its implemented in the script. Now if there was a quad with a speed of 10ghz one could just use the best script at all times and wouldn't have to de-tune for 1080p. Oh well maybe in 10 years or so. This script works best for 23.976 video and on a 60hrz panel or projector. Its not perfect (none are) but very enjoyable.

Glad to see people found it useful. I wrote it originally for my i7 based HTPC. Here is my original script for people in PAL region with some nice i7 based systems. The script interpolates 23.976/24fps to 75fps for playback on 50Hz TV (yes, to 75fps for 50Hz !). I am using it for almost a year now. So far so good. Minimal artefacts, minimal soap effect, almost invisible judder, eye candy for both 720p and 1080p MKVs. It also interpolates 29-30fps to 60fps, so it is necessary to switch TV output to 60Hz for 29-30fps material (I use MPC-HC which can automatically switch the frequency depending on the source video framerate):

SetMemoryMax(1280)
SetMTMode(2,16)
ffdShow_source()
Width <= 1400 ? Eval("""
super=MSuper(pel=2, hpad=8, vpad=8,rfilter=3,levels=0)
backward_vec1=MAnalyse(super,chroma=false, isb=true, blksize=16, blksizev=16, searchparam=0, plevel=0,levels=0,search = 5)
forward_vec1=MAnalyse(super,chroma=false, isb=false, blksize=16, blksizev=16, searchparam=0, plevel=0,levels=0,search = 5)
backward_re = MRecalculate(super,chroma=false, backward_vec1,blksize=8, blksizev=8, thSAD=200, searchparam=0,search = 5)
forward_re = MRecalculate(super,chroma=false, forward_vec1,blksize=8, blksizev=8, thSAD=200, searchparam=0,search = 5)
Framerate == 50 || Framerate == 75 ||Framerate <= 28 ? MBlockFps(super,backward_re, forward_re, num=75, den=1, mode=2) : last
(Framerate > 28 && Framerate <=30) || Framerate == 60 ? MBlockFps(super,backward_re, forward_re, num=60, den=1, mode=2) : last
distributor()
"""): last
Width > 1400 ? Eval("""
super=MSuper(pel=2, hpad=8, vpad=8,rfilter=3,levels=0)
backward_vec1=MAnalyse(super,chroma=false, isb=true, blksize=16, blksizev=16, searchparam=0, plevel=0,levels=0,search = 5)
forward_vec1=MAnalyse(super,chroma=false, isb=false, blksize=16, blksizev=16, searchparam=0, plevel=0,levels=0,search = 5)
backward_re = MRecalculate(super,chroma=false, backward_vec1,blksize=8, blksizev=8, thSAD=200, searchparam=0,search = 5)
forward_re = MRecalculate(super,chroma=false, forward_vec1,blksize=8, blksizev=8, thSAD=200, searchparam=0,search = 5)
Framerate == 50 || Framerate == 75 ||Framerate <= 28 ? MBlockFps(super,backward_re, forward_re, num=75, den=1, mode=0) : last
(Framerate > 28 && Framerate <=30) || Framerate == 60 ? MBlockFps(super,backward_re, forward_re, num=60, den=1, mode=0) : last
distributor()
"""): last
neograniceni is offline  
 
post #694 of 1969 Old 11-22-2010, 07:49 AM
Member
 
Delerue's Avatar
 
Join Date: Nov 2006
Posts: 73
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by dzid_ View Post
I have general question. Is anybody capable of telling me why actually our avisynth scripts don't use 100% of cpu? For me a smooth playback is with 60% of cpu. Maybe not all functions are parallelized..
You're right. This script isn't well parallelizes. So, if one thread gets full loaded, it'll cause a stutter as it didn't process the frame in time.

Quote:
Originally Posted by dzid_ View Post
I am also interested which part of script is the most cpu consuming but probably there is no tool for profiling avisynth scripts.
I would guess that MAnalyse is the most heavy function. It runs all over each frame A plus previous (A-1) and next (A+1) frames, searching each sector of pixels in order to find a pattern of motion. It's insane.
Delerue is offline  
post #695 of 1969 Old 11-22-2010, 12:46 PM
Senior Member
 
SubJunk's Avatar
 
Join Date: May 2010
Posts: 331
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 3 Post(s)
Liked: 10
It's just because different frames require different amounts of interpolation; some frames are very easy to estimate and others are more difficult, so for smooth playback you need to have an average of 60-80% CPU usage or those intensive frames will push it over 100% and therefore stutter.
SubJunk is offline  
post #696 of 1969 Old 11-22-2010, 06:14 PM
Member
 
dzid_'s Avatar
 
Join Date: May 2010
Location: Poland
Posts: 32
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
In that case frame buffer (by itself or enlarging it) should do the job. But it doesn't. (In Halli Splitter you can check size of buffer).
I suppose that generating each frame uses ~60% cpu. And the reason could be that one thread of avisynth is very consumptive and use 100% of one core and others waits for him. Actually I made a test and set affinity in task manager to three cores and cpu usage didn't change and playback was smooth. It confirms my theory.
A conclusion is that for now we need something like three maybe four cores (depend on script) and this doesn't depend on the processor speed. I mean for example i7@4GHz with 4 cores should be the same as i7@4GHz with 6 cores. And CUDA doesn't make sense either. All of this is only very possible theory.

But nevertheless there is an easy way to highly parallelize avisynth scripts by executing many functions (scripts) ahead in time parallely and then putting results in buffer. Everything can be done. We have to wait.
dzid_ is offline  
post #697 of 1969 Old 11-23-2010, 09:24 PM
Advanced Member
 
blazed's Avatar
 
Join Date: Jul 2005
Posts: 577
Mentioned: 2 Post(s)
Tagged: 0 Thread(s)
Quoted: 7 Post(s)
Liked: 19
Quote:
Originally Posted by SubJunk View Post
It's funny you should say that, because I have noticed playback in Windows Media Player is the smoothest, too. In VLC, Media Player Classic HC, and all the others I get frame-drops but in WMP it is perfect.
As much as I hate to say this... Microsoft did a great job with that player
just curious, are you guys using windows7? before i used win7, i was able to use these scripts in media center (win vista), but since i've started using win7, the scripts will only work with MPC.
blazed is offline  
post #698 of 1969 Old 11-23-2010, 11:00 PM
AVS Forum Special Member
 
msgohan's Avatar
 
Join Date: Dec 2007
Location: Vancouver, Canada
Posts: 2,817
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 4 Post(s)
Liked: 16
Did you change from x86 to x64?

LG B7 (OLED65B7P, 2017 -- bought 2017/05/31 & I couldn't be happier so far!) | Panasonic CX850 (TC-55CX850U, 2015 -- bought OLED to replace it due to poor off-angle, weird HDR colors, etc.)
UHD: Philips BDP7501 | HD: PS3, WD TV Live
Denon AVR-890 (2009)
msgohan is offline  
post #699 of 1969 Old 11-24-2010, 07:05 AM
Senior Member
 
johnifehr's Avatar
 
Join Date: May 2008
Posts: 455
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
I am running vista 32 bit again, I tried using windows 7 32 and 64 bit but that only lasted a couple of weeks, way to many bugs, vista works just flawlessly for a HTPC.
johnifehr is offline  
post #700 of 1969 Old 11-24-2010, 10:54 AM
Member
 
Domas4's Avatar
 
Join Date: Jan 2010
Posts: 73
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 11
Quote:
Originally Posted by soulkeeper View Post
if i remember well,someone tried 4 and 5 with no good results..but it seems until the latest revision of mvtools2 (2.5.11) ,there was a bug and these two types of search(4 and 5) were processed as logarithmic (value 2 instead of 4 or 5 respectively).
[...]
it seems that in all the scripts here in the thread,we leave badsad at default which is actually disabled..although i have not a clue of how it affects the result,maybe we could experiment with the recommended values 1000-2000?
As,for badrange ,if we experiment with hexagon search (search=4) the author doesn't mention if we should use positive or negative values...
The bug between two types of search was only in MRecalculate function, so there is not much big of a difference. It is recommended to have negative badrange value for exhaustive search if you actually enable badsad function. Since nobody uses badsad - nobody bothers to change badrange value for exhaustive search.

Anyways, I have experimented with it using different kind of values and what I have found out is that the smaller badsad values - the more artifacts. I think that using badsad, means that if the SAD value of a vector is very high, it tries to use a substitute vector. However, some vectors do not have substitutes and usage of penalty (like lsad) is the most appropriate thing to do to avoid artifacts.

BTW guys, what do you think about the new types of search'es in the new MVTOOLS ?
"MAnalyse, MRecalculate: added pure Horizontal and Vertical search types (requested by 'Null Null')"
Domas4 is offline  
post #701 of 1969 Old 11-26-2010, 08:29 PM
Member
 
Join Date: Feb 2006
Posts: 82
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 11
Quote:
Originally Posted by Domas4 View Post
BTW guys, what do you think about the new types of search'es in the new MVTOOLS ?
"MAnalyse, MRecalculate: added pure Horizontal and Vertical search types (requested by 'Null Null')"
Yeah, I would make the re-estimation more robust like this:

backward_1=MAnalyse(search=3,.....)
forward_1=MAnalyse(search=3,.....)
backward_2=MRecalculate(search=6,.....)
forward_2=MRecalculate(search=6,.....)
backward_3=MRecalculate(search=7,.....)
forward_3=MRecalculate(search=7,.....)
MBlockFps or MFlowFps(backward_3, forward_3,.....)

Using the two new search types in the main MAnalyse is not a good idea.
PetitDragon is offline  
post #702 of 1969 Old 11-27-2010, 08:34 AM
Senior Member
 
widezu69's Avatar
 
Join Date: Feb 2010
Posts: 319
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Incorporated the new search functions here:

SetMemoryMax(1536)
SetMTMode(1,0)
V = ffdshow_source()
SetMTMode(2)
S = V.MSuper(pel=2, hpad=0, vpad=0, rfilter=4)
A = S.MAnalyse(isb=true, blksize=16, search=3, plevel=0, searchparam=3, badrange=(-24))
B = S.MAnalyse(isb=false, blksize=16, search=3, plevel=0, searchparam=3, badrange=(-24))
C = S.MRecalculate(A, blksize=8, search=6, searchparam=1)
D = S.MRecalculate(B, blksize=8, search=6, searchparam=1)
E = S.MRecalculate(C, blksize=8, search=7, searchparam=1)
F = S.MRecalculate(D, blksize=8, search=7, searchparam=1)
G = S.MRecalculate(E, blksize=4, search=3, searchparam=0)
H = S.MRecalculate(F, blksize=4, search=3, searchparam=0)
V.MFlowFps(S, G, H, num=FramerateNumerator(V)*2, den=FramerateDenominator(V)*1, mask=2, ml=10000)
SetMTMode(1)
GetMTMode(false) > 0 ? distributor() : last

Basically first pass exhaustive block size 16 with search param level 3
Second and third passes using horizontal and vertical passes respectively block size 8 search param level 1
Final (forth) pass exhaustive block size 4 search param level 0.

Test and see what it affects. From what I have tried, it doesn't really improve on anything but others may disagree. Anyways best script (for me) is still:

SetMemoryMax(1536)
SetMTMode(1,16)
V = ffdshow_source()
SetMTMode(2)
S = V.MSuper(pel=2, hpad=0, vpad=0, rfilter=4)
A = S.MAnalyse(isb=true, blksize=16, search=3, plevel=0, searchparam=3, badrange=(-24))
B = S.MAnalyse(isb=false, blksize=16, search=3, plevel=0, searchparam=3, badrange=(-24))
C = S.MRecalculate(A, blksize=8, search=3, searchparam=1)
D = S.MRecalculate(B, blksize=8, search=3, searchparam=1)
E = S.MRecalculate(C, blksize=4, search=3, searchparam=0)
F = S.MRecalculate(D, blksize=4, search=3, searchparam=0)
V.MFlowFps(S, E, F, num=FramerateNumerator(V)*2, den=FramerateDenominator(V)*1, mask=2, ml=10000)
SetMTMode(1)
GetMTMode(false) > 0 ? distributor() : last
widezu69 is offline  
post #703 of 1969 Old 11-27-2010, 10:56 AM
Newbie
 
LeoMx's Avatar
 
Join Date: Mar 2009
Posts: 8
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 11
Quote:
Originally Posted by neograniceni View Post

--- Ingredients ---

1. Download and install Avisynth

2. Download and install ffdshow
Select "Select Components / AviSynth script serving" and "Application plugins / AviSynth" during installation

3. Download and install MPC-HC 32-bit

4. Download MVTools2
Extract mvtools2.dll to Avisynth's plugin folder
("c:\\Program Files\\AviSynth 2.5\\plugins\\" on 32-bit Win or "c:\\Program Files (x86)\\AviSynth 2.5\\plugins\\" on 64-bit Win)

5. Download modified avisynth.dll and copy it over the existing one in "\\Windows\\System32\\" folder (32-bit Win), or "c:\\Windows\\SysWOW64\\" folder (64-bit Win)

6. Download and install Reclock (optional)

7. Download and install CoreAVC (optional - useful for Nvidia card due to CoreAVC's CUDA support) - NOT FREE !!!

8. Download and install Haali Media Splitter (it is also included in CoreAVC package, so you could install it from there)


--- Recipe ---

We need to configure ffdshow, MPC-HC, Reclock (and CoreAVC if you plan to use it - and you should if you own some Nvidia CUDA aware gfx card)

1. Run ffdshow Video decoder configuration from the Start menu. Under the Codecs section do as follows: disable H.264/AVC if you use Nvidia gfx, otherwise leave it as it is. Set MPEG2 to libmpeg2. Set AviSynth to AviSynth. Set RAW video to all supported. Go to the AviSynth section; check AviSynth, uncheck Add ffdshow video source, set 3:2 Pulldown to Ignore pulldown, uncheck YUY2, RGB24 and RGB32, set Buffer back/ahead to 0/16 for quad core CPU with hyperthreading (or 0/12 for dual/quad core CPU without hyperthreading, or experiment with something else in case of troubles). Copy/past my script (or any other script you find here) into the script editor. You can also enable subtitles under the Subtitles section and adjust font charset, size, weight, size etc. I suggest using ffdshow subtitles instead of MPC-HC's for maximum control and customization.

2. Run MPC-HC from the Start menu, select View/options and do as follows: under the Player section disable "Store to .ini" file (very important for correct and fast MPC-HC startup). Under the Formats section click the Video button at the bottom right, then click Apply. If you don't want to use MPC-HC's subtitles module (and plan to use ffdshow for subtitles) go to the Playback section and uncheck "Auto-load subtitles". Go to the Output section an check EVR under DirectShow video. Also select Reclock as an Audio Renderer (optional, recommended to avoid video skippings). If you plan to use my script with fixed 60Hz display/TV you can leave the options from the Fullscreen section as they allready are by defaults. In that case you will also need to modify my script as stated below "For TVs not capable to work at 50hz You can replace the following lines;" line (see my previous posts). If your TV is 50Hz capable go to the Fullscreen section and check "Use autochange", also check "Restore resolution on program exit", and set as follows: 23.50-24 Hz, 24.50-25Hz and 23.976Hz (24P) to your TV's max. (native) resolution and 50Hz frequency. For 29.50-30Hz and 29.97Hz (NTSC) set your TV's max. (native) resolution and 60Hz frequency. Go to the Internal Filters section. Uncheck Matroska Source Filters. Uncheck "H264/AVC (DXVA)" and "H264/AVC (FFmpeg)". Go to the External Filters section. Click Add Filter... and search for ffdshow Video Decoder. Select it, then click OK. Repeat the same for Core AVC Video Decoder (if you want to use it as H264 decoder). Also highlight both the filters as preferred.

3. (optional) Run Configure CoreAVC from the Start menu (if you have it installed), be sure to check on "Prefer CUDA acceleration". You can also play with Input/Output levels later during video playback if you find video black level somewhat screwed up.

4. (optional) Run Configure Reclock from the Start menu. Configure it according to your needs. Be sure to uncheck VSYNC Correction under the Advanced settings tab. Start to play some video and during playback left click on Reclock's system tray icon. Set Media adaptation to Auto (best), also check Locked. Don't worry about "Cannot sync the CINEMA video to your hardware..." message.

That's all folks, apologies for my lame english, enjoy and peace be with you.

Hi guys, I've been reading the forum and see the improvements in motion interpolation... but I was wondering if anyone could post an all new brand tutorial with the updated plugins in order to get max quality/performance, because there are many scripts that doesn't work with the quoted tutorial.

Also I'd like to ask a recomended settings/scripts for a phenom II x4

Thnx in advance
LeoMx is offline  
post #704 of 1969 Old 11-27-2010, 12:16 PM
Senior Member
 
SubJunk's Avatar
 
Join Date: May 2010
Posts: 331
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 3 Post(s)
Liked: 10
Quote:
Originally Posted by widezu69 View Post

Incorporated the new search functions here:

SetMemoryMax(1536)
SetMTMode(1,0)
V = ffdshow_source()
SetMTMode(2)
S = V.MSuper(pel=2, hpad=0, vpad=0, rfilter=4)
A = S.MAnalyse(isb=true, blksize=16, search=3, plevel=0, searchparam=3, badrange=(-24))
B = S.MAnalyse(isb=false, blksize=16, search=3, plevel=0, searchparam=3, badrange=(-24))
C = S.MRecalculate(A, blksize=8, search=6, searchparam=1)
D = S.MRecalculate(B, blksize=8, search=6, searchparam=1)
E = S.MRecalculate(C, blksize=8, search=7, searchparam=1)
F = S.MRecalculate(D, blksize=8, search=7, searchparam=1)
G = S.MRecalculate(E, blksize=4, search=3, searchparam=0)
H = S.MRecalculate(F, blksize=4, search=3, searchparam=0)
V.MFlowFps(S, G, H, num=FramerateNumerator(V)*2, den=FramerateDenominator(V)*1, mask=2, ml=10000)
SetMTMode(1)
GetMTMode(false) > 0 ? distributor() : last

Basically first pass exhaustive block size 16 with search param level 3
Second and third passes using horizontal and vertical passes respectively block size 8 search param level 1
Final (forth) pass exhaustive block size 4 search param level 0.

Test and see what it affects. From what I have tried, it doesn't really improve on anything but others may disagree. Anyways best script (for me) is still:

SetMemoryMax(1536)
SetMTMode(1,16)
V = ffdshow_source()
SetMTMode(2)
S = V.MSuper(pel=2, hpad=0, vpad=0, rfilter=4)
A = S.MAnalyse(isb=true, blksize=16, search=3, plevel=0, searchparam=3, badrange=(-24))
B = S.MAnalyse(isb=false, blksize=16, search=3, plevel=0, searchparam=3, badrange=(-24))
C = S.MRecalculate(A, blksize=8, search=3, searchparam=1)
D = S.MRecalculate(B, blksize=8, search=3, searchparam=1)
E = S.MRecalculate(C, blksize=4, search=3, searchparam=0)
F = S.MRecalculate(D, blksize=4, search=3, searchparam=0)
V.MFlowFps(S, E, F, num=FramerateNumerator(V)*2, den=FramerateDenominator(V)*1, mask=2, ml=10000)
SetMTMode(1)
GetMTMode(false) > 0 ? distributor() : last

Frame-by-frame comparison shows that those 2 scripts produce identical results. Search parameters 6 and 7 are just split up versions of 3, so that makes sense.

Quote:
Originally Posted by LeoMx View Post

Hi guys, I've been reading the forum and see the improvements in motion interpolation... but I was wondering if anyone could post an all new brand tutorial with the updated plugins in order to get max quality/performance, because there are many scripts that doesn't work with the quoted tutorial.

Also I'd like to ask a recomended settings/scripts for a phenom II x4

Thnx in advance

I think Widezu was planning to make such a thread. I don't think he has yet, though.
SubJunk is offline  
post #705 of 1969 Old 11-27-2010, 12:44 PM
Newbie
 
nightfire's Avatar
 
Join Date: Nov 2010
Posts: 5
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Hey everyone,

I recently upgraded from x86 XP to x86_64 Windows 7 and the only thing left I'm trying to get running again is my MPC-HT/AviSynth/MT/mvtools2 setup (for realtime MFlowFPS frame doubling).

I've tried every combination of 32bit and 64bit builds, SEt's avisynth 2.6 with MT, stock 2.5.8 with MT.. but no matter what I do, it always crashes on startup the moment I wrap the script in SetMTMode (2,8)/distribute (). Without MT, it works perfectly, but too slow for realtime. But it least it validates the stack.

Tried installing various msvcr71.dll/msvcp71.dll combinations (both from plugin archives and from the MS runtime packages).

I'm a bit of a windows noob (*nix admin by trade) and I've hit a wall.. any suggestions? I'm decent with C/C++ on unix and I'm certainly not against installing visual studio and the MS debuggers to track down the line in the code, but it does feel like a big undertaking. Hoping someone else might drop the magic: try this.. to fix it first. I'm desperate to get this working again!
nightfire is offline  
post #706 of 1969 Old 11-27-2010, 01:07 PM
Newbie
 
LeoMx's Avatar
 
Join Date: Mar 2009
Posts: 8
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 11
Quote:
Originally Posted by SubJunk View Post

I think Widezu was planning to make such a thread. I don't think he has yet, though.

I'll stick with my current settings in the meanwhile
LeoMx is offline  
post #707 of 1969 Old 11-27-2010, 02:35 PM
Member
 
Delerue's Avatar
 
Join Date: Nov 2006
Posts: 73
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by nightfire View Post

Hey everyone,

I recently upgraded from x86 XP to x86_64 Windows 7 and the only thing left I'm trying to get running again is my MPC-HT/AviSynth/MT/mvtools2 setup (for realtime MFlowFPS frame doubling).

I've tried every combination of 32bit and 64bit builds, SEt's avisynth 2.6 with MT, stock 2.5.8 with MT.. but no matter what I do, it always crashes on startup the moment I wrap the script in SetMTMode (2,8)/distribute (). Without MT, it works perfectly, but too slow for realtime. But it least it validates the stack.

Tried installing various msvcr71.dll/msvcp71.dll combinations (both from plugin archives and from the MS runtime packages).

I'm a bit of a windows noob (*nix admin by trade) and I've hit a wall.. any suggestions? I'm decent with C/C++ on unix and I'm certainly not against installing visual studio and the MS debuggers to track down the line in the code, but it does feel like a big undertaking. Hoping someone else might drop the magic: try this.. to fix it first. I'm desperate to get this working again!

I suggest that you drop all the DLLs (mvtools, avisynth and devil) to 'depency walker' app (one per time) and check for any dependency that isn't in you computer. Maybe you forgot something ('DevIL.dll'?). I had a problem like yours once, and the solution was to copy a dll dependency; unfortunately I don't remember which one was.

In time, maybe you could try to install VisualStudio runtimes, like 'vcredist_x64.exe', for example.

Good luck!
Delerue is offline  
post #708 of 1969 Old 11-27-2010, 03:14 PM
Senior Member
 
SubJunk's Avatar
 
Join Date: May 2010
Posts: 331
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 3 Post(s)
Liked: 10
I hate to ask but do you have a multi-core CPU?
If no, then mt won't work.
If yes, try changing SetMTMode(2,8) to SetMTMode(2,0)
SubJunk is offline  
post #709 of 1969 Old 11-27-2010, 03:29 PM
Senior Member
 
widezu69's Avatar
 
Join Date: Feb 2010
Posts: 319
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Hi guys an updated guide is coming but I'm really busy at the moment with essays and coursework, please bear with me I'm still human!
widezu69 is offline  
post #710 of 1969 Old 11-27-2010, 07:37 PM
Newbie
 
nightfire's Avatar
 
Join Date: Nov 2010
Posts: 5
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by Delerue View Post

I suggest that you drop all the DLLs (mvtools, avisynth and devil) to 'depency walker' app (one per time) and check for any dependency that isn't in you computer. Maybe you forgot something ('DevIL.dll'?). I had a problem like yours once, and the solution was to copy a dll dependency; unfortunately I don't remember which one was.

In time, maybe you could try to install VisualStudio runtimes, like 'vcredist_x64.exe', for example.

Good luck!

Yeah, tried that .. and it did find a bunch of broken dependencies. But, I resolved them all except 3, which I guessed were nothing to worry about:

GPSVC.dll (no 32bit version exists, but I do have a 64bit one in System32)
SHLWAPI.DLL (depends on GPSVC.dll)
IEFRAME.DLL (I *think* it also depends on GPSVC.dll)

Do you see these as well?
nightfire is offline  
post #711 of 1969 Old 11-27-2010, 07:39 PM
Newbie
 
nightfire's Avatar
 
Join Date: Nov 2010
Posts: 5
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by SubJunk View Post

I hate to ask but do you have a multi-core CPU?
If no, then mt won't work.
If yes, try changing SetMTMode(2,8) to SetMTMode(2,0)

Ya.. running a core2 quad @ 3.3ghz. All this stuff was working beautifully before.. I can't go back to watching @ 24fps!
nightfire is offline  
post #712 of 1969 Old 11-27-2010, 07:58 PM
Newbie
 
nightfire's Avatar
 
Join Date: Nov 2010
Posts: 5
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Actually, if anyone is familiar with the code, I finally managed to get a debug version of mvtools2 compiled, and run under WinDbg to figure out exactly where it's dying. It's here:

Code:
.. else if (mode==2) // default, best working mode
        {
                for (int h=0; h> 8 ; // simple temporal non-MC average
                                        int dyn =  MEDIAN(avg, pMCB[w], pMCF[w]); // dynamic median
                                        pDst[w] = dyn;
                        }
                        pDst += dst_pitch;
                        pMCB += MCB_pitch;
                        pMCF += MCF_pitch;
                        pRef += ref_pitch;
                        pSrc += src_pitch;
                }
        }
Specifically, mvblockfps.cpp:453: int dyn = MEDIAN(avg, pMCB[w], pMCF[w]); // dynamic median

(1114.908): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
mvtools2!MVBlockFps::ResultBlock+0x200:
65a364a0 0fb608 movzx ecx,byte ptr [eax] ds:002b:b4640436=??

I guess.. due to a thread shared memory boundary violation or something? I'm very new to all of this..
nightfire is offline  
post #713 of 1969 Old 11-27-2010, 09:39 PM
Member
 
Delerue's Avatar
 
Join Date: Nov 2006
Posts: 73
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by nightfire View Post

Yeah, tried that .. and it did find a bunch of broken dependencies. But, I resolved them all except 3, which I guessed were nothing to worry about:

GPSVC.dll (no 32bit version exists, but I do have a 64bit one in System32)
SHLWAPI.DLL (depends on GPSVC.dll)
IEFRAME.DLL (I *think* it also depends on GPSVC.dll)

Do you see these as well?

Which one are you talking about: avisynth or devil? Here both avisynth and devil DLLs return only this dependency missing:

DEVMGR.DLL
MSJAVA.DLL

Of course, these two DLLs aren't necessary. I'm using XP x64 by the way. Haven't you installed vcredist x64 package (maybe you must install the x86 too)?
Delerue is offline  
post #714 of 1969 Old 11-27-2010, 11:26 PM
Newbie
 
nightfire's Avatar
 
Join Date: Nov 2010
Posts: 5
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by Delerue View Post

Which one are you talking about: avisynth or devil? Here both avisynth and devil DLLs return only this dependency missing:

DEVMGR.DLL
MSJAVA.DLL

Of course, these two DLLs aren't necessary. I'm using XP x64 by the way. Haven't you installed vcredist x64 package (maybe you must install the x86 too)?

Oh, it was avisynth.dll, but the dependency checker followed through to devil.dll which actually contained the references.

In any case, problem solved!

In stepping through the code (from my last post) I found the bad pointer and calling function, and it referenced YUV2. So I went to check, and thought .. maybe if I disable that colorspace it'll magically start working (desperate.. yes ). It didn't, but it did lead me to start toggling the other options.

As soon as I turned off "Add ffdshow video source" it came to life!

Moreover I'm using the x64 builds now, and man is it fast! Just watched Star Trek 2009 with MFlowFPS pel=2, 16x16 blocks. Stunning. 80% CPU usage, and rock solid.. no stuttering.

Happy camper again. Thanks for the help!
nightfire is offline  
post #715 of 1969 Old 11-28-2010, 05:52 AM
Member
 
HolyWu's Avatar
 
Join Date: Nov 2010
Posts: 21
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Hi SubJunk:

I remember you have suggested different blksize for different resolution, which is 32/16/4 and 16/8/4 for 1080p/720p and 480p respectively. But I notice the script in your blog doesn't use that?

Regards
HolyWu is offline  
post #716 of 1969 Old 11-28-2010, 06:01 AM
Member
 
HolyWu's Avatar
 
Join Date: Nov 2010
Posts: 21
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by travolter View Post

.-Use the x64bits version of mplayerHC/ffdshow/avisynth/mvtools2.. and you will save 10% of cpu

Try to get the best performance of your CPU with x64... and enjoy

The only problem I have is that ReClock doesn't have x64 version. Seems the development team doesn't plan to support x64 version.
HolyWu is offline  
post #717 of 1969 Old 11-28-2010, 11:39 AM
Senior Member
 
SubJunk's Avatar
 
Join Date: May 2010
Posts: 331
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 3 Post(s)
Liked: 10
Quote:
Originally Posted by HolyWu View Post

Hi SubJunk:

I remember you have suggested different blksize for different resolution, which is 32/16/4 and 16/8/4 for 1080p/720p and 480p respectively. But I notice the script in your blog doesn't use that?

Regards

Yes, it's just because I no longer recommend it. I update the blog regularly to keep the highest quality
SubJunk is offline  
post #718 of 1969 Old 11-30-2010, 07:21 PM
Member
 
safe bobo's Avatar
 
Join Date: Jun 2007
Posts: 90
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 12
I would love to get this to work, but I try following the steps and it don't work.
Maybe the closest I can get is there is no function named settmmode or something along the lines of that from my memory.

Also,I usually use splayer, i believe it uses EVR. and the colors look different from mpc

My 60hz lcd is set to 48hz. That's the closest I can get to getting something a bit smoother than just 60hz.
safe bobo is offline  
post #719 of 1969 Old 12-03-2010, 04:14 AM
Senior Member
 
widezu69's Avatar
 
Join Date: Feb 2010
Posts: 319
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Alright a crash course for now:

madvr works best with this script. So what I suggest is donwload mpc-hc 32 bit and install.

Then download and install madvr, also download reclock and install.

If using nvidia purchase and install CoreAVC, do not install their included version of Haali splitter, it is outdated, download and install the newst version and install with all options. Enable Cuda in the CoreAVC options.

Now download Avisynth 2.6 alpha and install.

Download the newst ffdshow check the Avisynth options and install. If using CoreAVC then allow all for raw video.

Open mpc and go to options -> output and select madvr as your renderer and Reclock as your audio renderer.

Click internal filters on the left hand side and uncheck all the options.

External filters -> add ffdshow video decoder and set the merit to prefer.

Download these http://www.megaupload.com/?d=SP5FE2KG and http://www.mediafire.com/file/2dz4y0wztzz/avisynth.7z and put them in your system32 or SysWOW64 (if using 64 bit Windows).

Download mvtools2 and put it in your plugins folder in your avisynth directory.

Open ffdshow, and add this script:

SetMemoryMax(1536)
SetMTMode(1,16)
V = ffdshow_source()
SetMTMode(2)
S = V.MSuper(pel=2, hpad=0, vpad=0, rfilter=4)
A = S.MAnalyse(isb=true, blksize=16, search=3, plevel=0, searchparam=3, badrange=(-24))
B = S.MAnalyse(isb=false, blksize=16, search=3, plevel=0, searchparam=3, badrange=(-24))
C = S.MRecalculate(A, blksize=8, search=3, searchparam=1)
D = S.MRecalculate(B, blksize=8, search=3, searchparam=1)
E = S.MRecalculate(C, blksize=4, search=3, searchparam=0)
F = S.MRecalculate(D, blksize=4, search=3, searchparam=0)
V.MFlowFps(S, E, F, num=FramerateNumerator(V)*2, den=FramerateDenominator(V)*1, mask=2, ml=10000)
SetMTMode(1)
GetMTMode(false) > 0 ? distributor() : last

The second line will be SetMTMode(1,x) x being the number of threads your cpu can do x2.

Make sure you are running your monitor at 48hz and play a video. If you run into problems let me know I may have forgotten something.
Peace
widezu69 is offline  
post #720 of 1969 Old 12-03-2010, 07:36 AM
Member
 
HolyWu's Avatar
 
Join Date: Nov 2010
Posts: 21
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
For people who don't know, the official build of AviSynth 2.6.0 Alpha 2 still not include MT yet. Here is the MT version dll for 2.6.
HolyWu is offline  
Sponsored Links
Advertisement
 
Reply Home Theater Computers

Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page


Forum Jump: 

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off