Closed v-fox closed 5 years ago
[vapoursynth] Could not initialize VapourSynth scripting.
This error message is actually produced by VapourSynth, but not mpv. Check your VapourSynth installation, and python. A quick google search (just search Could not initialize VapourSynth scripting
) tells me that you may need to properly set PYTHONPATH
environment variable.
Does vspipe -v
work on command line? If not, then VS is not correctly set up.
This error message is actually produced by VapourSynth, but not mpv. Check your VapourSynth installation, and python. A quick google search (just search
Could not initialize VapourSynth scripting
) tells me that you may need to properly setPYTHONPATH
environment variable.
@zc62 But why would it suddenly do so on mpv's update when it worked perfectly for months without any changes ? Since when python scripts need to set any envvars under Linux ? mpv clearly does not launch vs right anymore.
What exactly am I supposed to check and what is "python and VapourSynth installation" in rpm & zypper terms ? I have:
/usr/lib64/libvapoursynth-47.so (with which mpv is linked)
/usr/lib64/libvapoursynth-script.so.0
/usr/lib64/vapoursynth/libmvtools.so
python 2 (default) & 3 (mpv is linked with /usr/lib64/libpython3.7m.so.1.0)
Launching env PYTHON=/usr/bin/python3.7 PYTHONPATH=/usr/lib/python3.7 mpv
does not seem to change anything.
Does
vspipe -v
work on command line? If not, then VS is not correctly set up.
@Argon- Indeed :( At first it given "not found" error because openSUSE maintainers have put it as separate package without adding it as dependency. However, just installing vspipe ended up with 'Failed to initialize VapourSynth environment'. There is seem to be no more relevant packages and installing vapoursynth-devel did not help. I'm stumped.
Together with mpv's update, vs has updated from 46 to 47 but I'm sure that package itself did not change.
Good news: once vspipe works mpv should too. Bad news: no idea what's wrong. In my case it usually was a pythonpath related problem.
Good news: once vspipe works mpv should too. Bad news: no idea what's wrong. In my case it usually was a pythonpath related problem.
Weird. strace vspipe -v
ends up with:
…
openat(AT_FDCWD, "/usr/lib64/python3.7/typing.py", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=54602, ...}) = 0
lseek(3, 0, SEEK_CUR) = 0
fstat(3, {st_mode=S_IFREG|0644, st_size=54602, ...}) = 0
read(3, "\"\"\"\nThe typing module: Support f"..., 54603) = 54602
read(3, "", 1) = 0
close(3) = 0
mmap(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6880380000
futex(0x7f68811d60ec, FUTEX_WAKE_PRIVATE, 2147483647) = 0
write(2, "Failed to initialize VapourSynth"..., 45Failed to initialize VapourSynth environment
) = 45
exit_group(1) = ?
+++ exited with 1 +++
So it finds and loads python3.7 without specifying anything but then decides to die in the middle of it. But its /usr/lib64/python3.7 with 64 suffix, in non-suffixed only files of some packages reside. There is /usr/lib64/python3.7/site-packages/vapoursynth.so. But explicitly launching env PYTHON=/usr/bin/python3.7 PYTHONPATH=/usr/lib64/python3.7 vspipe -v
does not change anything either. Maybe upstream bug ? Does VS-47 works for you ?
So, I've made custom updated package of VS-47.2 and it works now. Seems like upstream bug. Would have never thought, judging by mpv's messages. Thanks for the hints !
mpv version and platform
mpv 0.30.0+git.1567376743.6d90517275 Copyright © 2000-2019 mpv/MPlayer/mplayer2 projects built on Sep 2 2019 ffmpeg library versions: libavutil 56.31.100 libavcodec 58.54.100 libavformat 58.29.100 libswscale 5.5.100 libavfilter 7.57.100 libswresample 3.5.100 ffmpeg version: 4.2 openSUSE Tumbleweed If you're not using git master or the latest release, update. Releases are listed here: https://github.com/mpv-player/mpv/releases
Reproduction steps
Expected behavior
work
Actual behavior
resulting in complete fail or
resulting in playback without vapoursynth
Log file
https://0x0.st/z4na.log
Sample files
try any