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 > Capturing and Editing Video > VapourSynth

Reply
 
Thread Tools Search this Thread Display Modes
Old 21st September 2014, 22:36   #1  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 725
MVTools, Depan, DepanEstimate for VapourSynth

So I thought, "Why not port MVTools?"

https://github.com/dubhater/vapoursy...tools/releases

readme.rst

Now includes ports of Depan and DepanEstimate.

Crashes or corrupted output may happen, as I haven't done very extensive testing.
__________________
Buy me a "coffee" and/or hire me to write code!

Last edited by jackoneill; 22nd June 2016 at 12:53.
jackoneill is offline   Reply With Quote
Old 21st September 2014, 22:49   #2  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,117
Awesome!

Thanks for your efforts.
Reel.Deel is offline   Reply With Quote
Old 22nd September 2014, 01:22   #3  |  Link
Mystery Keeper
Beyond Kawaii
 
Mystery Keeper's Avatar
 
Join Date: Feb 2008
Location: Russia
Posts: 712
Myrsloik was against it, but since we've got no better alternative, THANK YOU! With native motion compensation VapourSynth can finally have all the best filters without the need to use AviSynth plugins!
__________________
...desu!
Mystery Keeper is offline   Reply With Quote
Old 22nd September 2014, 04:33   #4  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: Los Angeles, California
Posts: 2,133
dope work, thx for ur support to vapoursynth, I'm tryna have a taste of new vapoursynth lately
feisty2 is offline   Reply With Quote
Old 22nd September 2014, 14:32   #5  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,031
Quote:
Originally Posted by Mystery Keeper View Post
Myrsloik was against it, but since we've got no better alternative, THANK YOU! With native motion compensation VapourSynth can finally have all the best filters without the need to use AviSynth plugins!
I was mostly against touching that code myself and trying to clean it up. It's obvious that jackoneill can tolerate worse code than me.

Now it's time for some VapourSynth world domination!
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is online now   Reply With Quote
Old 22nd September 2014, 20:41   #6  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 725
v1.1 fixes a crash and brings back the "dct" parameter to Analyse and Recalculate. Now you can make your scripts really slow.
__________________
Buy me a "coffee" and/or hire me to write code!
jackoneill is offline   Reply With Quote
Old 23rd September 2014, 04:18   #7  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,155
great news, have been waiting for this who knows how long.

I did some benchmarks with the sample script for mdegrain2 in the documentation,
Quote:
AVISource("c:\test.avi") # or MPEG2Source, DirectShowSource, some previous filter, etc
super = MSuper(pel=2, sharp=1)
backward_vec2 = MAnalyse(super, isb = true, delta = 2, overlap=4)
backward_vec1 = MAnalyse(super, isb = true, delta = 1, overlap=4)
forward_vec1 = MAnalyse(super, isb = false, delta = 1, overlap=4)
forward_vec2 = MAnalyse(super, isb = false, delta = 2, overlap=4)
MDegrain2(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400)
Quote:
super = core.mv.Super(src)
mvbw2 = core.mv.Analyse(super, isb=True, delta=2, overlap=4)
mvbw = core.mv.Analyse(super, isb=True, delta=1, overlap=4)
mvfw = core.mv.Analyse(super, isb=False, delta=1, overlap=4)
mvfw2 = core.mv.Analyse(super, isb=False, delta=2, overlap=4)

out = core.mv.Degrain2(clip=src, super=super, mvbw=mvbw, mvfw=mvfw, mvbw2=mvbw2, mvfw2=mvfw2, thsad=400)
cpu can be loaded 100%, 64 bit version is about 20% faster than 32 bit version. With a 720x480 source, 64 bit gave me 60fps while 32 bit gave me 50fps.
lansing is offline   Reply With Quote
Old 23rd September 2014, 08:54   #8  |  Link
Keiyakusha
契約者
 
Keiyakusha's Avatar
 
Join Date: Jun 2008
Posts: 1,576
On i7 8 threads, the same script as above looks something like this for me:

Vapoursynth x86, d2vsource, vapoursynth-mvtools:
threads=4 -> 27fps, 50% CPU
threads=8 -> 40fps, 100% CPU

