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
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 27th July 2014, 13:04   #1301  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Thanks for the update.

However I noticed that with the new VSPIPE version querying the VapourSynth version doesn't work, which breaks the VapourSynth detection code in my GUI program:
Code:
C:\Program Files (x86)\VapourSynth\core32>vspipe.exe -v
No script file specified

C:\Program Files (x86)\VapourSynth\core32>vspipe.exe -version
No output file specified

C:\Program Files (x86)\VapourSynth\core32>vspipe.exe --version
No script file specified
Code:
VapourSynth detection is running, please stand by...
VSPIPE.EXE failed with code 0x00000001 -> disable Vapousynth support!
VapourSynth thread finished.
VapourSynth thread failed to detect installation!

Also, maybe more a cosmetic problem, but anyway: Is it supposed to show those $s's there?
Code:
VSPipe usage:
  $s [options] <script> <outfile>

Examples:
  Show script info:
    $s --info script.vpy -

BTW: Changing the CLI syntax in a non-backward-compatible way is generally bad for GUI front-end's, since we either need to support old and new variants (which is pain) or we support only a specific VapourSynth version (then user is doomed if program A wants VapourSynth r23 and program B wants VapourSynth r24).
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 27th July 2014 at 13:18.
LoRd_MuldeR is offline   Reply With Quote
Old 27th July 2014, 14:15   #1302  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
VapourSynth R24 test 3

Fixes the vspipe issues.

Quote:
Originally Posted by LoRd_MuldeR View Post
...

BTW: Changing the CLI syntax in a non-backward-compatible way is generally bad for GUI front-end's, since we either need to support old and new variants (which is pain) or we support only a specific VapourSynth version (then user is doomed if program A wants VapourSynth r23 and program B wants VapourSynth r24).
I know changing things is bad, that's why I keep a list of major things I'm going to break all at once at an unspecified later time for the core API. The rest of the project is kinda in an evolutionary state though.

However having saner argument parsing is just too attractive to not do it and adding additional options would've been difficult without re-writing it all anyway. Now it follows standard command line conventions and makes more sense. The user base is also still small and fast enough to adapt to the changes. You're the only one making a GUI front end that I know of. Feel free to drop support for older versions of VS if it's too much work. I really try to make each release better than the last, or at least release a fix quickly if a major issue is found.

Anyway, no more major vspipe changes. Now it's done.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 27th July 2014, 14:40   #1303  |  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
VapourSynth R24 test 3

Fixes the vspipe issues.
Confirmed

Code:
c:\Program Files (x86)\VapourSynth\core32>vspipe.exe --version
VapourSynth Video Processing Library
Copyright (c) 2012-2014 Fredrik Mellbin
Core r24
API r3

Quote:
Originally Posted by Myrsloik View Post
Anyway, no more major vspipe changes. Now it's done.
From your lips to God's ears
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊
LoRd_MuldeR is offline   Reply With Quote
Old 27th July 2014, 20:58   #1304  |  Link
zerowalker
Registered User
 
Join Date: Jul 2011
Posts: 1,121
How is Vapoursynth looking?

It's been awhile since it came, so i wonder, is the improvements as expected and all that?

I know it's still far from done, so not expecting it to be comparable, but i just mean in the sense that it's using a more modern approach and how that compares.
zerowalker is offline   Reply With Quote
Old 28th July 2014, 00:34   #1305  |  Link
Mystery Keeper
Beyond Kawaii
 
Mystery Keeper's Avatar
 
Join Date: Feb 2008
Location: Russia
Posts: 724
VapourSynth is rather great. Especially compared to the current state of AviSynth. But it lacks some essential plugins. NNEDI3 is only supporting 8bit colordepth so far. No motion compensation. No DFTTest.
__________________
...desu!
Mystery Keeper is offline   Reply With Quote
Old 28th July 2014, 02:09   #1306  |  Link
zerowalker
Registered User
 
