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

buchanan
9th July 2013, 19:20
It's a known issue. I just haven't gotten around to fixing it yet. Pressing ctrl-c will also make it crash. It shouldn't do anything bad to the output since it crashes after everything is done.

Ok ! Thank you for your quick answer :)

zerowalker
10th July 2013, 11:34
Is vapoursynth supposed to succeed Avisynth?

From my understanding, itīs not, and just a "by product", but i wanted to make sure.

Myrsloik
10th July 2013, 13:42
Is vapoursynth supposed to succeed Avisynth?

From my understanding, itīs not, and just a "by product", but i wanted to make sure.

It's a by-product in the same way that humans are by-products of sex.

ryrynz
10th July 2013, 14:03
Myrsloik, I think you've just gone and made yourself a new signature.

VapourSynth (http://www.vapoursynth.com/) - a by-product of Avisynth in the same way that humans are by-products of sex.

Adub
12th July 2013, 10:16
Small bug I noticed, comment here: https://github.com/vapoursynth/vapoursynth/commit/244f23d244d55770a3c32258f25d1f523b1e2bdd#commitcomment-3620372 (https://github.com/vapoursynth/vapoursynth/commit/244f23d244d55770a3c32258f25d1f523b1e2bdd#commitcomment-3620372)

Essentially, commit 244f23d244d55770a3c32258f25d1f523b1e2bdd used the "FEATURE_AVISYNTH" syntax instead of "VS_FEATURE_AVISYNTH" syntax.

EDIT: Nevermind, it appears this was fixed.

sl1pkn07
20th July 2013, 18:48
waf test fail

http://sl1pkn07.no-ip.com/paste/view/0caf88ed

Adub
21st July 2013, 03:51
I'd wager you are out of date from the git repo. The tests were fixed 7 days ago: https://github.com/vapoursynth/vapoursynth/commit/83d9594fe86418f20b02bc6c110474ad76717848

sl1pkn07
21st July 2013, 13:08
ok, then my problem is other


howto make waf test before install the library?

Adub
22nd July 2013, 18:10
You could use a virtualenv and a local prefix to install the libs to your home directory to act as a staging area.

So, setup a virtualenv for Python3, and then use the --prefix=/home/blah option during the ./waf configure phase to install all objects into your home directory.

Myrsloik
28th July 2013, 16:08
Grab what will hopefully be released as R19 here:
VapourSynth R19 rc1 (https://dl.dropboxusercontent.com/u/73468194/vapoursynth_r19_rc1.exe)

I think I've managed to fix all reported bugs so far as well. If there's anything still happening in this version then report it again because I've missed it. The vsscript api may have some extremely minor changes for R20 if I get more feedback.

Most big changes listed here:
r19:
lut/lut2 now processes all planes by default
ported to work on arm and powerpc (Zor)
fixed 9-16 bit format support in Expr
properly initialize color in addborders to 0
calls to the getFrame() function inside vapoursynth can never deadlock now, the thread handling is also slightly improved
fixed a bug in the cache that would stop it from freeing all its frames when memory is needed, fixes an out of memory error reported by Chikuzen
output is no longer determined by setting the last variable in __main__, instead clip.set_output(int index = 0) is used to set which clip(s) are exported
fixed some memory leaks in the internal filters when they're freed (jackoneill)
now properly initializes blankclips to all 0 when no values are given
added proper const declarations now that cython supports it, cython 0.18 or later required to build the extension now
fixed get_write_ptr() in python to actually return a write pointer
fixed the lut and lut2 filters for > 8 bit formats (ADub)
various minor fixes to vivtc
removed clip.output() since it's a bad design decision, now a command-line program called vspipe can be used to pipe or write raw video output
renamed newMap() to createMap() to match the naming of all other functions
added core.get_plugins() for the core and core.namepace.get_functions() for namespaces, it works similarly to list_functions() but instead returns the information in a dict
removed the unmentioned and unused link option for filter arguments as it is completely pointless and similar functionality may be implemented anyway
there's now a sane external api available for embedding in other applications, see vsscript.h and vsvfw for an example
now a singleton pattern is used for the core in python scripts, use vs.get_core() to get a reference to it
clip.get_frame() now throws an exception when out of bounds frames are requested
fixes a reference leak in the VideoProps python class
now ignores functions with . in their argument string for avisynth compatibility, this makes warpsharp mostly compatible

buchanan
28th July 2013, 17:30
Thanks !

Trying to load an avisynth plugin with core.avs.LoadPlugin gives me : "No attribute with the name avs exists. Did you mistype a plugin namespace?"

Myrsloik
28th July 2013, 18:49
Thanks !

Trying to load an avisynth plugin with core.avs.LoadPlugin gives me : "No attribute with the name avs exists. Did you mistype a plugin namespace?"

I managed to compile it without avisynth support due to some build system changes.
Here's RC2 (https://dl.dropboxusercontent.com/u/73468194/vapoursynth_r19_rc2.exe).

I also put a windows compile of AssVapour in the installer for those who want to try it out on windows easily.

buchanan
28th July 2013, 19:14
Another small problem, Chikuzen's port of FineSharp (http://forum.doom9.org/showthread.php?t=166524) now throws the error "Lut2: plane index out of range"

(Apologies if I should have posted it in Chikuzen's thread)

Myrsloik
28th July 2013, 19:38
Another small problem, Chikuzen's port of FineSharp (http://forum.doom9.org/showthread.php?t=166524) now throws the error "Lut2: plane index out of range"

(Apologies if I should have posted it in Chikuzen's thread)

I figured out why. I posted the necessary script change to Chikuzen's thread (http://forum.doom9.org/showpost.php?p=1638570&postcount=2). Ironically he submitted the VapourSynth patch that broke it.

Reel.Deel
28th July 2013, 20:00
Hey Myrsloik.

I wanted to try out AssVapour but I can't get it loaded.

>>> import vapoursynth as vs
>>> core = vs.get_core()
>>> core.std.LoadPlugin(path=r'C:\VapourSynth\AssVapour\assvapour.dll')

In the python command line I get this error:
---------------------------
python.exe - Entry Point Not Found
---------------------------
The procedure entry point strnlen could not be located in the dynamic link library msvcrt.dll.

In python shell I get this:
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
core.std.LoadPlugin(path=r'C:\VapourSynth\AssVapour\assvapour.dll')
File "vapoursynth.pyx", line 978, in vapoursynth.Function.__call__ (src\cython\vapoursynth.c:15485)
vapoursynth.Error: 'Failed to load C:\\VapourSynth\\AssVapour\\assvapour.dll'

Hope I'm not doing something silly. :o

Chikuzen
28th July 2013, 20:40
Another small problem, Chikuzen's port of FineSharp (http://forum.doom9.org/showthread.php?t=166524) now throws the error "Lut2: plane index out of range"

(Apologies if I should have posted it in Chikuzen's thread)

for r19 or later
http://pastebin.com/1a0yXNbJ
(Although a reason is not known, I cannot update Gist now.)

import vapoursynth as vs
import finesharp
core = vs.get_core()
core.avs.LoadPlugin('/path/to/RemoveGrain.dll')
core.avs.LoadPlugin('/path/to/Repair.dll')
clip = something
fs = finesharp.FineSharp() #You do not need to set core any longer.
clip = fs.sharpen(clip, other options...)
clip.set_output()

Myrsloik
28th July 2013, 21:03
Hey Myrsloik.

I wanted to try out AssVapour but I can't get it loaded.

...

Hope I'm not doing something silly. :o

It was very miscompiled. lachs0r is making a second attempt at it now...

vdcrim
29th July 2013, 18:08
Grab what will hopefully be released as R19 here: [...]

I think I've managed to fix all reported bugs so far as well. If there's anything still happening in this version then report it again because I've missed it. The vsscript api may have some extremely minor changes for R20 if I get more feedback.

So, are these two things (http://forum.doom9.org/showpost.php?p=1635551&postcount=847) dismissed?

Also, vsscript_evaluateFile assumes that the input file is UTF-8 encoded. I know that this is because vsscript_evaluateScript expects an UTF-8 encoded string, but in order to avoid future "why my script doesn't work" complaints maybe it would be better to take the ugly way and change it so that the file is decoded first with the right codec (something like check for BOM -> if not found assume UTF-8 and decode it -> if decoding fails decode with the system's encoding) and encoded back to UTF-8 before passing it to vsscript_evaluateScript. Or just put somewhere EVERYTHING IS UTF-8.

Myrsloik
29th July 2013, 18:25
So, are these two things (http://forum.doom9.org/showpost.php?p=1635551&postcount=847) dismissed?

Also, vsscript_evaluateFile assumes that the input file is UTF-8 encoded. I know that this is because vsscript_evaluateScript expects an UTF-8 encoded string, but in order to avoid future "why my script doesn't work" complaints maybe it would be better to take the ugly way and change it so that the file is decoded first with the right codec (something like check for BOM -> if not found assume UTF-8 and decode it -> if decoding fails decode with the system's encoding) and encoded back to UTF-8 before passing it to vsscript_evaluateScript. Or just put somewhere EVERYTHING IS UTF-8.

Those two things aren't dismissed, I'm just saving it for a later version. I want to release this greatly improved version this week.

And yes. EVERYTHING IS UTF-8. Just like the encoding assumed by python 3 for all scripts everywhere. So now it works like python, that's good enough for me...

Myrsloik
30th July 2013, 11:33
Have a go at RC3 (https://dl.dropboxusercontent.com/u/73468194/vapoursynth_r19_rc3.exe). Should fix everything reported so far.

AssVapour is still broken though...

aegisofrime
30th July 2013, 14:20
Sorry if this is a dumb question, but I have been getting this error since Test 4 I believe, and I'm still getting it in RC3. I have looked over the changelog for anything that might have to do with this to no avail.

http://i.imgur.com/eUwKGoL.png

Myrsloik
30th July 2013, 14:22
Sorry if this is a dumb question, but I have been getting this error since Test 4 I believe, and I'm still getting it in RC3. I have looked over the changelog for anything that might have to do with this to no avail.

http://i.imgur.com/eUwKGoL.png

You're using an old copy of vspipe.exe. Delete all copies and reinstall.

aegisofrime
30th July 2013, 15:27
You're using an old copy of vspipe.exe. Delete all copies and reinstall.

So that's it! Thanks, it works now! :)

Myrsloik
30th July 2013, 20:21
R19 has been released. See the usual blog post (http://www.vapoursynth.com/2013/07/r19-finally-some-progress/) for notes and stuff. Changelog in the first post in the thread.

sneaker_ger
30th July 2013, 20:32
No AssVapour?

Myrsloik
30th July 2013, 20:34
No AssVapour?

No, lachs0r hasn't made a working compile yet. I was hoping to have it ready too but it needs lots of libraries that kinda hate windows. And a very recent mingw. It should be fairly easy to compile for linux and osx users though...

I'm going to poke him every day until there's a working compile.

Mystery Keeper
2nd August 2013, 12:00
What about x64 versions of both VapourSynth and its plug-ins? Very complex scripts call for larger memory usage, and AviSynth crashes whenever used memory approaches 4GB even in x64 version.

Myrsloik
2nd August 2013, 12:06
What about x64 versions of both VapourSynth and its plug-ins? Very complex scripts call for larger memory usage, and AviSynth crashes whenever used memory approaches 4GB even in x64 version.

Next version will most likely have x64 builds for windows. I actually do write my general plan for the next version on the blog...

If you want to try x64 stuff right now run vs on linux or mac.

LoRd_MuldeR
2nd August 2013, 20:11
Today I have added VaporSynth support to my x264 GUI and I have to say VSPipe works exactly as expected :)

Anyway, I have two more small feature requests:
1. Add an option like "-version" to VSPipe so the installed VaporSynth version can be checked easily.
2. Automatically convert RGB formats to YUV when "-y4m" switch is used rather than aborting.

:thanks:


BTW: What is the recommend way to detect VapourSynth on Windows? I currently use the "Uninstall" registry entry to find the "InstallLocation". Is that reliable?

Chikuzen
2nd August 2013, 20:39
BTW: What is the recommend way to detect VapourSynth on Windows? I currently use the "Uninstall" registry entry to find the "InstallLocation". Is that reliable?


HMODULE h = LoadLibrary("vsscript");
if (h) {
installed
} else {
not installed
}

probably, this is the easiest way.
There is no need to find where vapoursynth.dll was installed since you can access VS via vsscript.

LoRd_MuldeR
2nd August 2013, 20:41
Didn't realize "vsscript.dll" gets installed into the system folder. Anyway, I also need to find "vspipe.exe" for my application.

Or do you suggest "vspipe.exe" should be redistributed with my application? Will future versions of "vsscript.dll" be backward compatible to current "vspipe.exe" version?

Myrsloik
2nd August 2013, 21:38
Today I have added VaporSynth support to my x264 GUI and I have to say VSPipe works exactly as expected :)

Anyway, I have two more small feature requests:
1. Add an option like "-version" to VSPipe so the installed VaporSynth version can be checked easily.
2. Automatically convert RGB formats to YUV when "-y4m" switch is used rather than aborting.

:thanks:


BTW: What is the recommend way to detect VapourSynth on Windows? I currently use the "Uninstall" registry entry to find the "InstallLocation". Is that reliable?

1. Will be added.
2. Will never happen, converting behind the user's back will cause more problems than it solves. Why not add a conversion line to the end of the script when needed? It also sounds like you want to convert ONLY to conveniently pass clip metadata...
3. Currently there's no good way. I'll create proper registry keys in the R20 installer so HKLM\Software\VapourSynth will have keys containing paths and versions. Chikuzen's way will work if all you want to know is if it's R19 or later.

The path in the uninstall entry is of course also valid to use.

LoRd_MuldeR
3rd August 2013, 12:20
2. Will never happen, converting behind the user's back will cause more problems than it solves. Why not add a conversion line to the end of the script when needed? It also sounds like you want to convert ONLY to conveniently pass clip metadata...

Wouldn't say it's "behind the user's back", when the caller requested "-y4m " explicitly. But maybe an additional "-force-y4m" switch could be added to avoid any possible confusion?

And indeed, I need to output YUV4MPEG, so that x264 gets the required meta information. Surely the required conversion line can be added to the script manually. But the problem here is that the script is provided by the user. And the GUI needs to ensure it will encode properly. It's not trivial at all to add the required line into an arbitrary user-provided script in an automated way. Currently it will simply error out. And then the user will have to understand and fix the issue himself. That's where 2/3 of all users say "Damn, the GUI isn't working with my script, let's try a different one!".

Also, I think in 99% of all use cases where the output of the script is sent to x264, we are going to need YUV anyway. I know x264 can do RGB encoding too, but that's a very rare use case. So, in 99.9% of all cases, either we sent YUV data to x264 or x264 will convert the RGB data to YUV by itself. This means forcing the RGB to YUV conversion on the VapourSynth side wouldn't hurt...


1. Will be added.
3. Currently there's no good way. I'll create proper registry keys in the R20 installer so HKLM\Software\VapourSynth will have keys containing paths and versions. Chikuzen's way will work if all you want to know is if it's R19 or later

:thanks:

Reel.Deel
3rd August 2013, 17:29
@Myrsloik

I'm trying to write (more like copy-paste) documentation for AVISource and have some questions.

In Avisynth you can do this AVISource("video1.avi", "video2.avi"), is this possible in Vapoursynth? I tried but I get an error. Just want to make sure so I don't included.

Is the order of decompression still true or has it changed because of the additional color spaces that it now supports?
If pixel_type is omitted or set to "FULL", AviSynth will use the first format supported by the decompressor (in the following order: YV24, YV16, YV12, YV411, YUY2, RGB32, RGB24 and Y8).
If set to "AUTO", AviSynth will use the old ordering: YV12, YUY2, RGB32, RGB24 and Y8.

One last thing, I tried opening a vpy script through AVISource in VS but I get this message:
Python exception: 'Internal environment id not set. Was set_output() called from a filter callback?'


Is that correct?

Myrsloik
3rd August 2013, 19:02
@Myrsloik

I'm trying to write (more like copy-paste) documentation for AVISource and have some questions.

In Avisynth you can do this AVISource("video1.avi", "video2.avi"), is this possible in Vapoursynth? I tried but I get an error. Just want to make sure so I don't included.

Is the order of decompression still true or has it changed because of the additional color spaces that it now supports?


One last thing, I tried opening a vpy script through AVISource in VS but I get this message:


Is that correct?

You can't pass multiple filenames. This is because internally in avisynth it's implemented as avisource(file1)++avisource(file2)++.. so there's no reason to copy avisynth here and reimplement splice badly.

Pixel_type works the same as avisynth describes but with a few additional formats.

unset tries (in this order):
YV24
YV16
YV12
YV411
YUY2
RGB32
RGB24
RGB48
Y8
P010
P016
P210
P216
v210

I'm going to remove AUTO and FULL (since FULL is implicit when unset) and AUTO is an avisynth leftover. No idea why anyone'd want the old order.

Interesting bug find. I think I know why it gives the environment id not set error and I'll probably fix it in the next version.

lansing
4th August 2013, 01:01
can you add the vspipe.exe to the environment variable path upon install, so we don't have to type the whole path every time?

mp3dom
7th August 2013, 13:05
Probably I'm doing something wrong, but I'm having problems adding black borders to a clip via AddBorders. The borders are always green. I've tried to add the command to a P210 clip but also on a YUV422P8 clip. The size is 1920x804 so I need to add 138px at top/bottom to pad the fullhd resolution.

Myrsloik
7th August 2013, 13:19
Probably I'm doing something wrong, but I'm having problems adding black borders to a clip via AddBorders. The borders are always green. I've tried to add the command to a P210 clip but also on a YUV422P8 clip. The size is 1920x804 so I need to add 138px at top/bottom to pad the fullhd resolution.

For 8bit:
AddBorders(..., color=[0,128,128])
For 10bit:
AddBorders(..., color=[0,512,512])

I'll make it default to black borders always in the next version.

mp3dom
7th August 2013, 13:30
Yup! I thought that default was black. Sorry to have not discovered it by myself reading the docs. Thanks for the support!

IsoaSFlus
8th August 2013, 01:40
hello Myrsloik,how can vapoursynth preview the video frame by frame in linux?

Myrsloik
8th August 2013, 01:44
hello Myrsloik,how can vapoursynth preview the video frame by frame in linux?

May i suggest wine and virtualdub?

jackoneill
8th August 2013, 17:28
hello Myrsloik,how can vapoursynth preview the video frame by frame in linux?

Maybe you could try this: https://github.com/dubhater/vapoursynth-viewer
(Tested with a grand total of 1 scripts.)

IsoaSFlus
9th August 2013, 01:12
Maybe you could try this: https://github.com/dubhater/vapoursynth-viewer
(Tested with a grand total of 1 scripts.)

i have gited it and compiled it,...and got a lot of error.i have posted the issue.

IsoaSFlus
9th August 2013, 15:38
umm...where can i get the introduction of assvapour?

jackoneill
9th August 2013, 17:03
umm...where can i get the introduction of assvapour?

I will assume you mean a guide...


clip = core.ffms2.Source("bigbuckbunny.mkv")

# Both AssRender() and Subtitle() return a list of two clips:
# the rendered subtitles in RGB24 and a Y8 mask you'll
# need to use to blend the subtitles with the video

clips = core.assvapour.AssRender(clip, "moo.ass")
# or
#clips = core.assvapour.Subtitle(clip, "Text to be burnt into the video.")

# convert the subtitles into the video's format (here we pretend it's YUV420P8)
clips[0] = core.resize.Bicubic(clips[0], format=vs.YUV420P8)

# and blend
ret = core.std.MaskedMerge([clip, clips[0]], clips[1])

IsoaSFlus
9th August 2013, 23:48
I will assume you mean a guide...


clip = core.ffms2.Source("bigbuckbunny.mkv")

# Both AssRender() and Subtitle() return a list of two clips:
# the rendered subtitles in RGB24 and a Y8 mask you'll
# need to use to blend the subtitles with the video

clips = core.assvapour.AssRender(clip, "moo.ass")
# or
#clips = core.assvapour.Subtitle(clip, "Text to be burnt into the video.")

# convert the subtitles into the video's format (here we pretend it's YUV420P8)
clips[0] = core.resize.Bicubic(clips[0], format=vs.YUV420P8)

# and blend
ret = core.std.MaskedMerge([clip, clips[0]], clips[1])


thank you very much~i rendered ass by assvapour successfully.

Rodger
14th August 2013, 18:41
Could some be so nice to translate the following easy script for me please?

Obviously I need to learn a loooot more about it as all my attempts are quitted with error code 1 :o (using Simple x264 launcher)


Loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\DGDecodeNV.dll")

DGSource("The Score.dgi", resize_w=720, resize_h=576, deinterlace=1)

Myrsloik
14th August 2013, 18:51
Could some be so nice to translate the following easy script for me please?

Obviously I need to learn a loooot more about it as all my attempts are quitted with error code 1 :o (using Simple x264 launcher)

Something like this I guess:

import vapoursynth as vs
core = vs.get_core()
core.avs.LoadPlugin(r"C:\Program Files (x86)\AviSynth 2.5\plugins\DGDecodeNV.dll")
core.avs.DGSource(r"The Score.dgi", resize_w=720, resize_h=576, deinterlace=1).set_output()

I don't know if dgdecodenv works at all though. Script not actually tested.

LoRd_MuldeR
14th August 2013, 19:29
import vapoursynth as vs
core = vs.get_core()
core.avs.LoadPlugin(r"C:\Program Files (x86)\AviSynth 2.5\plugins\DGDecodeNV.dll")
core.avs.DGSource(r"The Score.dgi", resize_w=720, resize_h=576, deinterlace=1).set_output()

I don't know if dgdecodenv works at all though. Script not actually tested.

I can confirm it does work :)

Rodger
15th August 2013, 15:27
Something like this I guess:

import vapoursynth as vs
core = vs.get_core()
core.avs.LoadPlugin(r"C:\Program Files (x86)\AviSynth 2.5\plugins\DGDecodeNV.dll")
core.avs.DGSource(r"The Score.dgi", resize_w=720, resize_h=576, deinterlace=1).set_output()

I don't know if dgdecodenv works at all though. Script not actually tested.

THANK YOU!

I was close...not that close, but close :p
need to learn more about that "r" in the path setting

/EDIT: compared varoursynth with avisynth64 on my machine.
Very close....9560 frames with VS and 9575 with AS (5 minute timerun)
When there are 64bit builds available tell me Iīll repeat my test.