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 6th October 2012, 14:21   #21  |  Link
Chikuzen
typo lover
 
Chikuzen's Avatar
 
Join Date: May 2009
Posts: 597
update
vsavsreader-d219012.7z

* change RGB plane order from G->B->R to R->G->B.
__________________
my repositories
Chikuzen is offline   Reply With Quote
Old 16th November 2012, 02:30   #22  |  Link
Chikuzen
typo lover
 
Chikuzen's Avatar
 
Join Date: May 2009
Posts: 597
update
download it from the link of first post.

* support alpha channel

If input avs is RGB32, alpha will be stored in "_Alpha" prop.
__________________
my repositories
Chikuzen is offline   Reply With Quote
Old 16th November 2012, 02:36   #23  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,035
Quote:
Originally Posted by Chikuzen View Post
update
download it from the link of first post.

* support alpha channel

If input avs is RGB32, alpha will be stored in "_Alpha" prop.
Actually the more proper way to do it to return two clips from the filter. See the avisource code for an example. The basic idea is that you call setvideoinfo(array of two videinfo, 2, core)

And then in the filter's getframe function you call getOutputIndex () to know which of the two clips you should output a frame for. Slightly more complicated to implement but it makes more sense. Or so I think.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 11th January 2013, 17:45   #24  |  Link
Chikuzen
typo lover
 
Chikuzen's Avatar
 
Join Date: May 2009
Posts: 597
updated to vsavsreader-0.1.0

* add new option 'alpha'
* change alpha channel support method.
__________________
my repositories
Chikuzen is offline   Reply With Quote
Old 15th October 2013, 13:21   #25  |  Link
RTW47
Rome Total War
 
RTW47's Avatar
 