Join Date: Jul 2011
Posts: 1,121
How's the speed compared to Avisynth, in stuff that's working as expected?
zerowalker is offline   Reply With Quote
Old 6th August 2014, 22:12   #1307  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
I'm back AGAIN!

Here's R24 RC1 with a pile of important additional fixes.

Test everything a bit so it doesn't crashe too often. I had to change a lot of python code to fix some of the bugs.

All changes in R24 so far:
Code:
r24:
fixed reference leak in FrameEval
more functions in the vsscript api now return success or failure
improved handling of the vsfunc type in python, it should now have all the functionality originally intended
removed r21 argument compatibility since all scripts should have been changed by now
include file paths in the windows sdk have been changed to better match linux and osx
the core will no longer be completely freed until all filter instances belonging to it have been released, this prevents crashes in some circumstances
vsvfw now properly returns an error message when no output has been set instead of silently failing
fixed a reference leak in vsscript
vspipe has a new argument for passing on values to the script environment from the command line 
vspipe now has improved command line parsing and short forms, however old command lines will have to be modified to work
re-added clip.output()
fixed a filter error propagation issue
mixed improvements to vivtc (nodame)
fixed mac compilation of genericfilters
added FreezeFrames, DuplicateFrames and DeleteFrames, they can all delete/duplicate/freeze multiple frames with one command (nodame)
mixed documentation improvements (nodame)
fixed tracking of memory usage that was broken in r22 (nodame)
vivtc now uses framedifference internally and runs completely in parallel, also minor metric reporting fixes (nodame)
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 6th August 2014, 22:13   #1308  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
Quote:
Originally Posted by zerowalker View Post
How's the speed compared to Avisynth, in stuff that's working as expected?
About the same speed for single threaded. Good scaling with the number of cores on medium-complex scripts when multithreaded. Not much more to say about it.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 9th August 2014, 10:01   #1309  |  Link
anonymlol
Registered User
 
Join Date: Apr 2013
Posts: 25
Quote:
Originally Posted by Myrsloik View Post
I'm back AGAIN!
Here's R24 RC1 with a pile of important additional fixes.
Chrome is blocking it:
anonymlol is offline   Reply With Quote
Old 9th August 2014, 12:09   #1310  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
Quote:
Originally Posted by anonymlol View Post
Chrome is blocking it:
It's chrome acting like shit antivirus software. Use IE or something else to download where you can ignore the warnings.

Installers are regularly blacklisted/blocked by incompetence.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 10th August 2014, 04:49   #1311  |  Link
alexxdls
Registered User
 
Join Date: Nov 2013
Posts: 26
Can I maintain aspect ratio while resizing?
Code:
v = core.resize.Lanczos(clip=v, width=1920, height=new_height)
Code:
new_height = original_height / original_width x 1920
How can I get original_height and original_width with VapourSynth? Please give a detailed example.

Last edited by alexxdls; 10th August 2014 at 05:04.
alexxdls is offline   Reply With Quote
Old 10th August 2014, 06:53   #1312  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
Quote:
Originally Posted by alexxdls View Post
Can I maintain aspect ratio while resizing?
Code:
v = core.resize.Lanczos(clip=v, width=1920, height=new_height)
Code:
new_height = original_height / original_width x 1920
How can I get original_height and original_width with VapourSynth? Please give a detailed example.
http://www.vapoursynth.com/doc/pythonreference.html
Code:
new_height = int(v.height / v.width * 1920 + 0.5)
This rounds up to the next integer, which may not be what you need (if you have subsampling).
__________________
Buy me a "coffee" and/or hire me to write code!
jackoneill is offline   Reply With Quote
Old 10th August 2014, 10:20   #1313  |  Link
alexxdls
Registered User
 
Join Date: Nov 2013
Posts: 26
Is it correct calculation (rounding to the neares even value)?
Code:
new_height = v.height / v.width * new_width - 0.5
new_height = lambda new_height : round( new_height / 2.) * 2	
v = core.resize.Lanczos(clip=v, width=new_width , height=new_height)
alexxdls is offline   Reply With Quote
Old 12th August 2014, 16:59   #1314  |  Link
alexxdls
Registered User
 