AVS+ x86 MT, mpeg2source, mvtools SVP:
Prefetch(4) -> 42fps, 50% CPU
Prefetch(8) -> 57fps, 100% CPU

Edit:
AVS 2.6 x86 MT, mpeg2source, mvtools SVP:
4 threads -> 40fps, 42% CPU
8 threads -> 55fps, 93% CPU

Edit2:
Vapoursynth x86, d2vsource, mvtools SVP (avs plugin):
threads=4 -> 41fps, 50% CPU
threads=8 -> 42fps, 60% CPU (wow, this one sucks >__<)

Anyway, to sum this up, for me vapoursynth-mvtools port is way slower than any other solutions.

Last edited by Keiyakusha; 23rd September 2014 at 09:24.
Keiyakusha is offline   Reply With Quote
Old 23rd September 2014, 12:54   #9  |  Link
Are_
Registered User
 
Join Date: Jun 2012
Location: Ibiza, Spain
Posts: 282
This is on an AMD cpu 8 cores.
MPEG2Source was used on avisynth, and d2vsource for vapoursynth, source was a VOB file from a DVD and used the sample code from lansing:

Code:
# AVISYNTH 2.6  MT - MVTOOLS SVP
Frames processed:                2501 (0 - 2500)
FPS (min | max | average):       34.21 | 82.74 | 51.78
CPU usage (average):             94%
Thread count:                    10
Physical Memory usage (peak):    585 MB
Virtual Memory usage (peak):     733 MB
Time (elapsed):                  000:00:48.304

# VAPOURSYNTH WIN32
Output 2500 frames in 67.32 seconds (37.13 fps)

# VAPOURSYNTH LINUX x86_64 (-march=native -O2)
Output 2500 frames in 55.85 seconds (44.76 fps)

# VAPOURSYNTH LINUX x86_64 (-march=native -Ofast -lto)
Output 2500 frames in 54.89 seconds (45.55 fps)

# VAPOURSYNTH LINUX x86_64 (retarded compiler flags optimizations)
Output 2500 frames in 53.39 seconds (46.83 fps)
All vapoursynth tests were topping the cpu at 100%.

I don't know why avisynth scored so poorly for me compared to Keiyakusha. :/

Last edited by Are_; 23rd September 2014 at 13:41. Reason: corrected test results
Are_ is offline   Reply With Quote
Old 23rd September 2014, 13:15   #10  |  Link
DarkSpace
Registered User
 
Join Date: Oct 2011
Posts: 204
I guess that the difference comes from the fact that Keiyakusha used the SVP MVTools, while the Dither MVTools are probably (does anyone know for certain?) based on the original MVTools2 rather than the modified SVP MVTools.
DarkSpace is offline   Reply With Quote
Old 23rd September 2014, 13:16   #11  |  Link
Keiyakusha
契約者
 
Keiyakusha's Avatar
 
Join Date: Jun 2008
Posts: 1,576
Quote:
Originally Posted by Are_ View Post
I don't know why avisynth scored so poorly for me compared to Keiyakusha. :/
Looks like you incorrectly used MT in Avisynth. It reports threadcount 8 and cpu load 33% but this threadcount is a total value from all the processes involved, means mvtools processing probably was using way less threads.
Edit: well anyway, maybe avsmeter author can explain what this value really shows, but in my case the number of threads was like twice than the ones you have even in case avisynth was configured to 4 threads.
Also in any multithreaded environment, mvtools svp should be noticeably faster than the one from dither package (assuming latter one runs without avstp). However in singlethreaded environment SVP is slower than alternatives.

Edit: in case of AVS+ with the script above, my threadcount reads 20 for Prefetch4 and 24 for Prefetch8. Have no time to install AVS2.6 again but I expect it to be similar.

Last edited by Keiyakusha; 23rd September 2014 at 13:37.
Keiyakusha is offline   Reply With Quote
Old 23rd September 2014, 13:40   #12  |  Link
Are_
Registered User
 
