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 29th May 2015, 15:27   #1  |  Link
8-BaLL
Registered User
 
Join Date: Jun 2012
Posts: 74
Is there a Tutorial for QTGMC with VapourSynth?

Hey guys,

Id like to test VapourSynth and so far Ive installed it succesfully.

Im new to the scripting with python however.

Since I didnt find much info in google, is there some sort of tutorial how to run QTGMC with vapoursynth and is there a collection of all required plugins for QTGMC which are VS-compatible?

This is the simple task I wanna use (Avisynth script):

Quote:
loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\LSMASHSource.dll")
LWLibavVideoSource("D:\testfile.ts")
qtgmc(preset="very slow")
selecteven()
spline64resize(1280,720)
can someone translate it to VS-script, so I can copy paste it please?

Thanks
8-BaLL is offline   Reply With Quote
Old 29th May 2015, 15:32   #2  |  Link
captainadamo
Registered User
 
Join Date: Feb 2015
Posts: 70
Check out this thread.
captainadamo is offline   Reply With Quote
Old 29th May 2015, 15:55   #3  |  Link
8-BaLL
Registered User
 
Join Date: Jun 2012
Posts: 74
Its not a tutorial though, I dont understand **** in that thread...

Looks like this tool needs another year or 2 to become somewhat "usable". Not having a preview program like AVSPmod is really a pita, plus I cant find anything about Megui beeing able to handle VSynth scripts...

I guess this VS really has potential, but due to the lack of comfortable use of it, it will stay a niche tool for a long time.

Last edited by 8-BaLL; 29th May 2015 at 15:59.
8-BaLL is offline   Reply With Quote
Old 29th May 2015, 15:59   #4  |  Link
captainadamo
Registered User
 
Join Date: Feb 2015
Posts: 70
The first post isn't that long and has exactly what you need to run QTGMC:

Quote:
Usage Example:
Firstly, put havsfunc.py to Python\Lib\site-packages.
Code:
Code:
import vapoursynth as vs
import havsfunc as haf
core = vs.get_core()
clip = yourclip
clip = haf.QTGMC(clip, Preset='Medium', TFF=True)

Last edited by captainadamo; 29th May 2015 at 16:14.
captainadamo is offline   Reply With Quote
Old 29th May 2015, 16:15   #5  |  Link
8-BaLL
Registered User
 
Join Date: Jun 2012
Posts: 74
Is there some sort of preview to see the changes I do in the script or to see the effect of the script, like the image quality etc...? Like the preview in MeGui or AVSPmod?
8-BaLL is offline   Reply With Quote
Old 29th May 2015, 16:20   #6  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,126
http://forum.doom9.org/showthread.php?t=170965
Or just load in MPC-HC or VirtualDub.
sneaker_ger is offline   Reply With Quote
Old 29th May 2015, 16:22   #7  |  Link
captainadamo
Registered User
 
Join Date: Feb 2015
Posts: 70
Vapoursynth Editor.
captainadamo is offline   Reply With Quote
Old 29th May 2015, 16:29   #8  |  Link
8-BaLL
Registered User
 
Join Date: Jun 2012
Posts: 74
Ok thanks, how do I translate this line into VS counterpart?

Quote:
LWLibavVideoSource("D:\testfile.ts")
8-BaLL is offline   Reply With Quote
Old 29th May 2015, 16:30   #9  |  Link
mawen1250
Registered User
 
Join Date: Aug 2011
Posts: 104
I think what you need is to first spend some time reading the official documentation.
mawen1250 is offline   Reply With Quote
Old 29th May 2015, 16:32   #10  |  Link
8-BaLL
Registered User
 
Join Date: Jun 2012
Posts: 74
I did but it seems like its a little outdated, for example it says to use "ret = core.ffms2.Source" while in QTGMC example it uses "clip="

Just as an example. Another example it doesnt recognize "LWLibavVideoSource" although its supposed to be in "Native Plugins"...

Last edited by 8-BaLL; 29th May 2015 at 16:36.
8-BaLL is offline   Reply With Quote
Old 29th May 2015, 16:36   #11  |  Link
captainadamo
Registered User
 
Join Date: Feb 2015
Posts: 70
Quote:
Originally Posted by 8-BaLL View Post
Ok thanks, how do I translate this line into VS counterpart?
We have a forum search feature here. But here is an example.

Quote:
Originally Posted by 8-BaLL View Post
I did but it seems like its a little outdated, for example it says to use "ret = core.ffms2.Source" while in QTGMC example it uses "clip="

Just as an example.
That's just a variable name for the clip that is returned from the source filter and it can be anything you want. You can either change both to be "ret" or both to "clip" or basically anything you want as long as it's consistent. Everyone names their variables slightly differently.
captainadamo is offline   Reply With Quote
Old 29th May 2015, 16:49   #12  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,126
Quote:
Originally Posted by 8-BaLL View Post
Just as an example. Another example it doesnt recognize "LWLibavVideoSource" although its supposed to be in "Native Plugins"...
Native plugin means it's not an AviSynth plugin.
I think l-smash would be something like "core.lsmas.LWLibavSource()". They are all in their respective namespaces, here "lsmas".
sneaker_ger is offline   Reply With Quote
Old 29th May 2015, 17:01   #13  |  Link
YamashitaRen
Registered User
 
