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

lansing
25th August 2017, 22:19
I found another problem with avisource, it couldn't open avi with Lagarith codec in RGB colorspace, it only works for lagarith yv12. I got this error "AttributeError: 'list' object has no attribute 'set_output'".

sample (http://www.mediafire.com/file/4ixy801ro2j2v14/lag_rgb.avi)

Myrsloik
25th August 2017, 22:21
I found another problem with avisource, it couldn't open avi with Lagarith codec in RGB colorspace, it only works for lagarith yv12. I got this error "AttributeError: 'list' object has no attribute 'set_output'".

sample (http://www.mediafire.com/file/4ixy801ro2j2v14/lag_rgb.avi)

It works. You get two clips back in a list when there's an alpha plane too. Set alpha=false if you don't need it at all.

lansing
25th August 2017, 22:30
It works. You get two clips back in a list when there's an alpha plane too. Set alpha=false if you don't need it at all.

There is no alpha option in avisource

Myrsloik
25th August 2017, 22:32
There is no alpha option in avisource

Ignore the part about that then. Confused it with ffms2. clip[0] and you're good.

lansing
25th August 2017, 22:46
Ignore the part about that then. Confused it with ffms2. clip[0] and you're good.

Ok the video shows up now, but now I got the upside down problem, probably the same problem as I reported earlier.

Myrsloik
25th August 2017, 22:53
With rgb lagarith? I'll test that again then. Just use flipvertical for now.

lansing
2nd September 2017, 23:12
I just saved a rgb curve file from photoshop (.acv), is there a function to load this into vapoursynth?

Myrsloik
2nd September 2017, 23:19
I just saved a rgb curve file from photoshop (.acv), is there a function to load this into vapoursynth?

No. Save it as a cube lut instead if possible because that is supported.

lansing
3rd September 2017, 00:41
Photoshop doesn't have the option to output the curve as lut file, and I couldn't find a acv to lut converter.
I'll figure out other way to output it as lut then.

poisondeathray
3rd September 2017, 01:27
Photoshop doesn't have the option to output the curve as lut file, and I couldn't find a acv to lut converter.
I'll figure out other way to output it as lut then.

what?

https://helpx.adobe.com/photoshop/using/export-color-lookup-tables.html


The other option is through avisynth gicocu , then import the avs with AVISource in vapoursynth

lansing
3rd September 2017, 01:50
what?

https://helpx.adobe.com/photoshop/using/export-color-lookup-tables.html


The other option is through avisynth gicocu , then import the avs with AVISource in vapoursynth

I'm don't have cc, I'm using cs6, it doesn't have it.

The avs one is outdated, the curve file photoshop uses now is .acv instead of .amp.

poisondeathray
3rd September 2017, 01:59
I'm don't have cc, I'm using cs6, it doesn't have it.

The avs one is outdated, the curve file photoshop uses now is .acv instead of .amp.

Couldn't you just replicate it in gimp ? Use gimp curve with gicocu?

poisondeathray
3rd September 2017, 02:08
The avs one is outdated, the curve file photoshop uses now is .acv instead of .amp.

You can export .amp instead of .acv by switching to the pencil tool. I don't have PS CS6 handy but it works in CC

https://www.photography-forums.com/threads/create-amp-file-from-acv-file.69289/

lansing
3rd September 2017, 08:33
You can export .amp instead of .acv by switching to the pencil tool. I don't have PS CS6 handy but it works in CC

https://www.photography-forums.com/threads/create-amp-file-from-acv-file.69289/

Yes I was able save it as amp file now. But the filter is giving me a headache trying to get it to work.

Got an error "vapoursynth.Error: Invalid avisynth colorspace in one of the input clips" when trying to load it into vs

cur_path = r'blah.amp'
clip = core.ffms2.Source(blah)
clip = core.resize.Bicubic(clip, format=vs.RGB24)
cc = core.avs.GiCoCu(clip, cur_path)


And then when I try to open it with avspmod in avs+ the program crashed
cur_path ="blah.amp"
GiCoCu(cur_path, alpha=False, photoshop=False)

poisondeathray
3rd September 2017, 15:14
Maybe because GiGoCu is avisynth 2.5 plugin ? Or maybe you're using 64bit vpy ?

Probably the former because I can't even get it to work in in 32bit avisynth . Unless there is another version somewhere ?

What about gradcurve, the vdub port for vapoursynth ?
I didn't test it yet, but in the example, he's using an .amp file
https://github.com/xekon/GradCurve

EDIT:
^ it worked ok for 64bit version with both amp and acv.
No error messages pop up for path errors; at first I was wondering why it wasn't working.

lansing
3rd September 2017, 16:21
Maybe because GiGoCu is avisynth 2.5 plugin ? Or maybe you're using 64bit vpy ?

Probably the former because I can't even get it to work in in 32bit avisynth . Unless there is another version somewhere ?

What about gradcurve, the vdub port for vapoursynth ?
I didn't test it yet, but in the example, he's using an .amp file
https://github.com/xekon/GradCurve

Wow nice find, didn't know that we have the curve filter for vs.
The filter work both on amp and acv, no more work around or conversion.


cur_path = r'test.amp'

clip = core.ffms2.Source(abc.mp4)
clip = core.resize.Bicubic(clip, matrix_in_s="709", format=vs.RGB24)

clip = core.grad.Curve(clip, cur_path, ftype=1, pmode=1) # ftype 1 for amp, 2 for acv


Found some missing safety checks though, if I declared a wrong type in the argument for the input curve file, the editor will crash. These are the 2 combinations I found that crash, don't know if there's more.

cur_path = r'test.amp'
clip = core.grad.Curve(clip, cur_path, ftype=2, pmode=1)

cur_path = r'test.acv'
clip = core.grad.Curve(clip, cur_path, ftype=6, pmode=1)

lansing
3rd September 2017, 18:04
um, actually the filter was listed on the vapoursynth plugin page months ago...
But its description is meaningless, it's a curve reader rather than anything else that was said on the official thread (https://forum.doom9.org/showthread.php?t=174096).

lansing
4th September 2017, 06:53
Hi I'm getting this green vertical bar on the right of my frame after using resize on the video, and there are random crashes for no reason.

clip = core.resize.Bicubic(clip, width=640, height=480)


here's the video sample that's causing the problem
http://www.mediafire.com/file/p9jgodk3mwf9loo/snow.avi

LigH
4th September 2017, 12:52
Without downloading it, just a guess: Does it have an odd width?

poisondeathray
4th September 2017, 14:22
It's 720x416 . xvid.

Crashes with all source filters, ffms2, l-smash, avisource in vapoursynth R39 x64. Even crashes feeding avs using avisource . (avs works independently, avs+resize works too, and feeding the 640x480 bicubic resized from avisynth works)

poisondeathray
4th September 2017, 14:32
But resizing using fmtconv (bicubic) works... so it's likely related to the internal zimg implementation

lansing
4th September 2017, 15:23
Without downloading it, just a guess: Does it have an odd width?

Ok after some further testings I found the point where the problem occurs.

It's when the width of the input video is smaller than 720 pixel. All input clip with width bigger than 720 will work, couldn't find the exact crash pattern. Some width that is smaller than 720 may work, some may crash.

This will work:

clip = core.std.BlankClip(width=1920, height=1080, length=10000)

clip = core.resize.Bicubic(clip, width=748, height=400)
clip = core.resize.Bicubic(clip, width=740, height=480)


This will crash or give me a green right bar for an actual video:

clip = core.std.BlankClip(width=1920, height=1080, length=10000)

clip = core.resize.Bicubic(clip, width=710, height=400)
clip = core.resize.Bicubic(clip, width=740, height=480)

poisondeathray
4th September 2017, 15:32
This will crash or give me a green right bar for an actually video:

clip = core.std.BlankClip(width=1920, height=1080, length=10000)

clip = core.resize.Bicubic(clip, width=710, height=400)
clip = core.resize.Bicubic(clip, width=740, height=480)



This works for me, I think because it's in RGB. If you use format=vs.YUV420P8 for BlankClip, I get green bar

Are_
4th September 2017, 18:05
2.6.1
depth: fix SSE2 conversions with mod4 and mod8 widths (introduced in 2.6)
Looks like it is fixed in git, because some green bar problems disappeared, but I still get segfaults when trying to run the original line.
import vapoursynth as vs
core = vs.get_core()
clip = core.ffms2.Source('snow.avi')
clip = core.resize.Bicubic(clip, width=640, height=480)
clip.set_output()

Anybody else?

Are_
4th September 2017, 18:13
This script produces a segfault too. For me this is a little random, and lower lengths are more prone to produce a segfault.
import vapoursynth as vs
core = vs.get_core()
clip = core.std.BlankClip(width=720, height=416, length=62)
clip = core.resize.Bicubic(clip, width=640, height=480)
clip.set_output()
Because this is random for me, have anybody else this problem? Or is maybe my hardware / software builds?

Myrsloik
4th September 2017, 18:20
R39 test2 (https://www.dropbox.com/s/bzs8qoa174k11d8/VapourSynth-R39-test2.exe?dl=1)

Should fix the resizing errors

lansing
4th September 2017, 18:31
R39 test2 (https://www.dropbox.com/s/bzs8qoa174k11d8/VapourSynth-R39-test2.exe?dl=1)

Should fix the resizing errors

The random crash is gone, but the green bar is still there for the sample video, sometime blue sometime red.

Myrsloik
4th September 2017, 21:37
R39 test3 (https://www.dropbox.com/s/fsdll7igx16cgg5/VapourSynth-R39-test3.exe?dl=1)

Now with one more resizer fix

lansing
4th September 2017, 22:08
R39 test3 (https://www.dropbox.com/s/fsdll7igx16cgg5/VapourSynth-R39-test3.exe?dl=1)

Now with one more resizer fix

Now the crash came back with the green bar

Myrsloik
4th September 2017, 22:20
Now the crash came back with the green bar

Does ot work properly with R38?

lansing
4th September 2017, 22:40
Does ot work properly with R38?

Just tried it, it works fine in R38

Are_
4th September 2017, 23:23
Latest update to zimg fixed this for me, no more segfaults here.

Myrsloik
5th September 2017, 14:22
R39 test4 (https://www.dropbox.com/s/qsukynipemu18j9/VapourSynth-R39-test4.exe?dl=1)

I miscompiled test3 so that's why it didn't work. That's what happens when you have to reinstall everything on a new computer...

lansing
5th September 2017, 14:50
R39 test4 (https://www.dropbox.com/s/qsukynipemu18j9/VapourSynth-R39-test4.exe?dl=1)

I miscompiled test3 so that's why it didn't work. That's what happens when you have to reinstall everything on a new computer...

Yes the problem is fixed now, thanks

deniskx
7th September 2017, 10:40
Hello. You can call me stupid, but I broke my head. I'm pretty good in Avisynth, but in Vapoursynth is a beginner. I have Xubuntu 16.04 x86, Vapoursynth from PPA. I need to connect avisynth TIVTC.dll plugin, because of 2-pass mode=2 and mode=4 (I have a complex video), which is not in VIVTC. And I can not.

import vapoursynth as vs
core = vs.get_core()
core.avs.LoadPlugin(TIVTC.dll)
video = core.ffms2.Source(source=input.mkv)
video = core.avs.TDecimate()
video.set_output()

vspipe --y4m script.vpy - | ffmpeg -i pipe: output.mkv
writes errors like that:
No attribute with the name avs exists. Did you mistype a plugin namespace
Help me, please.

tuanden0
7th September 2017, 16:00
Hello. You can call me stupid, but I broke my head. I'm pretty good in Avisynth, but in Vapoursynth is a beginner. I have Xubuntu 16.04 x86, Vapoursynth from PPA. I need to connect avisynth TIVTC.dll plugin, because of 2-pass mode=2 and mode=4 (I have a complex video), which is not in VIVTC. And I can not.

import vapoursynth as vs
core = vs.get_core()
core.avs.LoadPlugin(TIVTC.dll)
video = core.ffms2.Source(source=input.mkv)
video = core.avs.TDecimate()
video.set_output()

vspipe --y4m script.vpy - | ffmpeg -i pipe: output.mkv
writes errors like that:
No attribute with the name avs exists. Did you mistype a plugin namespace
Help me, please.

Try add "-" after output:
vspipe --y4m script.vpy - | ffmpeg -i pipe: output.mkv -
:D

Myrsloik
7th September 2017, 17:34
Hello. You can call me stupid, but I broke my head. I'm pretty good in Avisynth, but in Vapoursynth is a beginner. I have Xubuntu 16.04 x86, Vapoursynth from PPA. I need to connect avisynth TIVTC.dll plugin, because of 2-pass mode=2 and mode=4 (I have a complex video), which is not in VIVTC. And I can not.

import vapoursynth as vs
core = vs.get_core()
core.avs.LoadPlugin(TIVTC.dll)
video = core.ffms2.Source(source=input.mkv)
video = core.avs.TDecimate()
video.set_output()

vspipe --y4m script.vpy - | ffmpeg -i pipe: output.mkv
writes errors like that:
No attribute with the name avs exists. Did you mistype a plugin namespace
Help me, please.

You can't load avisynth plugins in linux. If that's what you're trying to do.

LigH
7th September 2017, 19:38
Maybe not yet (https://github.com/taviso/loadlibrary) ... :p

Myrsloik
7th September 2017, 19:41
Maybe not yet (https://github.com/taviso/loadlibrary) ... :p

Not by me. Proper ports are better anyway. You'd still need x64 versions of everything which not all things have.

I have a dream that one day an avisynth user will suggest doing the right thing and not just another shitty compatibility hack.

LigH
7th September 2017, 19:46
Of course. A cross-platform portable loadable library format ... sigh ... Mono?!

Myrsloik
7th September 2017, 19:47
Of course. A cross-platform portable loadable library format ... sigh ... Mono?!

It's called C. With a system compiler. Works everywhere.

LigH
7th September 2017, 20:03
May there be no system dependent function calls. Or references to external libraries (like FFT3D). Do it yourself ... everything ... from scratch. Or from other OpenSource projects. Rely on the community! Closed Source is so ... last millennium. ;)

https://cosgan.de/images/smilie/nahrung/a015.gif

deniskx
8th September 2017, 13:56
You can't load avisynth plugins in linux.
Thanks. This should be specified here (http://www.vapoursynth.com/doc/functions/loadpluginavs.html) so as not to mislead people.

What the point of Vapoursynth then? Another fork? Windows has a working learning Avisynth. Linux does not have avs plug-ins, so Avisynth under Wine is the best solution then.

Myrsloik
8th September 2017, 14:02
Thanks. This should be specified here (http://www.vapoursynth.com/doc/functions/loadpluginavs.html) so as not to mislead people.

What the point of Vapoursynth then? Another fork? Windows has a working learning Avisynth. Linux does not have avs plug-ins, so Avisynth under Wine is the best solution then.

Native binaries are native only. You should definitely know this since you've heard about wine.

VapourSynth also isn't a fork. The point is code quality, portability and proper multithreading support. And more flexible scripting too.

And no, not caving in to your documentation demands. It shall remain unchanged.

feisty2
8th September 2017, 14:59
Thanks. This should be specified here (http://www.vapoursynth.com/doc/functions/loadpluginavs.html) so as not to mislead people.

What the point of Vapoursynth then? Another fork? Windows has a working learning Avisynth. Linux does not have avs plug-ins, so Avisynth under Wine is the best solution then.

vaporsynth got the ability (std.Expr) to evaluate RPN expressions on 32 bits floating point precision video clips and take (practically) arbitrary amount of clips as the input, while avisynth got the naïve mt_lut(xyz) that takes up to 3 clips and only works with 8 bits low precision clips
that's enough for me to sentence avisynth to death

TheFluff
8th September 2017, 16:14
What the point of Vapoursynth then?

Unlike Avisynth, VS isn't completely awful.

poisondeathray
8th September 2017, 16:55
But avisynth has things that vapoursynth can't do right now. Like audio.

So not completely aweful :)

mparade
10th September 2017, 14:46
Can someone help why it is not possible to feed a HDR10 encoded content to x265 to reencode using DGDecNV (latest with HDR10 support) and Vapoursynth?

Error message as follows:

x265 [error]: unable to open input file

Author of DGDecNV suggested asking the Vapoursynth guys about it. What information should be provided for support?

I am not a programmer, not using Vapoursynth directly but perhaps can provide all the info required to find the reason for the problem.

Please help.

stax76
10th September 2017, 15:03
@mparade

Your VS script would be a start.

mparade
10th September 2017, 16:00
@mparade

Your VS script would be a start.

Please find as an attachement.

http://mammutmail.com/hu/download/b4fd9283677f21bb3b8fff07f65d0611