Log in

View Full Version : Vapoursynth


Pages : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 [19] 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100

Myrsloik
17th August 2013, 13:06
I found that TDeint runs about 10x~20x slower in VS than AviSynth. Is it because TDeint was not in the prefetch list of avisynth_compat.cpp? Or it has nothing to do with that?

Give me a full example script and I'll try it here.

Myrsloik
17th August 2013, 22:00
import vapoursynth as vs
core = vs.get_core()
core.avs.LoadPlugin(r'C:\Program Files (x86)\AviSynth 2.5\plugins\DGDecodeNV.dll')
core.avs.LoadPlugin(r'C:\Program Files (x86)\AviSynth 2.5\plugins\TDeint.dll')
clip = core.avs.DGSource(r'D:\test.dgi') # a 1920x1080 video
clip = core.avs.TDeint(clip, mode=1, order=1)
clip.set_output()


I don't have an nvidia card. Does it also happen with dgdecode or any other source filter?

Reel.Deel
18th August 2013, 10:14
I encountered something odd with AVISource.

I have this video named "ashCIMG0636.avi".
If I try to open it in VDub with the following script I get an error.

import vapoursynth as vs
core = vs.get_core()
core.std.LoadPlugin(path=r'C:\Vapoursynth\AVISource\avisource.dll')

# Source
last = core.avisource.AVISource("C:\VapourSynth\AVISource\ashCIMG0636.avi", pixel_type="YUY2", fourcc="MJPG")

# Output
last.set_output()


Avisynth open failure:
Python exception: "AVISource autodetect: couldn't open file 'C:\\VapourSynth\\AVISource\x07shCIMG0636.avi'\nError code: 123"


If I change the name to "ASHCIMG0636.avi" it works fine.

Myrsloik
18th August 2013, 10:18
I encountered something odd with AVISource.

I have this video named "ashCIMG0636.avi".
If I try to open it in VDub with the following script I get an error.

import vapoursynth as vs
core = vs.get_core()
core.std.LoadPlugin(path=r'C:\Vapoursynth\AVISource\avisource.dll')

# Source
last = core.avisource.AVISource("C:\VapourSynth\AVISource\ashCIMG0636.avi", pixel_type="YUY2", fourcc="MJPG")

# Output
last.set_output()



If I change the name to "ASHCIMG0636.avi" it works fine.

You forgot to escape the \ properly. Put r before the string.

Reel.Deel
18th August 2013, 10:23
Thanks, it works. :)
Maybe the error message could be a little more informational.

Edit:
Lesson learned.

Myrsloik
18th August 2013, 10:32
Thanks, it works. :)
Maybe the error message could be a little more informational.

It can't. This is a python thing. Same thing as accidentally doing "\new\trees" in C... So it's simply impossible to detect. I warn about it everywhere in the documentation and you should always use / for paths anyway to please the slash gods. Especially relative ones because then scripts will work in more than windows...

Myrsloik
18th August 2013, 10:49
When there is an error/exception occured, the message vspipe shows does not indicate the line number that caused the error/exception. I think that's quite inconvenient to debug.;)

I'll improve the error message everywhere. It's not only vspipe.

Myrsloik
18th August 2013, 15:28
Yes. It's not related to source filter. Tried with lsmashsource(r666).

Here's a new dll for you to try. I added TDeint to the prefetch stuff.