Join Date: Apr 2014
Location: France
Posts: 33
Quote:
Originally Posted by 8-BaLL View Post
Just as an example. Another example it doesnt recognize "LWLibavVideoSource" although its supposed to be in "Native Plugins"...
This one is a bit hard to find so I'll help you :
Code:
Clip=core.lsmas.LWLibavSource("D:\testfile.ts")
I let you find which dll you need etc...

By the way, Vapoursynth is mature enough to be efficiently used for whatever you need. Don't be afraid by python.
The only problem that you're likely to encounter is the lack of native plugins... which is not a problem when you only want to use QTGMC

edit : preceded by sneaker_ger
YamashitaRen is offline   Reply With Quote
Old 29th May 2015, 17:17   #14  |  Link
captainadamo
Registered User
 
Join Date: Feb 2015
Posts: 70
But even if it lacks a native plugin you want it is not a big deal as long as you stick to 32-bit since it should support it through the Avisynth compatibility layer. And if it's important enough to have someone is likely to step up and port it over.
captainadamo is offline   Reply With Quote
Old 29th May 2015, 17:29   #15  |  Link
8-BaLL
Registered User
 
Join Date: Jun 2012
Posts: 74
OK I give up... Its a freaking journey to figure out how to spline64resize something, not to mention everything else.

Reason why avisynth is so popular is because its almost selfexplanatory and works in a logical way. The first post in the VS thread is from 2011 and this forum subsection has like 10 threads. There is a reason why...

Ill have to experiment with Avisynth MT then I guess to improve the speed. At the current stage VS is not of much use for me.
8-BaLL is offline   Reply With Quote
Old 29th May 2015, 17:36   #16  |  Link
captainadamo
Registered User
 
Join Date: Feb 2015
Posts: 70
Quote:
OK I give up... Its a freaking journey to figure out how to spline64resize something, not to mention everything else.
Yeah, a journey that took me 5 seconds to find this page from the documentation you were linked. It was very hard to click under the "Table of Contents" header the part that said "Function Reference" then click "Resize".

Quote:
Reason why avisynth is so popular is because its almost selfexplanatory and works in a logical way. The first post in the VS thread is from 2011 and this forum subsection has like 10 threads. There is a reason why...
Not really. Avisynth does many things illogically and its syntax is hardly "selfexplanatory". There are plenty of semantic gotchas that people new to Avisynth have issues with. You're confusing your familiarity with it for the qualities you claim it has.

Last edited by captainadamo; 29th May 2015 at 17:38.
captainadamo is offline   Reply With Quote
Old 29th May 2015, 17:38   #17  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,126
Yep, it's not that hard, really.

http://www.vapoursynth.com/doc/avisynthcomp.html
http://www.vapoursynth.com/doc/functions/resize.html (or the great fmtconv)
sneaker_ger is offline   Reply With Quote
Old 29th May 2015, 17:42   #18  |  Link
8-BaLL
Registered User
 
Join Date: Jun 2012
Posts: 74
I was looking at exactly the same page and trying out what is shown there.

this line:

resize.Lanczos(width=1280, height=720) and just

Lanczos(width=1280, height=720)

and all possible other combinations dont work, it says:

"Python exception: name 'resize' is not defined"


Also how do I use spline64 or spline36 or spline16 or lanczos4? None of that shit is explained there. Just "Spline", just "lanczos"... etc.

Last edited by 8-BaLL; 29th May 2015 at 17:46.
8-BaLL is offline   Reply With Quote
Old 29th May 2015, 17:47   #19  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,126
Use fmtconv for advanced resizing stuff, I think the inbuilt resize only has 1 option each. (The doc should be updated to say which one) fmtconv comes with a very good documentation.

Always use variable for clips:
ret=core.resize.Lanczos(ret, width=1920, height=1080)

Last edited by sneaker_ger; 29th May 2015 at 17:59.
sneaker_ger is offline   Reply With Quote
Old 29th May 2015, 17:50   #20  |  Link
captainadamo
Registered User
 
Join Date: Feb 2015
Posts: 70
Quote:
Originally Posted by 8-BaLL View Post
I was looking at exactly the same page and trying out what is shown there.

this line:

resize.Lanczos(width=1280, height=720) and just

Lanczos(width=1280, height=720)

and all possible other combinations dont work, it says:

"Python exception: name 'resize' is not defined"
Because it has to be called off of the vscore object in your script. The example scripts you've been given show how to call functions. You could have also searched this board and would have found example of how to resize.

Quote:
Originally Posted by 8-BaLL View Post
Also how do I use spline64 or spline36 or spline16 or lanczos4? None of that shit is explained there. Just "Spline", just "lanczos"... etc.
You need something like ftmconv. Vapoursynth only has basic resizers.

Last edited by captainadamo; 29th May 2015 at 17:56.
captainadamo 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 21:55.


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