View Full Version : Vapoursynth
Myrsloik
15th August 2019, 20:08
R47.2 released. You should definitely update if you use a previous R47 version since it fixes the merge bug introduced when converting everything to intrinsics.
chipxtreme
22nd August 2019, 22:13
R47.2 released. You should definitely update if you use a previous R47 version since it fixes the merge bug introduced when converting everything to intrinsics.
When I go to update I get Python 3.7 (64 bit) is installed for the current user only. Run the installer again and select "Install for me only" or install Python for all users.
I only have one user on my PC and when I installed Python I selected install for all users. What am I doing wrong?
Myrsloik
23rd August 2019, 19:10
When I go to update I get Python 3.7 (64 bit) is installed for the current user only. Run the installer again and select "Install for me only" or install Python for all users.
I only have one user on my PC and when I installed Python I selected install for all users. What am I doing wrong?
Update from which version? Does it actually work if you select to install for the current user only?
Do you have any registry entries in HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\3.7?
chipxtreme
23rd August 2019, 20:51
Update from which version? Does it actually work if you select to install for the current user only?
Do you have any registry entries in HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\3.7?
I uninstalled previous version and have since deleted it so not sure which version I had previously. I don't have any registry entries there?
Myrsloik
23rd August 2019, 21:04
I uninstalled previous version and have since deleted it so not sure which version I had previously. I don't have any registry entries there?
Then you've most likely installed python only for the current user...
cyaoeu
24th August 2019, 03:12
The only easy way to make it work was to use the folder which VSRepo uses (%appdata%\Roaming\Python\Python37\site-packages). I've had Python installed in that mentioned directory under Program Files for a long time now but I don't know why it stopped working now.
Thanks! A bit strange that it's %appdata%\Roaming\Python\Python37\site-packages and not %appdata%\Roaming\Python\Python37\site-packages\vapoursynth ... :scared:
chipxtreme
24th August 2019, 09:51
Then you've most likely installed python only for the current user...
Install for all users is selected by default and I didn't unselect it.
Myrsloik
25th August 2019, 10:30
Optimized VSynth build for Expr: https://www.sendspace.com/file/xleugj
Benefits of Exprt build:
Higher framerate in Exprt-intensive scripts
Higher framerate in MaskTools-intensive scripts
Lower electricity bill
Lower CPU temperature
As a reminder: you need to replace vapoursynth.dll both in the installation path AND in the python module directory (where vapoursynth*.pyd is located)
Typically:
C:\Program Files\VapourSynth\core
AND
C:\Program Files\Python37\Lib\site-packages
Go test this so it can be included in the next official release. And test the MVToolz optimizations too.
lansing
26th August 2019, 21:27
Did the image reader plugin got removed in the newer version? I couldn't call it in vs editor.
Myrsloik
26th August 2019, 21:34
Did the image reader plugin got removed in the newer version? I couldn't call it in vs editor.
It's not included in the installer so maybe you don't have it...
lansing
26th August 2019, 21:54
It's not included in the installer so maybe you don't have it...
What package is it in now? The vs documentation still listed it as included plugin from the installer.
ChaosKing
27th August 2019, 10:19
Optimised VSynth build for Expr: https://www.sendspace.com/file/xleugj
Benefits of Exprt build:
Higher framerate in Exprt-intensive scripts
Higher framerate in MaskTools-intensive scripts
Lower electricity bill
Lower CPU temperature
Here are some numbers:
Tested like this
PS D:\> vspipe.exe -p -e 5000 D:\del.vpy .
on a Ryzen 2600, 16GB ram, DVD 720x480 clip
Vinverse seems to consist only of Expr+MakeDiff and therefore has the biggest speedup of ~22%
https://github.com/HomeOfVapourSynthEvolution/havsfunc/blob/master/havsfunc.py#L2375
import havsfunc as haf
clip=haf.DeHalo_alpha(clip)
clip=haf.FineDehalo(clip)
# new build
Output 5001 frames in 16.87 seconds (296.39 fps)
Output 5001 frames in 16.73 seconds (298.98 fps)
Output 5001 frames in 16.84 seconds (296.98 fps)
# old build
Output 5001 frames in 17.04 seconds (293.43 fps)
Output 5001 frames in 17.07 seconds (292.99 fps)
Output 5001 frames in 17.04 seconds (293.51 fps)
clip=haf.srestore(clip)
# new build
Output 5001 frames in 35.41 seconds (141.24 fps)
Output 5001 frames in 35.12 seconds (142.42 fps)
Output 5001 frames in 35.74 seconds (139.94 fps)
# old build
Output 5001 frames in 35.20 seconds (142.07 fps)
Output 5001 frames in 35.24 seconds (141.91 fps)
Output 5001 frames in 35.09 seconds (142.53 fps)
clip=haf.SmoothLevels(clip)
# new build
Output 5001 frames in 10.41 seconds (480.28 fps)
Output 5001 frames in 10.34 seconds (483.86 fps)
Output 5001 frames in 10.33 seconds (484.30 fps)
# old build
Output 5001 frames in 10.66 seconds (469.29 fps)
Output 5001 frames in 10.64 seconds (469.96 fps)
Output 5001 frames in 10.66 seconds (468.97 fps)
clip=haf.Vinverse2(clip)
# new build
Output 5001 frames in 5.12 seconds (977.57 fps)
Output 5001 frames in 5.17 seconds (967.26 fps)
Output 5001 frames in 5.13 seconds (974.39 fps)
# old build
Output 5001 frames in 5.85 seconds (855.08 fps)
Output 5001 frames in 5.86 seconds (853.31 fps)
Output 5001 frames in 5.86 seconds (853.19 fps)
lansing
27th August 2019, 17:13
I have notice a new problem with Python 3.7.4 installer that's affecting vs installer. When I'm doing a clean install, if I choose "install now" in python installer, the default installation path would be something like "users\username\appdata\roaming\...", and the default installation path for the vs installer would be "users\username\appdata\local\programs\vapoursynth". But if I choose "custom installation" in python installer, its installation path would be changed to "c:\program files\python37", and the vs installer would also be changed to "c:\program files\vapoursynth".
Selur
31st August 2019, 06:23
Is there an alternative to AutoAdjust for Vapoursynth?
Myrsloik
31st August 2019, 17:52
Is there an alternative to AutoAdjust for Vapoursynth?
Not that I know of. Avisynth compatiblity should work though.
Selur
31st August 2019, 18:21
Not that I know of. Avisynth compatiblity should work though.
Only on Windows, or should this also work on Linux and I simply don't know how to get it working?
feisty2
6th September 2019, 19:59
why is vsscript.dll required to be placed in the same folder with vspipe.exe for the new release?
Myrsloik
6th September 2019, 20:17
why is vsscript.dll required to be placed in the same folder with vspipe.exe for the new release?
I stopped putting a copy of vsscript.dll in the system directory in R46. Putting things into the system directory is bad.
Changing the vsscript api to match the style of the rest of vs so importing it becomes trivial is on my todo list and will fix it. Some day.
Jukus
10th September 2019, 15:56
Is there a detailed user guide? Of course, I am happy to use QTGMC and other plugins, but there is very little knowledge and information.
jackoneill
10th September 2019, 18:53
Is there a detailed user guide? Of course, I am happy to use QTGMC and other plugins, but there is very little knowledge and information.
There is some documentation: http://www.vapoursynth.com/doc/
Jukus
10th September 2019, 19:39
There is some documentation: http://www.vapoursynth.com/doc/
Thank you, I know. But I'm interested, for example, the sequence of applications of filters, I think it is not always obvious. Changing the brightness and color need before QTGMC or after, maybe there is no difference? And other nuances of video processing that I don't know about.
MeteorRain
10th September 2019, 23:18
That sounds a bit more than a guide, but more of lesson(s) (of being an encoder).
QTGMC is a deinterlacer so it always comes at early stage (probably after delogo, but that depends also.)
And to us, we never change brightness and color of a mastered work (e.g. when backing up bluray discs). But if it's your own recording, things can be a lot different.
stax76
12th September 2019, 04:09
I've been studying some tutorials at realpython.com and noticed the tutorial and vs code format code like so:
def foo(a=1, b=1):
foo(a=1, b=1)
In staxrip there is much avs/vs code that use spaces:
def foo(a = 1, b = 1):
foo(a = 1, b = 1)
What is more common? Is both OK or is one officially discouraged and what about AviSynth?
ChaosKing
12th September 2019, 08:29
This looks like the official style guide https://www.python.org/dev/peps/pep-0008/
Seems like def foo(a=1, b=1, ...) is recommended.
Myrsloik
12th September 2019, 08:51
I've been studying some tutorials at realpython.com and noticed the tutorial and vs code format code like so:
def foo(a=1, b=1):
foo(a=1, b=1)
In staxrip there is much avs/vs code that use spaces:
def foo(a = 1, b = 1):
foo(a = 1, b = 1)
What is more common? Is both OK or is one officially discouraged and what about AviSynth?
Use whatever you like as long as you're consistent.
aegisofrime
13th September 2019, 15:58
Gonna post this here as I don't think it deserves it's own thread, but what happen to Stephen R. Savage's post about his optimized MVTools?
Myrsloik
13th September 2019, 16:16
Gonna post this here as I don't think it deserves it's own thread, but what happen to Stephen R. Savage's post about his optimized MVTools?
It got merged into normal mvtools and will be in the next release.
ChaosKing
18th September 2019, 13:20
Does get_read_array() return only "video data" without "meta data or something"?
I was comparing different source filters (ffms2, d2vsource, lsmash, dgdecnv) and noticed something strange with VOB files. I save every hash in a list. If the video file passes the "seek-test" the hashes of every source filters should the same. This was the case with many files.
But for vob files the hashes differ with every source filter. Is there something special with VOB files? I mean they can only be decoded in "one correct" way, right? They look all ok in vsedit...
example log
Seek linear order (hash, PicType, n-Frame)
d653d648d8e6407e507c6eaa0116ebe5 I 0
30ad6c41b89dfd8880a12bde6952e7b2 B 1
5e0cb8bad4ba2ec37b4f4db0d4a65691 P 2
...
#from seek-test.py
def hash_frame(frame):
md5 = hashlib.md5()
for plane in range(frame.format.num_planes):
for line in frame.get_read_array(plane):
md5.update(line)
return md5.hexdigest()
Myrsloik
18th September 2019, 13:47
Does get_read_array() return only "video data" without "meta data or something"?
I was comparing different source filters (ffms2, d2vsource, lsmash, dgdecnv) and noticed something strange with VOB files. I save every hash in a list. If the video file passes the "seek-test" the hashes of every source filters should the same. This was the case with many files.
But for vob files the hashes differ with every source filter. Is there something special with VOB files? I mean they can only be decoded in "one correct" way, right? They look all ok in vsedit...
example log
Seek linear order (hash, PicType, n-Frame)
d653d648d8e6407e507c6eaa0116ebe5 I 0
30ad6c41b89dfd8880a12bde6952e7b2 B 1
5e0cb8bad4ba2ec37b4f4db0d4a65691 P 2
...
#from seek-test.py
def hash_frame(frame):
md5 = hashlib.md5()
for plane in range(frame.format.num_planes):
for line in frame.get_read_array(plane):
md5.update(line)
return md5.hexdigest()
It's not strange at all. It wasn't until h.264 the standard required (or even specified for that matter) how the DCT transforms should be done in a bit exact manner.
ChaosKing
18th September 2019, 13:54
It's not strange at all. It wasn't until h.264 the standard required (or even specified for that matter) how the DCT transforms should be done in a bit exact manner.
Aha, ok good to know. :thanks:
Jukus
18th September 2019, 14:17
What is the difference between ffms2 and lsmas?
I already realized that for mpeg 2 need to use only d2v.
ChaosKing
18th September 2019, 15:31
What is the difference between ffms2 and lsmas?
I already realized that for mpeg 2 need to use only d2v.
Both are based on ffmpeg. In addition lsmash has GPU support and can open MP4, MOV, ISO Base Media without creating an extra index.
From experience I would say lsmash is more often frame accurate then ffms2.
Jukus
18th September 2019, 22:13
How to specify the path to create the index file for ffms2 and lsmas? That is, if I mount the ISO, then I can not write anything in the same directory.
ChaosKing
18th September 2019, 22:43
How to specify the path to create the index file for ffms2 and lsmas? That is, if I mount the ISO, then I can not write anything in the same directory.
It's all explained in the readme https://github.com/FFMS/ffms2/blob/master/doc/ffms2-vapoursynth.md#source
ffms2.Source("video.mp4", cachefile="video.mp4.ffindex")
I think lsmash does not support a custom cache file path.
EDIT
Seems to be supported https://github.com/HolyWu/L-SMASH-Works/tree/master/VapourSynth
cachefile (default : source + ".lwi")
The filename of the index file (where the indexing data is saved).
Jukus
19th September 2019, 19:36
@ChaosKing
Unfortunately, it’s still not clear how this should work, can a specific example be provided?
ChaosKing
19th September 2019, 19:41
@ChaosKing
Unfortunately, it’s still not clear how this should work, can a specific example be provided?
import vapoursynth as vs
core = vs.core
clip = core.lsmas.LWLibavSource(source=r"D:\video.mkv", cachefile=r"C:\folderxy\myCacheFile.iwi")
clip.set_output()
Jukus
19th September 2019, 19:47
@ChaosKing
vapoursynth.Error: LWLibavSource: Function does not take argument(s) named cachefile
ChaosKing
19th September 2019, 19:56
@ChaosKing
Use this version https://github.com/HolyWu/L-SMASH-Works/releases
Jukus
19th September 2019, 20:19
Use this version https://github.com/HolyWu/L-SMASH-Works/releases
Ok, thanks. But is it possible to make an index without Vapour, as it is done for d2v?
ChaosKing
19th September 2019, 20:29
Ok, thanks. But is it possible to make an index without Vapour, as it is done for d2v?
Only ffms2 has an indexer: ffmsindex.exe
Latest version: https://forum.doom9.org/showthread.php?p=1883905#post1883905
Jukus
19th September 2019, 20:56
Also, can create a label file. Only now I thought of it :) But not a very elegant solution, yes.
LigH
23rd September 2019, 07:48
List of all known plugins and scripts (http://www.vapoursynth.com/doc/pluginlist.html)
contains a link to VirtualDub1 a.k.a. VirtualDub2 :rolleyes:
Another link to be updated: https://github.com/woshin/hnwvsfunc
ChaosKing
23rd September 2019, 08:39
contains a link to VirtualDub1 a.k.a. VirtualDub2 :rolleyes:
Another link to be updated: https://github.com/woshin/hnwvsfunc
hnwvsfunc is dead, use: https://github.com/Helenerineium/G41Fun
patxitron
28th September 2019, 15:13
Hello.
I'm trying to compile vapoursynth in ubuntu 18.04. First I installed development packages for libav*, iconv, pango, freetype, fonconfig, tesseract and another libraries. I downloaded, compiled and installed zimg v2.9 branch and ImageMagick 7. Then when compiling vapoursynth I get this error:
CXXLD libvapoursynth.la
/usr/bin/ld: ./.libs/libexprfilter.a(libexprfilter_la-exprfilter.o): relocation R_X86_64_PC32 against undefined symbol `_ZN12_GLOBAL__N_115ExprCompiler1289constDataE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
Makefile:1166: recipe for target 'libvapoursynth.la' failed
make: *** [libvapoursynth.la] Error 1
What am I doing wrong?
Thank you.
I've tried passing --enable-shared --disable-static --with-pic to configure without success.
The configure output is:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for _LARGEFILE_SOURCE value needed for large files... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for ZIMG... yes
checking for library containing dlopen... -ldl
checking for sched_getaffinity... yes
checking for cpuset_getaffinity... no
checking for a Python interpreter with version >= 3... python3
checking for python3... /usr/bin/python3
checking for python3 version... 3.6
checking for python3 platform... linux
checking for python3 script directory... ${prefix}/lib/python3.6/site-packages
checking for python3 extension module directory... ${exec_prefix}/lib/python3.6/site-packages
checking for PYTHON3... yes
checking for cython3... cython3
checking iconv.h usability... yes
checking iconv.h presence... yes
checking for iconv.h... yes
checking for library containing libiconv_open... no
checking for library containing iconv_open... none required
checking for LIBASS... yes
checking for FFMPEG... yes
checking for IMAGEMAGICK... yes
checking whether imagemagick is usable... yes
checking for TESSERACT... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating pc/vapoursynth.pc
config.status: creating pc/vapoursynth-script.pc
config.status: creating Makefile
config.status: executing depfiles commands
config.status: executing libtool commands
Are_
28th September 2019, 18:38
Autotools build system is broken in current master, use 47.2 release for now.
EDIT: Now that I remember, the you only need to pass -std=c++17 to your CXXFLAGS to make it compile.
patxitron
29th September 2019, 10:02
Now that I remember, the you only need to pass -std=c++17 to your CXXFLAGS to make it compile.
This worked! Thank you. however now it fails in another point:
CYTHON src/cython/vapoursynth.c
Error compiling Cython file:
------------------------------------------------------------
...
# If we are not using VSScript, do nothing.
if self.single:
return
_environment_state.current = _env_current_stack().pop()
def __eq__(self, other):
^
------------------------------------------------------------
src/cython/vapoursynth.pyx:133:4: Special method __eq__ must be implemented via __richcmp__
Error compiling Cython file:
------------------------------------------------------------
...
core = kwargs.pop("core", None) or get_core()
vals = self._as_dict()
vals.update(**kwargs)
return core.register_format(**vals)
def __eq__(self, other):
^
------------------------------------------------------------
src/cython/vapoursynth.pyx:710:4: Special method __eq__ must be implemented via __richcmp__
Makefile:2217: recipe for target 'src/cython/vapoursynth.c' failed
make: *** [src/cython/vapoursynth.c] Error 1
EDIT: I solved it changing:
def __eq__(self, other):
{BODY}
by
def __richcmp__(self, other, op):
if op == 2:
{BODY}
else:
err_msg = "op {0} isn't implemented yet".format(op)
raise NotImplementedError(err_msg)
as the error message suggest.
qyot27
29th September 2019, 17:55
http://vapoursynth.com/doc/installation.html#linux-and-os-x-compilation-instructions:
Cython 0.28 or later installed in your Python 3 environment
https://packages.ubuntu.com/bionic/cython:
Package: cython (0.26.1-0.4) [universe]
That is your problem. Update Cython. Or just scroll up a little bit where VapourSynth is now available directly through pip.
poisondeathray
2nd October 2019, 15:34
MaskedMerge bug in R47 ?
Overlay issue
See post 486 and the replies. Works in R46
https://forum.doom9.org/showpost.php?p=1886331&postcount=486
https://forum.doom9.org/showthread.php?p=1886366
Myrsloik
2nd October 2019, 17:16
MaskedMerge bug in R47 ?
Overlay issue
See post 486 and the replies. Works in R46
https://forum.doom9.org/showpost.php?p=1886331&postcount=486
https://forum.doom9.org/showthread.php?p=1886366
Did you try R47.2?
poisondeathray
2nd October 2019, 17:25
Did you try R47.2?
Yes, same problem. That's actually the one I was using, but I tried R47.0 too . So it suggests something introduced between R46 to R47.0 that is causing it
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.