vapoursynth.dll (https://dl.dropboxusercontent.com/u/73468194/vapoursynth.dll)

jpsdr
25th August 2013, 18:52
Sorry to ask stupid version, but i don't find clear answers.
- Is vapoursynth 64bit ? Does the installer install a 64bit version ?
In the first posts it seems to be the case, but on the site, no information, and it's asked to download a 32bit version of python.
I'm confused...
- Can a vapoursynth script be opened with vdub64 ? Can a vapoursynth script be use as input with a 64bit version of x264 ?

sneaker_ger
25th August 2013, 19:19
VapourSynth can be compiled for 64 bit, but Myrsloik does not offer a pre-compiled build for that at the moment. According to the website he does plan to offer Windows x64 builds starting with the next version, though. You can use vspipe.exe to pipe 32 bit scripts into x264 64 bit (similar to AviSynth). I don't think you can use 32 bit VS with vdub64.

Myrsloik
25th August 2013, 20:31
VapourSynth can be compiled for 64 bit, but Myrsloik does not offer a pre-compiled build for that at the moment. According to the website he does plan to offer Windows x64 builds starting with the next version, though. You can use vspipe.exe to pipe 32 bit scripts into x264 64 bit (similar to AviSynth). I don't think you can use 32 bit VS with vdub64.

May as well explain my reasons. The first one is that unless VS is feature complete enough no one will use it anyway. It won't be until the next version it will have a true equivalent to avisynth's scriptclip (and thus be able to express every avisynth script in existence). So without the basic features in place no one will care if it's 64 bits or not.

The next issue is that once you go x64 you lose all avisynth plugin compatibility as well. Without a base of portable plugins there'd once again be nothing to do with VS. That's the other reason I haven't posted any 64 bit builds yet.

There will be a public 64 bit build soon. (read: next month or so)

Linux and mac os has had 64 bit support from day one since there's no pile of legacy stuff to take into consideration. (don't mention avxsynth or I'll kill you all)

And no, of course you can't use a 32 bit dll inside a 64 bit application. So vdub64 will fail. The real question is why you're using vdub at all.

jpsdr
26th August 2013, 08:51
My main purpose is to see if there was an alternative for avisynth64, for input with x264 (64bit). I don't know what is vspipe, and i'm looking for a complete 64bit chain. But, for this to works, x264 (whatever version) should at least be able to work with vapoursynth, and from what i've found, apparently it doesn't, but, maybe i've missed something.

LoRd_MuldeR
26th August 2013, 15:58
Using 64-Bit x264 with 32-Bit Avisynth (via Avs2YUV) or 32-Bit VapourSynth (via vspipe) is implemented in Simple x264 Launcher, for example.

sneaker_ger
26th August 2013, 16:58
You can find the vspipe.exe in the VapourSynth directory ("C:\Program Files (x86)\VapourSynth\core\vspipe.exe"), it works like this:
vspipe.exe script.vpy - -y4m | x264_64.exe - --demuxer y4m -o output.h264

jpsdr
27th August 2013, 07:51
Just a little question.
I'm often working with YV12 video, and they stay YV12 in all my chain process, and all my final files are lossless YV12 avi files. For now, using direct avs input files, i'm sure that video is decoded in YV12 format and directly feed this way to x264 without no conversions or data modifications. Can the solutions of vspipe or avs2yuv guarantee me the exact same behavior ?

sneaker_ger
27th August 2013, 18:04
The piping solutions don't alter the output - the data is exactly the same as if you were directly opening the scripts with x264.

Mystery Keeper
29th August 2013, 12:05
May as well explain my reasons. The first one is that unless VS is feature complete enough no one will use it anyway. It won't be until the next version it will have a true equivalent to avisynth's scriptclip (and thus be able to express every avisynth script in existence). So without the basic features in place no one will care if it's 64 bits or not.

The next issue is that once you go x64 you lose all avisynth plugin compatibility as well. Without a base of portable plugins there'd once again be nothing to do with VS. That's the other reason I haven't posted any 64 bit builds yet.

There will be a public 64 bit build soon. (read: next month or so)

Linux and mac os has had 64 bit support from day one since there's no pile of legacy stuff to take into consideration. (don't mention avxsynth or I'll kill you all)

And no, of course you can't use a 32 bit dll inside a 64 bit application. So vdub64 will fail. The real question is why you're using vdub at all.

Actually, if there was ready x64 version, it could encourage plugin makers to make proper x64 plugins. They really need that encouragement. AviSynth (even x64 build) can not be used to its full potential because with many threads it hits the memory ceiling and crashes.

As for VirtualDub - the reason *I* use it is intermediate encode. My scripts are slow. So I make only one pass and encode in Lagarith with VirtualDub and only then re-encode with x264.

TurboPascal7
29th August 2013, 12:17
Actually, if there was ready x64 version, it could encourage plugin makers to make proper x64 plugins. They really need that encouragement. AviSynth (even x64 build) can not be used to its full potential because with many threads it hits the memory ceiling and crashes.
Avisynth x64 failed because there was no one crazy enough to rewrite the insane amount of x64-incompatible asm avisynth filters run on. It's not like people like this will suddenly appear when vsynth gets x64 support on windows. People who want to write x64-compatible code have been doing it for a long time.

I do agree that x64 build would be nice, but I do not think it will be useful any time soon and it definitely shouldn't be the top priority.

zettai
30th August 2013, 01:45
Is vspipe the only way to pipe data to programs like ffmpeg or is it possible to do it within Python using subprocess, for example?

I recall in earlier versions there was .output(sys.stdout, y4m=True) but this is no longer the case, is that correct or am I missing something?

Myrsloik
30th August 2013, 09:24
Is vspipe the only way to pipe data to programs like ffmpeg or is it possible to do it within Python using subprocess, for example?

I recall in earlier versions there was .output(sys.stdout, y4m=True) but this is no longer the case, is that correct or am I missing something?

It's no longer possible because it was a kinda bad idea to have different output methods. Also the GIL in python would've made complicated scripts a lot slower down the line.

You can either get the raw frame data:
frame = clip.get_frame(n)
frame.get_read_ptr(plane_number)
and do it yourself with ctypes

Or just be clever with your pipes... exactly what are you trying to do?

zettai
30th August 2013, 22:36
It's no longer possible because it was a kinda bad idea to have different output methods. Also the GIL in python would've made complicated scripts a lot slower down the line.

You can either get the raw frame data:
frame = clip.get_frame(n)
frame.get_read_ptr(plane_number)
and do it yourself with ctypes

Or just be clever with your pipes... exactly what are you trying to do?

Thanks for the info. I'm trying to see how easy it will be to build applications using vs and python, applications that I can freeze with cx_freeze or similar then distribute but if the python script is frozen, I'm not really sure how I could pipe it to ffmpeg.

I'm not sure I'm explaining this well so lets imagine a simple program. Say I have a python script which opens a tkinter filechooser to locate a file then, based on the file's mimetype, I load the appropriate import plugin, import the file as a source into vapoursynth, resize it in and then pipe it to ffmpeg to make an mp4 or something. With the old output function, I could do that by just using subprocess.PIPE (possibly) but now the python script itself is piped using vspipe I don't really know how I'd write this simple program without programmatically writing a python file which I then pipe with vspipe which feels wrong and doesn't solve my wish to make a standalone application. Does that make sense?

Is the only solution to write the code myself in python to pipe via subprocess using ctypes or is there something I'm missing?

ganymede
31st August 2013, 10:11
exactly what are you trying to do?It would also enable interactive scripting, which IMHO would be especially useful with a powerful interactive environment like ipython (http://ipython.org/). The python console could act for vapoursynth somewhat like AvsPmod for avisynth. vapoursynth scripting would be easier to learn, debug, etc. Interactivity is one of the benefits of using python, after all.

Myrsloik
31st August 2013, 10:27
It would also enable interactive scripting, which IMHO would be especially useful with a powerful interactive environment like ipython (http://ipython.org/). The python console could act for vapoursynth somewhat like AvsPmod for avisynth. vapoursynth scripting would be easier to learn, debug, etc. Interactivity is one of the benefits of using python, after all.

Blah
Blah
Blah
subprocess.call('vspipe.exe', __file__ + ' -', stdout=...)


As for the interactive part the whole script would still be syntax checked. I usually run my scripts in python to get better error information even if I don't get any output. (better error information will be in the next version)

zettai
31st August 2013, 15:20
Blah
Blah
Blah
subprocess.call('vspipe.exe', __file__ + ' -', stdout=...)



Sure this works fine but it doesn't help when I want to freeze the program and distribute it as an application. Once it's frozen there is no __file__ only sys.executable and I'm pretty sure vspipe has no way of doing anything with that.


Will I have to roll my own output pipe method?

ganymede
31st August 2013, 17:05
subprocess.call('vspipe.exe', __file__ + ' -', stdout=...)Unfortunately, __file__ is undefined in an interactive console, it exists only... in files.
If I enter some vapoursynth code into a python/ipython console, without saving it in a file, is there a way to interactively pipe the clip's (VideoNode) data to an external process ?
IMHO it would be useful to interactively display the clip (individual frames could even be displayed directly in the ipython qtconsole or notebook), pipe to an encoder, etc.

Yellow_
7th September 2013, 11:39
Hi, I'm trying to build Vapoursynth on Linux Ubuntu 13.04 64bit, have python 2.7 & 3.1, multitude of python dev libraries and what not, :-) but getting this error running the .bootstrap.py file:

Traceback (most recent call last):
File "./bootstrap.py", line 3, in <module>
import os, stat, urllib.request
ImportError: No module named request


Any help would be appreciated, I've searched doom9 and Google. I have the following python related stuff, possibly related to 'request' installed amongst a tonne of other python related stuff:

python-urllib3 1.5-0ubuntu1
python3-urllib3 1.5-0ubuntu1
python-multipartposthandler 0.1.0-2
python-restkit 4.1.3-2
python-requests 1.1.0-1
python3-requests 1.1.0-1

Typing python in a console tells me I'm using 2.7.4, 5th July 2013

:-)

Myrsloik
7th September 2013, 12:02
Hi, I'm trying to build Vapoursynth on Linux Ubuntu 13.04 64bit, have python 2.7 & 3.1, multitude of python dev libraries and what not, :-) but getting this error running the .bootstrap.py file:



Any help would be appreciated, I've searched doom9 and Google. I have the following python related stuff, possibly related to 'request' installed amongst a tonne of other python related stuff:

python-urllib3 1.5-0ubuntu1
python3-urllib3 1.5-0ubuntu1
python-multipartposthandler 0.1.0-2
python-restkit 4.1.3-2
python-requests 1.1.0-1
python3-requests 1.1.0-1

Typing python in a console tells me I'm using 2.7.4, 5th July 2013

:-)

You always have to explicitly use python 3:
python3 bootstrap.py
PYTHON=python3 ./waf configure
PYTHON=python3 ./waf build

or something along those lines... I don't build vs on linux every day

Yellow_
7th September 2013, 12:41
Myrsloik, that solved it, thank you. :-)