Join Date: Jun 2012
Location: Ibiza, Spain
Posts: 282
Ok my bad, I didn't know setting mtmode half script does not work.

Updated results in the original post.
Are_ is offline   Reply With Quote
Old 23rd September 2014, 13:51   #13  |  Link
TurboPascal7
Registered User
 
TurboPascal7's Avatar
 
Join Date: Jan 2010
Posts: 270
Quote:
Originally Posted by Keiyakusha View Post
Edit: in case of AVS+ with the script above, my threadcount reads 20 for Prefetch4 and 24 for Prefetch8. Have no time to install AVS2.6 again but I expect it to be similar.
More info on this here. It has nothing to do with avsmeter, just avs+ being buggy.
__________________
Me on GitHub | AviSynth+ - the (dead) future of AviSynth
TurboPascal7 is offline   Reply With Quote
Old 23rd September 2014, 14:02   #14  |  Link
Keiyakusha
契約者
 
Keiyakusha's Avatar
 
Join Date: Jun 2008
Posts: 1,576
Quote:
Originally Posted by TurboPascal7 View Post
More info on this here. It has nothing to do with avsmeter, just avs+ being buggy.
Even with avs 2.6 MT avsmeter displays more threads than the number we set in "setmtmode". For whatever reason.
But yeah, I wondered why I have the whole 20+ threads. This explains it!
Keiyakusha is offline   Reply With Quote
Old 23rd September 2014, 14:41   #15  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 725
Anyone want to compare this version's speed when using a single thread and the original Avisynth plugin (2.5.11.3) running in a non-MT Avisynth?
__________________
Buy me a "coffee" and/or hire me to write code!
jackoneill is offline   Reply With Quote
Old 23rd September 2014, 14:48   #16  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,031
Quote:
Originally Posted by jackoneill View Post
Anyone want to compare this version's speed when using a single thread and the original Avisynth plugin (2.5.11.3) running in a non-MT Avisynth?
Original meaning the dither tools version of mvtools. right?
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is online now   Reply With Quote
Old 23rd September 2014, 15:20   #17  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 725
Quote:
Originally Posted by Myrsloik View Post
Original meaning the dither tools version of mvtools. right?
No, original is this: http://avisynth.org.ru/mvtools/mvtools-v2.5.11.3.zip. 8 bit and no internal multithreading.
The one from Dither is a fork of an earlier version of this original.
__________________
Buy me a "coffee" and/or hire me to write code!
jackoneill is offline   Reply With Quote
Old 23rd September 2014, 20:51   #18  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,414
Single threaded performance on my Haswell laptop, 720x480 video, mvdegrain2 script above:
mvtools 2.5: 9.7fps
mvtools 2.6: 20.6fps
vsmvtools 32: 21.0fps
vsmvtools 64: 23.9fps

8-threaded performance:
vsmvtools 32: 36.6
vsmvtools 64: 41.2

Will edit in with avisynth threaded performance when I get hold of it again.
__________________
There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order.
foxyshadis is offline   Reply With Quote
Old 23rd September 2014, 23:44   #19  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,155
720x480 source,

non-mt avisynth mvtools2 original: 12.89fps

single thread vapoursynth:
32 bit: 11.77fps
64 bit: 15fps
lansing is offline   Reply With Quote
Old 24th September 2014, 09:58   #20  |  Link
Keiyakusha
契約者
 
Keiyakusha's Avatar
 
Join Date: Jun 2008
Posts: 1,576
720x480 source. All used plugins are the latest versions.

AVS 2.6 Alpha5, mpeg2source:
vanilla-mvtools: CPU ~15%; 10 fps
svp-mvtools: CPU ~15%; 12.3 fps
dither-mvtools: CPU ~15%; 9.3 fps (without avstp)

Vapoursynth x86, d2vsource:
vapour-mvtools: CPU ~15%; 8.75 fps (threads=1)

Edit: also it might be useful to note that without any processing, d2vsource is 2 times faster than mpeg2source (1000+ fps) so it can't cause any fps drop.

Last edited by Keiyakusha; 24th September 2014 at 10:13.
Keiyakusha is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 19:38.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.