Join Date: Mar 2013
Location: C:\Python33
Posts: 39
then I use Eval() function:
Code:
import vapoursynth as vs
core = vs.get_core()
core.std.LoadPlugin(r'C:\Program Files\VapourSynth\filters\vsavsreader.dll')
avs = """
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\LSMASHSource.dll")
LWLibavVideoSource("D:\amv\10bit.mp4", format="YUV420P8")
#ConvertToRGB24(matrix = "Rec709")
"""
video = core.avsr.Eval(lines = avs)
video.set_output()
In Python shell I get this:
Code:
Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:03:43) [MSC v.1600 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> ================================ RESTART ================================
>>> 
Traceback (most recent call last):
  File "C:\Users\Edgaras\Desktop\py\1_vsavsreader # 'Eval' Libav FAIL.py", line 9, in <module>
    video = core.avsr.Eval(lines = avs)
  File "vapoursynth.pyx", line 983, in vapoursynth.Function.__call__ (src\cython\vapoursynth.c:15542)
vapoursynth.Error: 'Eval: 
failed to invoke \nLoadPlugin("C:\\Program Files\\AviSynth 2.5\\plugins\\LSMASHSource.dll")
\nLWLibavVideoSource("D:\x07mv\x08bit.mp4", format="YUV420P8")\n#ConvertToRGB24(matrix = "Rec709")\n'
>>>
then importing same .avs script(s) using vsavsreader's Import() function, then there's no error.

-vapoursynth r20 RC3
-avisynth 2.6 alpha 5
-vsavsreader 0.1.0
__________________
GOTO:EOF

Last edited by RTW47; 15th October 2013 at 16:46. Reason: help ^^"
RTW47 is offline   Reply With Quote
Old 14th December 2014, 23:00   #26  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,117
Dumb question:

If there was a 64-bit version of this plugin could it be used to load 32-bit AviSynth scripts in a 64-bit VapourSynth? I know piping allows using applications interchangeably but that may be something completely different.
Reel.Deel is offline   Reply With Quote
Old 14th December 2014, 23:13   #27  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,035
Quote:
Originally Posted by Reel.Deel View Post
Dumb question:

If there was a 64-bit version of this plugin could it be used to load 32-bit AviSynth scripts in a 64-bit VapourSynth? I know piping allows using applications interchangeably but that may be something completely different.
No. Avisynth is loaded into the same process so it has to be 64bit too. You need a more elaborate wrapper that runs avisynth in a 32bit environment for it to work.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 14th December 2014, 23:19   #28  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,117
Quote:
Originally Posted by Myrsloik View Post
No. Avisynth is loaded into the same process so it has to be 64bit too. You need a more elaborate wrapper that runs avisynth in a 32bit environment for it to work.
Understood, sounds like it's something feasible though. Pity that Chikuzen is no longer around...
Reel.Deel is offline   Reply With Quote
Old 16th December 2014, 11:34   #29  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,035
Quote:
Originally Posted by Reel.Deel View Post
Understood, sounds like it's something feasible though. Pity that Chikuzen is no longer around...
What remaining avisynth things do you need?
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 16th December 2014, 16:53   #30  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,117
Quote:
Originally Posted by Myrsloik View Post
What remaining avisynth things do you need?
I don't have a very strong case here but DGDecNV and DGMPGDec are really hard to leave behind considering how good they've been to me. I know there's d2vsource but as we all know is still a work in progress. On the other hand DGDecNV also comes in 64-bit so I'm wondering if a 64-bit vsavareader would work with 64-bit AviSynth+?

In the meantime I'm using AVFS to create a fake avi and then loading it with VS.
Reel.Deel is offline   Reply With Quote
Old 16th December 2014, 17:19   #31  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,035
Quote:
Originally Posted by Reel.Deel View Post
I don't have a very strong case here but DGDecNV and DGMPGDec are really hard to leave behind considering how good they've been to me. I know there's d2vsource but as we all know is still a work in progress. On the other hand DGDecNV also comes in 64-bit so I'm wondering if a 64-bit vsavareader would work with 64-bit AviSynth+?

In the meantime I'm using AVFS to create a fake avi and then loading it with VS.
Yes, it should work with 64bit avs+ as well. I guess.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 16th December 2014, 17:25   #32  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,117
Quote:
Originally Posted by Myrsloik View Post
Yes, it should work with 64bit avs+ as well. I guess.
Unfortunately I only have Microsoft Visual C++ 2010 Express so I guess I'm SOL when it comes to trying to compile a 64-bit vsavsreader.
Reel.Deel is offline   Reply With Quote
Old 16th December 2014, 17:47   #33  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 1,073
Quote:
Originally Posted by Reel.Deel View Post
Unfortunately I only have Microsoft Visual C++ 2010 Express so I guess I'm SOL when it comes to trying to compile a 64-bit vsavsreader.
http://www.visualstudio.com/en-us/pr...o-community-vs
TheFluff is offline   Reply With Quote
Old 16th December 2014, 17:59   #34  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,117
Visual Studio Community 2013 seems very nice for someone who does this on a regular basis. I've successfully compiled at most 10 avs plugins in the last 2 years. Also I read somewhere that Community version is a very large download/install compared to the express edition.
Reel.Deel is offline   Reply With Quote
Old 16th December 2014, 18:30   #35  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 1,073
there's a difference between being unable to do a thing and being too lazy to do a thing
TheFluff is offline   Reply With Quote
Old 16th December 2014, 19:17   #36  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,117
I don't like to be mean so I deleted my post...

Last edited by Reel.Deel; 16th December 2014 at 19:24.
Reel.Deel is offline   Reply With Quote
Old 16th December 2014, 19:33   #37  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,035
I'm just going to add that using vs avisource to open an avisynth script and (if necessary) fmtconv's 16 bit avisynth compatibility functions should work just as well.

I completely forgot that this plugin kinda is obsolete now because avisource exists.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 16th December 2014, 21:18   #38  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,117
Good point Myrsloik, I completely forgot about avisource also.
Reel.Deel is offline   Reply With Quote
Old 29th December 2014, 14:00   #39  |  Link
HolyWu
Registered User
 
HolyWu's Avatar
 
Join Date: Aug 2006
Location: Taiwan
Posts: 668
Quote:
Originally Posted by Myrsloik View Post
I'm just going to add that using vs avisource to open an avisynth script and (if necessary) fmtconv's 16 bit avisynth compatibility functions should work just as well.

I completely forgot that this plugin kinda is obsolete now because avisource exists.
I just do some experiments, and 64-bit VS AVISource seems to conflict with a avs script using 64-bit DGDecNV as the source filter, while VirtualDub x64 can preview that same avs script without problem. The 64-bit vspipe crashed immediately when opening the vpy script. Do you have a supported NVIDIA card to test?
HolyWu is offline   Reply With Quote
Old 29th December 2014, 14:10   #40  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,035
Quote:
Originally Posted by HolyWu View Post
I just do some experiments, and 64-bit VS AVISource seems to conflict with a avs script using 64-bit DGDecNV as the source filter, while VirtualDub x64 can preview that same avs script without problem. The 64-bit vspipe crashed immediately when opening the vpy script. Do you have a supported NVIDIA card to test?
No, I don't have nvidia stuff. It's probably some kind of threading issue since VapourSynth will use multiple threads to request frames from vfw. Especially when using vspipe.

Try using an mt version of avisynth and see if it helps.

Otherwise you're going to have to run it all in a debugger to see why it dies.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik 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 14:10.


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