**EDIT**

After compiling and installing just tripping up at:

To install the Cython wrapper:

$ sudo PYTHON=python3 ./setup.py install

Gives me an error:

running install
running build
running build_ext
cythoning src/cython/vapoursynth.pyx to build/temp.linux-x86_64-2.7/pyrex/vapoursynth.c

Error compiling Cython file:
------------------------------------------------------------
...
arInitial = 0
arFrameReady = 1
arAllFramesReady = 2
arError = -1

ctypedef void (__stdcall *VSFrameDoneCallback)(void *userData, const VSFrameRef *f, int n, VSNodeRef *node, const char *errorMsg)
^
------------------------------------------------------------

src/cython/vapoursynth.pxd:147:84: Expected ')', found '*'

Error compiling Cython file:
------------------------------------------------------------
...
instance.core = core
instance.func = None
instance.ref = ref
return instance

cdef object mapToDict(const VSMap *map, bint flatten, bint add_cache, Core core, const VSAPI *funcs):
^
------------------------------------------------------------

src/cython/vapoursynth.pyx:157:34: Expected ')', found '*'
building 'vapoursynth' extension
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I. -Isrc/cython -I/usr/include/python2.7 -c build/temp.linux-x86_64-2.7/pyrex/vapoursynth.c -o build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7/pyrex/vapoursynth.o
build/temp.linux-x86_64-2.7/pyrex/vapoursynth.c:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1