Join Date: Nov 2013
Posts: 26
Code:
import vapoursynth as vs
core = vs.get_core()
import os
core.std.LoadPlugin(path=r"d:\TOOLS\MyDCPConverter\Tools\imwri-64.dll")
core.std.LoadPlugin(path=r"d:\TOOLS\MyDCPConverter\Tools\fmtconv.dll")
ext = 'L.png'
dir = r"F:\TEMP\TRAIN-DRAGON-2_TLR-G-3D_RU-XX_RU-00_51_2K_TCF_20140417_DWA_IOP-3D\REEL1/"
srcs = [dir + src for src in os.listdir(dir) if src.endswith(ext)]
vl1 = core.imwri.Read(srcs)
vl1 = core.fmtc.matrix(vl1, mat="709", col_fam=vs.YUV, csp=vs.YUV444P16, bits=16, fulls=1, fulld=1)
vl = vl1
dir = r"F:\TEMP\TRAIN-DRAGON-2_TLR-G-3D_RU-XX_RU-00_51_2K_TCF_20140417_DWA_IOP-3D\REEL2/"
srcs = [dir + src for src in os.listdir(dir) if src.endswith(ext)]
vl2 = core.imwri.Read(srcs)
vl2 = core.fmtc.matrix(vl2, mat="709", col_fam=vs.YUV, csp=vs.YUV444P16, bits=16, fulls=1, fulld=1)
vl = vl + vl2
vl = core.std.CropRel(vl, left=15, right=15, top=0, bottom=0)
new_height = round(vl.height / vl.width * 1920 / 2) * 2
vl = core.resize.Lanczos(vl, width=1920, height=new_height)
border_height = round((1080 - vl.height) / 2)
vl = core.std.AddBorders(vl, top=border_height, bottom=border_height)
ext = 'R.png'
dir = r"F:\TEMP\TRAIN-DRAGON-2_TLR-G-3D_RU-XX_RU-00_51_2K_TCF_20140417_DWA_IOP-3D\REEL1/"
srcs = [dir + src for src in os.listdir(dir) if src.endswith(ext)]
vr1 = core.imwri.Read(srcs)
vr1 = core.fmtc.matrix(vr1, mat="709", col_fam=vs.YUV, csp=vs.YUV444P16, bits=16, fulls=1, fulld=1)
vr = vr1
dir = r"F:\TEMP\TRAIN-DRAGON-2_TLR-G-3D_RU-XX_RU-00_51_2K_TCF_20140417_DWA_IOP-3D\REEL2/"
srcs = [dir + src for src in os.listdir(dir) if src.endswith(ext)]
vr2 = core.imwri.Read(srcs)
vr2 = core.fmtc.matrix(vr2, mat="709", col_fam=vs.YUV, csp=vs.YUV444P16, bits=16, fulls=1, fulld=1)
vr = vr + vr2
vr = core.std.CropRel(vr, left=15, right=15, top=0, bottom=0)
vr = core.resize.Lanczos(vr, width=1920, height=new_height)
border_height = round((1080 - vr.height) / 2)
vr = core.std.AddBorders(vr, top=border_height, bottom=border_height)
v = core.std.StackHorizontal([vl,vr])
v = core.std.AssumeFPS(v, fpsnum=24)
v = core.fmtc.resample(v, css="420")
v = core.fmtc.bitdepth(v, bits=8, dmode=3)
v.set_output()
I get an error
Code:
unable to destroy mutex: Resource device
trying to encode this script. The same thing in FRIMEncode and x264 (with vspipe). Checking the script with VapourSynthEditor-64bit goees well
Code:
Script was successfully evaluated. Output video info:
Frames: 72 | Time: 0:00:03.000 | Size: 3840x1080 | FPS: 24/1 = 24 | Format: YUV420P8
But previewing fails and VapourSynthEditor-64bit crushes.
alexxdls is offline   Reply With Quote
Old 12th August 2014, 17:09   #1315  |  Link
Mystery Keeper
Beyond Kawaii
 
