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 2nd August 2013, 20:41   #881  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
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?
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊
LoRd_MuldeR is offline   Reply With Quote
Old 2nd August 2013, 21:38   #882  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by LoRd_MuldeR View Post
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.




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.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 3rd August 2013, 12:20   #883  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by Myrsloik View Post
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...


Quote:
Originally Posted by Myrsloik View Post
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
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 3rd August 2013 at 12:22.
LoRd_MuldeR is offline   Reply With Quote
Old 3rd August 2013, 17:29   #884  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
@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?
Quote:
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:
Quote:
Python exception: 'Internal environment id not set. Was set_output() called from a filter callback?'
Is that correct?

Last edited by Reel.Deel; 3rd August 2013 at 17:42.
Reel.Deel is offline   Reply With Quote
Old 3rd August 2013, 19:02   #885  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by Reel.Deel View Post
@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.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 4th August 2013, 01:01   #886  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,657
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?
lansing is offline   Reply With Quote
Old 7th August 2013, 13:05   #887  |  Link
mp3dom
Registered User
 
Join Date: Jul 2003
Location: Italy
Posts: 1,135
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.
mp3dom is offline   Reply With Quote
Old 7th August 2013, 13:19   #888  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by mp3dom View Post
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.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 7th August 2013, 13:30   #889  |  Link
mp3dom
Registered User
 
Join Date: Jul 2003
Location: Italy
Posts: 1,135
Yup! I thought that default was black. Sorry to have not discovered it by myself reading the docs. Thanks for the support!
mp3dom is offline   Reply With Quote
Old 8th August 2013, 01:40   #890  |  Link
IsoaSFlus
Registered User
 
IsoaSFlus's Avatar
 
Join Date: Mar 2013
Posts: 8
hello Myrsloik,how can vapoursynth preview the video frame by frame in linux?
IsoaSFlus is offline   Reply With Quote
Old 8th August 2013, 01:44   #891  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by IsoaSFlus View Post
hello Myrsloik,how can vapoursynth preview the video frame by frame in linux?
May i suggest wine and virtualdub?
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 8th August 2013, 17:28   #892  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
Quote:
Originally Posted by IsoaSFlus View Post
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.)
__________________
Buy me a "coffee" and/or hire me to write code!
jackoneill is offline   Reply With Quote
Old 9th August 2013, 01:12   #893  |  Link
IsoaSFlus
Registered User
 
IsoaSFlus's Avatar
 
Join Date: Mar 2013
Posts: 8
Quote:
Originally Posted by jackoneill View Post
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 is offline   Reply With Quote
Old 9th August 2013, 15:38   #894  |  Link
IsoaSFlus
Registered User
 
IsoaSFlus's Avatar
 
Join Date: Mar 2013
Posts: 8
umm...where can i get the introduction of assvapour?
IsoaSFlus is offline   Reply With Quote
Old 9th August 2013, 17:03   #895  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
Quote:
Originally Posted by IsoaSFlus View Post
umm...where can i get the introduction of assvapour?
I will assume you mean a guide...

Code:
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])
__________________
Buy me a "coffee" and/or hire me to write code!
jackoneill is offline   Reply With Quote
Old 9th August 2013, 23:48   #896  |  Link
IsoaSFlus
Registered User
 
IsoaSFlus's Avatar
 
Join Date: Mar 2013
Posts: 8
Quote:
Originally Posted by jackoneill View Post
I will assume you mean a guide...

Code:
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.
IsoaSFlus is offline   Reply With Quote
Old 14th August 2013, 18:41   #897  |  Link
Rodger
Registered User
 
Join Date: Dec 2001
Location: Viersen, Germany
Posts: 270
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 (using Simple x264 launcher)

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

DGSource("The Score.dgi", resize_w=720, resize_h=576, deinterlace=1)
Rodger is offline   Reply With Quote
Old 14th August 2013, 18:51   #898  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by Rodger View Post
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 (using Simple x264 launcher)
Something like this I guess:

Code:
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.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 14th August 2013, 19:29   #899  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by Myrsloik View Post
Code:
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
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊
LoRd_MuldeR is offline   Reply With Quote
Old 15th August 2013, 15:27   #900  |  Link
Rodger
Registered User
 
Join Date: Dec 2001
Location: Viersen, Germany
Posts: 270
Quote:
Originally Posted by Myrsloik View Post
Something like this I guess:

Code:
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
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.

Last edited by Rodger; 15th August 2013 at 16:25.
Rodger is offline   Reply With Quote
Reply

Tags
speed, vaporware, vapoursynth

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 03:10.


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