**EDIT**

argh, maybe I've been here before, my cython version may be too old, 0.17 according to this post:

http://forum.doom9.org/showthread.php?p=1605356#post1605356

So just updating via pip and rebuilding. :-)

hehe, that was it, compiled and installed this time with cython 0.19.1 :-)

**EDIT**

Nope, still not working, after doing the sudo PYTHON=python3 .setup.py cython stuff and running PYTHON=python3 ./waf test in the console is giving me:

Traceback (most recent call last):
File "test/test.py", line 2, in <module>
import vapoursynth as vs
ImportError: No module named 'vapoursynth'


But maybe it's due to this, I'm no coder so may not be related, 2.7 is mentioned a lot below, so for so much text, really should use PasteAll or something:

running install
running build
running build_ext
cythoning src/cython/vapoursynth.pyx to build/temp.linux-x86_64-2.7/pyrex/vapoursynth.c
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/pyrex
building 'vapoursynth' extension
creating build/temp.linux-x86_64-2.7/build
creating build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7/pyrex
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I. -Isrc/cython -I/usr/include/python2.7 -c build/temp.linux-x86_64-2.7/pyrex/vapoursynth.c -o build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7/pyrex/vapoursynth.o
build/temp.linux-x86_64-2.7/pyrex/vapoursynth.c: In function ‘__pyx_f_11vapoursynth_createFormat’:
build/temp.linux-x86_64-2.7/pyrex/vapoursynth.c:6181:13: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
build/temp.linux-x86_64-2.7/pyrex/vapoursynth.c: In function ‘__pyx_pf_11vapoursynth_4Core_16version’:
build/temp.linux-x86_64-2.7/pyrex/vapoursynth.c:13004:13: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
build/temp.linux-x86_64-2.7/pyrex/vapoursynth.c: In function ‘vpy_clearVariable’:
build/temp.linux-x86_64-2.7/pyrex/vapoursynth.c:19060:3: warning: ‘__pyx_r’ may be used uninitialized in this function [-Wmaybe-uninitialized]
build/temp.linux-x86_64-2.7/pyrex/vapoursynth.c: In function ‘vpy_getOutput’:
build/temp.linux-x86_64-2.7/pyrex/vapoursynth.c:18074:3: warning: ‘__pyx_r’ may be used uninitialized in this function [-Wmaybe-uninitialized]
build/temp.linux-x86_64-2.7/pyrex/vapoursynth.c: In function ‘vpy_getCore’:
build/temp.linux-x86_64-2.7/pyrex/vapoursynth.c:18388:3: warning: ‘__pyx_r’ may be used uninitialized in this function [-Wmaybe-uninitialized]
build/temp.linux-x86_64-2.7/pyrex/vapoursynth.c: In function ‘vpy_evaluateScript’:
build/temp.linux-x86_64-2.7/pyrex/vapoursynth.c:16885:3: warning: ‘__pyx_r’ may be used uninitialized in this function [-Wmaybe-uninitialized]
build/temp.linux-x86_64-2.7/pyrex/vapoursynth.c: In function ‘vpy_evaluateFile’:
build/temp.linux-x86_64-2.7/pyrex/vapoursynth.c:17430:3: warning: ‘__pyx_r’ may be used uninitialized in this function [-Wmaybe-uninitialized]
build/temp.linux-x86_64-2.7/pyrex/vapoursynth.c: In function ‘vpy_getVariable’:
build/temp.linux-x86_64-2.7/pyrex/vapoursynth.c:18668:3: warning: ‘__pyx_r’ may be used uninitialized in this function [-Wmaybe-uninitialized]
creating build/lib.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7/pyrex/vapoursynth.o -L. -Lbuild -lvapoursynth -o build/lib.linux-x86_64-2.7/vapoursynth.so
running install_lib
copying build/lib.linux-x86_64-2.7/vapoursynth.so -> /usr/lib/python2.7/site-packages
running install_egg_info
Removing /usr/lib/python2.7/site-packages/VapourSynth-1.0.0-py2.7.egg-info
Writing /usr/lib/python2.7/site-packages/VapourSynth-1.0.0-py2.7.egg-info