Mystery Keeper's Avatar
 
Join Date: Feb 2008
Location: Russia
Posts: 724
Evaluates, but crashes on processing? The error is in GetFrame().
__________________
...desu!
Mystery Keeper is offline   Reply With Quote
Old 13th August 2014, 03:10   #1316  |  Link
alexxdls
Registered User
 
Join Date: Nov 2013
Posts: 26
Replacing
Code:
v = core.std.StackHorizontal([vl,vr])
with
Code:
v = vl + vr
or
Code:
v = core.std.StackHorizontal([vr,vr])
or
Code:
v = core.std.StackHorizontal([vl,vl])
gives positive result and VapourSynthEditor-64bit doesn't crash anymore.
Even the simplest script with one frame in vl and vr crushes the same way
Code:
import vapoursynth as vs
core = vs.get_core()
import os
core.std.LoadPlugin(path=r"d:\TOOLS\MyDCPConverter\Tools\imwri-64.dll")
core.std.LoadPlugin(path=r"d:\TOOLS\MyDCPConverter\Tools\fmtconv.dll")
vl = core.imwri.Read(r"F:\TEMP\TRAIN-DRAGON-2_TLR-G-3D_RU-XX_RU-00_51_2K_TCF_20140417_DWA_IOP-3D\REEL2\000034L.png")
vr = core.imwri.Read(r"F:\TEMP\TRAIN-DRAGON-2_TLR-G-3D_RU-XX_RU-00_51_2K_TCF_20140417_DWA_IOP-3D\REEL2\000034R.png")
v = core.std.StackHorizontal([vl,vr])
v.set_output()
Code:
Script was successfully evaluated. Output video info:
Frames: 1 | Time: 0:00:00.033 | Size: 4096x858 | FPS: 30/1 = 30 | Format: RGB48
What is wrong with std.StackHorizontal???

Last edited by alexxdls; 13th August 2014 at 04:09.
alexxdls is offline   Reply With Quote
Old 13th August 2014, 09:02   #1317  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
Quote:
Originally Posted by alexxdls View Post
What is wrong with std.StackHorizontal???
I will take a look at it. I just happen to have plenty of other things as well to test. And a job. Posting in more threads about it won't make me happier or make me work faster.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 13th August 2014, 10:07   #1318  |  Link
nu774
Registered User
 
Join Date: Mar 2011
Posts: 16
Build of vapoursynth.pyd fails here (on windows) due to failure of "cimport windows". I needed to create the following file named "windows.pxd" placed under Cython directory.
Code:
cdef extern from "windows.h" nogil:
    bint WriteFile(void *hFile, void *lpBuffer, int nNumberOfBytesToWrite, int *lpNumberOfBytesWritten, void *lpOverlapped) nogil
nu774 is offline   Reply With Quote
Old 13th August 2014, 10:09   #1319  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
Quote:
Originally Posted by nu774 View Post
Build of vapoursynth.pyd fails here (on windows) due to failure of "cimport windows". I needed to create the following file named "windows.pxd" placed under Cython directory.
Code:
cdef extern from "windows.h" nogil:
    bint WriteFile(void *hFile, void *lpBuffer, int nNumberOfBytesToWrite, int *lpNumberOfBytesWritten, void *lpOverlapped) nogil
I forgot to add it. It's committed now.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 13th August 2014, 14:57   #1320  |  Link
alexxdls
Registered User
 
Join Date: Nov 2013
Posts: 26
Quote:
Originally Posted by Myrsloik View Post
Posting in more threads about it won't make me happier or make me work faster.
I sumply thought it is VS and Python issue and posted here. But then did some optimizations with my script to have just basic funtions to use Stack. And tests pointed me out that it could be the plugin issue.
alexxdls is offline   Reply With Quote
Reply

Tags
speed, vaporware, vapoursynth


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 21:15.


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