qyot27
7th September 2013, 16:47
[Install FFmpeg, make sure to use --enable-pic for 64-bit; the guide on FFmpeg's wiki is enough]

EDIT: Now updated for Ubuntu 14.04.

Installing the prerequisites:
sudo apt-get install python3-dev wget python3-sphinx cython3

Building VapourSynth itself:
git clone git://github.com/vapoursynth/vapoursynth.git
cd vapoursynth
./bootstrap.py
./waf configure
./waf build
sudo checkinstall --pkgname=vapoursynth --pkgversion="$(grep Version build/pc/vapoursynth.pc | \
sed 's/ /"/g' | cut -f2 -d "\"")"R-r"$(git rev-list --count HEAD)" \
--backup=no --deldoc=yes --delspec=yes --deldesc=yes --strip=yes \
--stripso=yes --addso=yes --fstrans=no --default ./waf install

sudo checkinstall --pkgname=vapoursynth-cython --pkgversion="$(grep Version build/pc/vapoursynth.pc | \
sed 's/ /"/g' | cut -f2 -d "\"")"R-r"$(git rev-list --count HEAD)" \
--backup=no --deldoc=yes --delspec=yes --deldesc=yes --strip=yes \
--stripso=yes --addso=yes --fstrans=no --default --requires=vapoursynth \
python3 ./setup.py install

Building FFMS2:
git clone git://github.com/FFMS/ffms2.git
cd ffms2
./configure --enable-shared --with-pic
make
sudo checkinstall --pkgname=ffms2 --pkgversion="1:$(./version.sh)-git" \
--backup=no --deldoc=yes --delspec=yes --deldesc=yes --strip=yes \
--stripso=yes --addso=yes --fstrans=no --default

lanzorg
11th September 2013, 08:27
I actually use an Avisynth script called FineSharp with FFDshow for my HD sources on a Windows machine.

But I switched to Archlinux last year for web development purpose, now I can't work on Windows anymore.

I see that FineSharp was ported on Vapoursynth and my question is can I use it on Archlinux like I use Avisynth on my Windows machine.
For example with MPV (mplayer2 with some improvements)? If yes can you explain me or give me useful links about it?

Thank you in advance.

jackoneill
11th September 2013, 09:04
I see that FineSharp was ported on Vapoursynth and my question is can I use it on Archlinux like I use Avisynth on my Windows machine.
For example with MPV (mplayer2 with some improvements)? If yes can you explain me or give me useful links about it?

Thank you in advance.

Not exactly. If finesharp doesn't require any Avisynth filters, you can process your videos in Arch Linux, but not while you watch them with mpv. mpv doesn't support this. I'm not aware of any Linux video player that can do this.

lanzorg
11th September 2013, 10:32
OK thanks for the answer, so any video player on any platform can't use vapoursynth (for the moment).

I really need FineSharp, the mpv lavfi unsharp filter is crap as hell.

So I must use something like VirtualDub to pre-encode my video like I did with Avisynth 6 years ago. Or it is CLI only? :(
Do you have some tuts about it on Linux?

mavrick_264
11th September 2013, 10:52
Hi,
i am a newbee here and also as far as X264 is concerned. For now i have been given a task to run the DirectX264 code in MSVS 2010, Ultimate.
However, i have come across the errors:
1. Error 444 error C2440: 'initializing' : cannot convert from 'AVS_Value' to 'short'
Path: ...\X264_codes\For_MSVS_from_svn\X264_on_VS\input\avs.c 223
2. Error 446 error C2440: 'initializing' : cannot convert from 'AVS_Value' to 'void *'
Path: ...\X264_codes\For_MSVS_from_svn\X264_on_VS\input\avs.c 223

What can be the solution to this?
Here AVS_Value is a stucture as:
typedef struct AVS_Value AVS_Value;
struct AVS_Value {
short type; // 'a'rray, 'c'lip, 'b'ool, 'i'nt, 'f'loat, 's'tring, 'v'oid, or 'l'ong
// for some function e'rror
short array_size;
union {
void * clip; // do not use directly, use avs_take_clip
char boolean;
int integer;
float floating_pt;
const char * string;
const AVS_Value * array;
} d;
};

it has made way to too confused.
These are the lines where the errors are occuring:
Line 223 : AVS_Value arg_arr[] = { res, avs_new_value_bool( info->interlaced ), avs_new_value_string( matrix ) };
Line 234 : AVS_Value arg_arr[] = { res, avs_new_value_string( levels ) };

Can anybody pls help?
Thanks.
Regards,
Mavrick_264

jackoneill
11th September 2013, 11:10
OK thanks for the answer, so any video player on any platform can't use vapoursynth (for the moment).

I really need FineSharp, the mpv lavfi unsharp filter is crap as hell.

So I must use something like VirtualDub to pre-encode my video like I did with Avisynth 6 years ago. Or it is CLI only? :(
Do you have some tuts about it on Linux?


$ vspipe moo.py - -y4m | x264 --stuff -o moo.mkv -

Then you need to mux the audio/subtitles too...

Chikuzen
11th September 2013, 12:06
OK thanks for the answer, so any video player on any platform can't use vapoursynth (for the moment).
on Windows, you can play your vpy on almost all players via VSFS.

I really need FineSharp, the mpv lavfi unsharp filter is crap as hell.
Regrettably, finesharp requires removegrain.dll with this time.
It cannot be used on Linux until someone ports removegrain to VS.

sneaker_ger
11th September 2013, 12:35
Also note that VapourSynth is video only - no audio. Also, the output methods are usually CFR only, making usage for playback even more complicated.

Tima
13th September 2013, 13:12
I experience some strange crash with RemoveGrain plugin when trying to run VS script, which uses QTGMC.

Crash report from VirtualDub: http://pastebin.com/YRZbrDBg

My script:

src=r'n01-01.avi'
plugins_vs=r'C:\\Bin\\VapourSynth\\filters\\'
plugins_avs_megui=r'C:\\Bin\\MeGUI\\tools\\avisynth_plugin\\'
plugins_avs_custom=r'C:\\Bin\\avisynth_plugins_custom\\'

import vapoursynth as vs
import sys
import havsfunc
core = vs.get_core(threads = 1)
haf = havsfunc.HAvsFunc(core)


core.std.LoadPlugin(plugins_vs + r'ffms2.dll')
core.std.LoadPlugin(plugins_vs + r'fmtconv.dll')
#core.std.LoadPlugin(plugins_vs + r'd2vsource_beta3_mingw.dll')
core.std.LoadPlugin(plugins_vs + r'nnedi3.dll')
core.std.LoadPlugin(plugins_vs + r'eedi3.dll')
core.std.LoadPlugin(plugins_vs + r'scenechange.dll')
core.std.LoadPlugin(plugins_vs + r'temporalsoften2.dll')
core.std.LoadPlugin(plugins_vs + r'genericfilters.dll')

core.avs.LoadPlugin(plugins_vs + r'avisynthfilters.dll')

core.avs.LoadPlugin(plugins_avs_megui + r'EEDI2.dll')
core.avs.LoadPlugin(plugins_avs_megui + r'TDeint.dll')

core.avs.LoadPlugin(plugins_avs_custom + r'AddGrainC.dll')
core.avs.LoadPlugin(plugins_avs_custom + r'dfttest.dll')
core.avs.LoadPlugin(plugins_avs_custom + r'FFT3DFilter.dll')
core.avs.LoadPlugin(plugins_avs_custom + r'mvtools2.dll')
core.avs.LoadPlugin(plugins_avs_custom + r'nnedi.dll')
core.avs.LoadPlugin(plugins_avs_custom + r'nnedi2.dll')
core.avs.LoadPlugin(plugins_avs_custom + r'RemoveGrainSSE2.dll')
core.avs.LoadPlugin(plugins_avs_custom + r'RepairSSE2.dll')
core.avs.LoadPlugin(plugins_avs_custom + r'VerticalCleanerSSE2.dll')

core.avs.LoadPlugin(plugins_avs_custom + r'mt_masktools-26.dll')


clip = core.ffms2.Source(src)
clip = haf.QTGMC(clip, Preset='Slower', TFF=True)
clip = core.resize.Bicubic(clip,640,480)

clip.set_output()

Reel.Deel
15th September 2013, 15:43
Hello,

I'm trying to pipe RGB48 to ImageMagick in order to create a 16-bit PNG but I'm not having much success.
This is the script I'm using:
import vapoursynth as vs
core = vs.get_core()
core.std.LoadPlugin(path=r'C:/vsimagereader.dll')

# 16-bit 720X1280 PNG
src = core.imgr.Read(['C:/IMG_0577_720.png'])

# Resize
src = core.fmtc.resample(clip=src, w=360, h=640)

# Output
src.set_output()

The command line I'm using:
"vspipe.exe" "RGB48 Test.vpy" - | convert -depth 16 -size 360x640 rgb:- "RGB48 Test.png"

The result should look like this (https://www.dropbox.com/s/r5gw5k6lwhhinjh/RGB48%20Test%208.png), instead I get this (https://www.dropbox.com/s/kj1pqiw52669sqg/RGB48%20Test%208%202.png).

In the quest for answers I read this thread (http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=18943) but I still can't figure it out.
Any help will be greatly appreciated. :)

Myrsloik
15th September 2013, 15:52
The pictures seem to be broken but my guess is that it expects packed rgb, vs outputs planar rgb.

Reel.Deel
15th September 2013, 16:05
I fixed the links. Is there any way to change planar to packed within VS?
If not then I guess I'll create an account over IM to ask if there's a way for IM to correctly accept planar RGB.
Thanks for the help regardless.

Myrsloik
15th September 2013, 16:24
I fixed the links. Is there any way to change planar to packed within VS?
If not then I guess I'll create an account over IM to ask if there's a way for IM to correctly accept planar RGB.
Thanks for the help regardless.

No, I try to keep everything planar as much as possible. The easiest way would probably be to write a small program that converts planar rgb48 to packed when it's piped through it.

Btw, the links are still broken. I don't think the files are public in your dropbox.

Reel.Deel
15th September 2013, 16:35
Fair enough. If I find a solution in ImageMagick I'll post it here. Thanks again.

Ok, this time I really fixed the links :o.
Third times a charm :).

SAPikachu
16th September 2013, 04:59
Hello,

I'm trying to pipe RGB48 to ImageMagick in order to create a 16-bit PNG but I'm not having much success.
This is the script I'm using:
import vapoursynth as vs
core = vs.get_core()
core.std.LoadPlugin(path=r'C:/vsimagereader.dll')

# 16-bit 720X1280 PNG
src = core.imgr.Read(['C:/IMG_0577_720.png'])

# Resize
src = core.fmtc.resample(clip=src, w=360, h=640)

# Output
src.set_output()

The command line I'm using:
"vspipe.exe" "RGB48 Test.vpy" - | convert -depth 16 -size 360x640 rgb:- "RGB48 Test.png"

The result should look like this (https://www.dropbox.com/s/r5gw5k6lwhhinjh/RGB48%20Test%208.png), instead I get this (https://www.dropbox.com/s/kj1pqiw52669sqg/RGB48%20Test%208%202.png).

In the quest for answers I read this thread (http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=18943) but I still can't figure it out.
Any help will be greatly appreciated. :)

You can emulate packed RGBA with GRAY output. Here is a snippet I just tried:

r = core.std.ShufflePlanes([src], [0], vs.GRAY)
g = core.std.ShufflePlanes([src], [1], vs.GRAY)
b = core.std.ShufflePlanes([src], [2], vs.GRAY)
a = core.std.BlankClip(clip=r, color=[65535])

last = core.std.Interleave([r,b,g,a])# r b g a -> rb ga -> rgba

# Turn right
last = core.std.Transpose(last)
# last = core.std.FlipHorizontal(last) # EDIT: Not needed

last = core.std.DoubleWeave(last, True)
last = core.std.SelectEvery(last, 2, 0)
last = core.std.DoubleWeave(last, True)
last = core.std.SelectEvery(last, 2, 0)

# Turn left
last = core.std.Transpose(last)
# last = core.std.FlipVertical(last) # EDIT: Not needed

last.set_output()



Tested conversion with the following command (note that we have to use rgba instead of rgb):

"vspipe.exe" test.vpy - | convert -depth 16 -size 1920x1080 rgba:- test.png

Chikuzen
16th September 2013, 05:27
@SAPikachu
I think that FlipHorizontal/FlipVertical is unneeded.
Just Transpose x 2 is enough.

SAPikachu
16th September 2013, 06:41
@SAPikachu
I think that FlipHorizontal/FlipVertical is unneeded.
Just Transpose x 2 is enugh.

Yes they are indeed unneeded. I followed advice of Vapoursynth documentation and didn't notice that. Just updated the snippet. Thanks for pointing out this.

Myrsloik
18th September 2013, 18:24
Welcome to the weekly "the project isn't dead" announcement.

Due to wanting to fix some issues properly the x64 builds will be delayed a bit.

Note that the current and past 4 git revisions are broken.

Reel.Deel
20th September 2013, 14:51
@SAPikachu

I've been out of town so I just now tried your solution.
It works as expected. Thank you very much.

aegisofrime
27th September 2013, 13:02
Hi!

Sorry if I'm asking in the wrong section. I'm wondering, how do I replicate the rpow2 function of NNEDI3? As far as I understand the VS version of NNEDI3 lacks the rpow2 function. Thanks!

jackoneill
27th September 2013, 16:21
Hi!

Sorry if I'm asking in the wrong section. I'm wondering, how do I replicate the rpow2 function of NNEDI3? As far as I understand the VS version of NNEDI3 lacks the rpow2 function. Thanks!

Yes, it belongs here: http://forum.doom9.org/showthread.php?t=166434.

I'm fairly confident I can add that functionality.

aegisofrime
28th September 2013, 08:14
Yes, it belongs here: http://forum.doom9.org/showthread.php?t=166434.

I'm fairly confident I can add that functionality.

I searched through that topic but no one asked about rpow2 :p

Thanks, looking forward to it!