View Full Version : VapourSynth Editor
Pages :
1
2
3
4
5
6
7
8
9
10
11
[
12]
13
14
15
16
Selur
26th August 2019, 17:44
I now installed Python and Vapoursynth for all users and now the behavior is different,...
no clue what changed, going back to R45
I'll report back once I'm sure what happens exactly.
Selur
27th August 2019, 16:23
replacing:
setMessageHandler(::vsMessageHandler, (void *)(this));
with
addMessageHandler(::vsMessageHandler, nullptr, (void *)(this));
in vsViewer/vsedit seems to fix the issue for me. (haven't seem any problems with this so far)
-> without searching through the Vapoursynth source code, my guess is that:
Deprecated as of API 3.6 (VapourSynth R47) source: http://www.vapoursynth.com/doc/api/vapoursynth.h.html#setmessagehandler
should better be replaced with 'Broken as of API 3.6 (VapourSynth R47)', since 'deprecated' usually means that old code using the method would still work, which isn't the case.
Cu Selur
Myrsloik
27th August 2019, 17:12
replacing:
setMessageHandler(::vsMessageHandler, (void *)(this));
with
addMessageHandler(::vsMessageHandler, nullptr, (void *)(this));
in vsViewer/vsedit seems to fix the issue for me. (haven't seem any problems with this so far)
-> without searching through the Vapoursynth source code, my guess is that:
source: http://www.vapoursynth.com/doc/api/vapoursynth.h.html#setmessagehandler
should better be replaced with 'Broken as of API 3.6 (VapourSynth R47)', since 'deprecated' usually means that old code using the method would still work, which isn't the case.
Cu Selur
setMessageHandler should still work, I believe I even tested it with vsedit
Myrsloik
6th September 2019, 22:27
Tested and verified to work AGAIN! I really have no idea why you think it's not working.
PRAGMA
9th September 2019, 12:59
https://i.imgur.com/d6Fv6Ok.png
Im having this really weird issue, the source is a mkv mpeg2 from a DVD exported via MakeMKV.
Its glitchy and always this gray blocky kind of glitchy. It happens almost every time I first open the previewer, then happens occasionally when I seek around.
Source is d2v, which was created using Inviska to extract the mpg and d2vwitch to create a d2v of the mpg.
My OS is arch linux.
VapourSynth Package List (installed via yay, sourced from Arch Linux AUR):
vapoursynth R47.2-1
vapoursynth-editor R19-1
vapoursynth-plugin-d2vsource-git v1.2.0.g4535f7c-1
vapoursynth-plugin-fluxsmooth-git v2.1.gf1c22a4-1
vapoursynth-plugin-fmtconv-git r20.0.g394a360-1
vapoursynth-plugin-hqdn3d-git r10.eb820cb-1
vapoursynth-plugin-knlmeanscl-git 1.1.1.r551.fbb60ec-1
vapoursynth-plugin-nnedi3-git v12.0.g8c35822-1
vapoursynth-plugin-nnedi3cl-git r7.3.3.g9e7dead-1
vapoursynth-plugin-sangnom-git r41.1.g44b0341-1
vapoursynth-plugin-ttempsmooth-git r3.1.1.g776e140-1
vapoursynth-plugin-znedi3-git r1.9.gacb7cc3-1
Turned out to be a bug with d2vwitch:
https://github.com/dubhater/D2VWitch/issues/4
l33tmeatwad
9th September 2019, 15:05
Turned out to be a bug with d2vwitch:
https://github.com/dubhater/D2VWitch/issues/4
While it would be nice if they get that working, it's best to index the original VOB instead. You can get the VOB off the disc using the stream option (the fourth icon at the top left after the disc scan is complete).
lansing
5th October 2019, 23:32
I played around with it a little, the design seem pretty neat, it's good to have handy functions as a buttons.
A few requests I can think of right now, can you add a bookmark function on the timeline, as well as a live feedback of the color value of the pixel where the mouse cursor points to. And the font size on the timeline is too small. The seeking cursor is too small too.
The eyedropper is there, just click on the eyedropper icon on the right of the preview window.
The timeline sure need a total rework. I tried changing it to scroll bar last year in my fork, but the user experience was still not good, it still didn't really solve any difficulty I have had with it.
The proper timeline should look something like the one from Adobe Premiere, a zoomable timeline that solves every seeking and viewing issue.
poisondeathray
5th October 2019, 23:51
@lansing - it's a bot that copies & pastes from previous posts , then eventually posts the advertisement
https://forum.doom9.org/showthread.php?p=1886670#post1886670
lansing
6th October 2019, 05:41
@lansing - it's a bot that copies & pastes from previous posts , then eventually posts the advertisement
https://forum.doom9.org/showthread.php?p=1886670#post1886670
Ok I see, he posted 3 posts in 1 minute
tebasuna51
6th October 2019, 11:35
weitiks banned.
PRAGMA
16th October 2019, 20:42
How does one print debugging messages into the Log window?
`logging` module never prints anything regardless of level.
_Al_
17th October 2019, 01:18
I use couple of methods , maybe there is something within vsedit to allow it, someone might add something, or you can do couple of workarounds:
First workaround, you name your script as *.py and instead of clip.set_output() (although you can leave it there in your script), you add:
for frame in range(0, len(clip)):
clip.get_frame(frame)
this will just make quick request for frames and script will go thru, much faster then actual previewing. You can request a specific frames , one frame or different range. You do not use vsedit, but your favorite python console.
So you do not use vsedit at all
SECOND, you can use *.py and code your previewer, it is not that difficult as you'd think, you just need to pick up a modul - openCV, PIL (using with tkinter) or PyQt (Qt in python). I use openCV or PyQt. vsedit uses Qt.
THIRD, you re-direct sys.stdout.
I use openCV and this script: outputwindow.py. All you do is just import it in your vapoursynth scrip:
import outputwindow
and your print (sys.stdout) is automatically redirected to extra tkinter GUI window. I found it a while ago on web and adjusted some lines so it even works with vsedit. So this is most comfortable method I guess.
#Python 3
"""
named errorwindow originally
Import this module into graphical Python apps to provide a
sys.stderr. No functions to call, just import it. It uses
only facilities in the Python standard distribution.
If nothing is ever written to stderr, then the module just
sits there and stays out of your face. Upon write to stderr,
it launches a new process, piping it error stream. The new
process throws up a window showing the error messages.
Code derived from Bryan Olson's source posted in this related Usenet discussion:
https://groups.google.com/d/msg/comp.lang.python/HWPhLhXKUos/TpFeWxEE9nsJ
https://groups.google.com/d/msg/comp.lang.python/HWPhLhXKUos/eEHYAl4dH9YJ
martineau - Modified to use subprocess.Popen instead of the os.popen
which has been deprecated since Py 2.6. Changed so it
redirects both stdout and stderr. Also inserted double quotes around paths
in case they have embedded space characters in them, as
they did on my Windows system.
to use it with Preview() for openCV player:
-changed subprocess.Popen command to list instead of string , so it works under linux
-added exception to catch window canceled by user and deleting pipe, so new GUI is automatically constructed again if needed,
-added st.ScrolledText instead of Text
-made sure that subprocess.Popen executable is python executable (or pythonw under windows),
under windows, running it from Mystery Keeper's vsedit, sys.executable returned 'vsedit',
"""
import subprocess
import sys
import _thread as thread
import os
ERROR_FILENAME_LOG = 'error_printing_to_gui.txt'
if __name__ == '__main__': # When spawned as separate process.
# create window in which to display output
# then copy stdin to the window until EOF
# will happen when output is sent to each OutputPipe created
import tkinter as tk
import tkinter.scrolledtext as st
from tkinter import BOTH, END, Frame, TOP, YES
import tkinter.font as tkFont
import queue as Queue
Q_EMPTY = Queue.Empty # An exception class.
queue = Queue.Queue(1000) # FIFO, first put first get
def read_stdin(app, bufsize=4096):
while True:
queue.put(os.read(sys.stdin.fileno(), bufsize))
class Application(Frame):
def __init__(self, master, font_size=10, family='Courier', text_color='#0000AA', rows=25, cols=128):
super().__init__(master)
self.master = master
if len(sys.argv) < 2:
title = "Output stream from unknown source"
elif len(sys.argv) < 3:
title = "Output stream from {}".format(sys.argv[1])
else: # Assume it's a least 3.
title = "Output stream '{}' from {}".format(sys.argv[2], sys.argv[1])
self.master.title(title)
self.pack(fill=BOTH, expand=YES)
font = tkFont.Font(family=family, size=font_size)
width = font.measure(' ' * (cols+1))
height = font.metrics('linespace') * (rows+1)
self.configure(width=width, height=height)
self.pack_propagate(0) # Force frame to be configured size.
self.logwidget = st.ScrolledText(self, font=font)
self.logwidget.pack(side=TOP, fill=BOTH, expand=YES)
self.logwidget.configure(foreground=text_color)
self.after(200, self.start_thread, ()) # Start polling thread.
def start_thread(self, _):
thread.start_new_thread(read_stdin, (self,))
self.after(200, self.check_q, ())
def check_q(self, _):
go = True
while go:
try:
data = queue.get_nowait().decode()
if not data:
data = '[EOF]'
go = False
self.logwidget.insert(END, data)
self.logwidget.see(END)
except Q_EMPTY:
self.after(200, self.check_q, ())
go = False
root = tk.Tk(baseName='whatever_name')
app = Application(master=root)
app.mainloop()
else: # when module is first imported
import traceback
class OutputPipe(object):
def __init__(self, name=''):
self.lock = thread.allocate_lock()
self.name = name
def flush(self): # NO-OP.
pass
def __getattr__(self, attr):
if attr == 'pipe': # Attribute doesn't exist, so create it.
# Launch this module as a separate process to display any output it receives
executable = sys.executable
try:
basename = os.path.basename(executable)
name, _ = os.path.splitext(basename)
if not name.lower().startswith('python'):
executable = self.get_executable()
except:
executable = self.get_executable()
argv1 = __file__
try:
argv2 = os.path.basename(sys.argv[0])
except:
argv2 = ''
argv3 = self.name
command = [executable]
for arg in [argv1, argv2, argv3]:
if arg:
command.append(arg)
try:
# Had to also make stdout and stderr PIPEs too, to work with pythonw.exe
self.pipe = subprocess.Popen(command,
bufsize=0,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE).stdin
except Exception:
# Output exception info to a file since this module isn't working.
exc_type, exc_value, exc_traceback = sys.exc_info()
msg = '{} exception in {}\n'.format(exc_type.__name__, os.path.basename(__file__))
with open(ERROR_FILENAME_LOG, 'wt') as info:
info.write('fatal error occurred spawning output process')
info.write('exeception info:' + msg)
traceback.print_exc(file=info)
sys.exit('fatal error occurred')
return super(OutputPipe, self).__getattribute__(attr)
def get_executable(self):
#if running this within vsedit under windows sys.executable name is 'vsedit'
return 'pythonw'
def write(self, data):
with self.lock:
try:
data = data.encode()
self.pipe.write(data) # First reference to pipe attr will cause an
# OutputPipe process for the stream to be created.
except Exception:
#gui was canceled by user, piping would cause error
#pipe attr can be deleted so new is constructed with __getattr__() and therefore new GUI pops up if needed
del self.pipe
#pass
try:
os.remove(EXC_INFO_FILENAME) # Delete previous file, if any.
except Exception:
pass
# Redirect standard output streams in the process that imported this module.
sys.stderr = OutputPipe('stderr')
sys.stdout = OutputPipe('stdout')
PRAGMA
17th October 2019, 16:02
I use couple of methods , maybe there is something within vsedit to allow it, someone might add something, or you can do couple of workarounds:
First workaround, you name your script as *.py and instead of clip.set_output() (although you can leave it there in your script), you add:
for frame in range(0, len(clip)):
clip.get_frame(frame)
this will just make quick request for frames and script will go thru, much faster then actual previewing. You can request a specific frames , one frame or different range. You do not use vsedit, but your favorite python console.
So you do not use vsedit at all
SECOND, you can use *.py and code your previewer, it is not that difficult as you'd think, you just need to pick up a modul - openCV, PIL (using with tkinter) or PyQt (Qt in python). I use openCV or PyQt. vsedit uses Qt.
THIRD, you re-direct sys.stdout.
I use openCV and this script: outputwindow.py. All you do is just import it in your vapoursynth scrip:
import outputwindow
and your print (sys.stdout) is automatically redirected to extra tkinter GUI window. I found it a while ago on web and adjusted some lines so it even works with vsedit. So this is most comfortable method I guess.
#Python 3
"""
named errorwindow originally
Import this module into graphical Python apps to provide a
sys.stderr. No functions to call, just import it. It uses
only facilities in the Python standard distribution.
If nothing is ever written to stderr, then the module just
sits there and stays out of your face. Upon write to stderr,
it launches a new process, piping it error stream. The new
process throws up a window showing the error messages.
Code derived from Bryan Olson's source posted in this related Usenet discussion:
https://groups.google.com/d/msg/comp.lang.python/HWPhLhXKUos/TpFeWxEE9nsJ
https://groups.google.com/d/msg/comp.lang.python/HWPhLhXKUos/eEHYAl4dH9YJ
martineau - Modified to use subprocess.Popen instead of the os.popen
which has been deprecated since Py 2.6. Changed so it
redirects both stdout and stderr. Also inserted double quotes around paths
in case they have embedded space characters in them, as
they did on my Windows system.
to use it with Preview() for openCV player:
-changed subprocess.Popen command to list instead of string , so it works under linux
-added exception to catch window canceled by user and deleting pipe, so new GUI is automatically constructed again if needed,
-added st.ScrolledText instead of Text
-made sure that subprocess.Popen executable is python executable (or pythonw under windows),
under windows, running it from Mystery Keeper's vsedit, sys.executable returned 'vsedit',
"""
import subprocess
import sys
import _thread as thread
import os
ERROR_FILENAME_LOG = 'error_printing_to_gui.txt'
if __name__ == '__main__': # When spawned as separate process.
# create window in which to display output
# then copy stdin to the window until EOF
# will happen when output is sent to each OutputPipe created
import tkinter as tk
import tkinter.scrolledtext as st
from tkinter import BOTH, END, Frame, TOP, YES
import tkinter.font as tkFont
import queue as Queue
Q_EMPTY = Queue.Empty # An exception class.
queue = Queue.Queue(1000) # FIFO, first put first get
def read_stdin(app, bufsize=4096):
while True:
queue.put(os.read(sys.stdin.fileno(), bufsize))
class Application(Frame):
def __init__(self, master, font_size=10, family='Courier', text_color='#0000AA', rows=25, cols=128):
super().__init__(master)
self.master = master
if len(sys.argv) < 2:
title = "Output stream from unknown source"
elif len(sys.argv) < 3:
title = "Output stream from {}".format(sys.argv[1])
else: # Assume it's a least 3.
title = "Output stream '{}' from {}".format(sys.argv[2], sys.argv[1])
self.master.title(title)
self.pack(fill=BOTH, expand=YES)
font = tkFont.Font(family=family, size=font_size)
width = font.measure(' ' * (cols+1))
height = font.metrics('linespace') * (rows+1)
self.configure(width=width, height=height)
self.pack_propagate(0) # Force frame to be configured size.
self.logwidget = st.ScrolledText(self, font=font)
self.logwidget.pack(side=TOP, fill=BOTH, expand=YES)
self.logwidget.configure(foreground=text_color)
self.after(200, self.start_thread, ()) # Start polling thread.
def start_thread(self, _):
thread.start_new_thread(read_stdin, (self,))
self.after(200, self.check_q, ())
def check_q(self, _):
go = True
while go:
try:
data = queue.get_nowait().decode()
if not data:
data = '[EOF]'
go = False
self.logwidget.insert(END, data)
self.logwidget.see(END)
except Q_EMPTY:
self.after(200, self.check_q, ())
go = False
root = tk.Tk(baseName='whatever_name')
app = Application(master=root)
app.mainloop()
else: # when module is first imported
import traceback
class OutputPipe(object):
def __init__(self, name=''):
self.lock = thread.allocate_lock()
self.name = name
def flush(self): # NO-OP.
pass
def __getattr__(self, attr):
if attr == 'pipe': # Attribute doesn't exist, so create it.
# Launch this module as a separate process to display any output it receives
executable = sys.executable
try:
basename = os.path.basename(executable)
name, _ = os.path.splitext(basename)
if not name.lower().startswith('python'):
executable = self.get_executable()
except:
executable = self.get_executable()
argv1 = __file__
try:
argv2 = os.path.basename(sys.argv[0])
except:
argv2 = ''
argv3 = self.name
command = [executable]
for arg in [argv1, argv2, argv3]:
if arg:
command.append(arg)
try:
# Had to also make stdout and stderr PIPEs too, to work with pythonw.exe
self.pipe = subprocess.Popen(command,
bufsize=0,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE).stdin
except Exception:
# Output exception info to a file since this module isn't working.
exc_type, exc_value, exc_traceback = sys.exc_info()
msg = '{} exception in {}\n'.format(exc_type.__name__, os.path.basename(__file__))
with open(ERROR_FILENAME_LOG, 'wt') as info:
info.write('fatal error occurred spawning output process')
info.write('exeception info:' + msg)
traceback.print_exc(file=info)
sys.exit('fatal error occurred')
return super(OutputPipe, self).__getattribute__(attr)
def get_executable(self):
#if running this within vsedit under windows sys.executable name is 'vsedit'
return 'pythonw'
def write(self, data):
with self.lock:
try:
data = data.encode()
self.pipe.write(data) # First reference to pipe attr will cause an
# OutputPipe process for the stream to be created.
except Exception:
#gui was canceled by user, piping would cause error
#pipe attr can be deleted so new is constructed with __getattr__() and therefore new GUI pops up if needed
del self.pipe
#pass
try:
os.remove(EXC_INFO_FILENAME) # Delete previous file, if any.
except Exception:
pass
# Redirect standard output streams in the process that imported this module.
sys.stderr = OutputPipe('stderr')
sys.stdout = OutputPipe('stdout')
I cant get this to work on my end, when I do import outputwindow and then print("Test", file=sys.stdout) or stderror, nothing at all happens.
_Al_
17th October 2019, 18:50
that outputwindow.py takes care of it all, there is only import of that script needed and then just using print(), no arguments needed
from vapoursynth import core
import outputwindow
clip = core.std.BlankClip()
print('width for that blank clip is:', clip.width)
PRAGMA
21st October 2019, 12:40
that outputwindow.py takes care of it all, there is only import of that script needed and then just using print(), no arguments needed
from vapoursynth import core
import outputwindow
clip = core.std.BlankClip()
print('width for that blank clip is:', clip.width)
Yeah when I use that even, it doesn't work, it literally does nothing, no errors or anything.
Im on KDE Plasma (Linux), perhaps there's something to do with that?
_Al_
21st October 2019, 16:11
Possible, I tested it on Win7 and Ubuntu 18.04 though.
If pipe is not created it should write error into "error_printing_to_gui.txt".
I'd check it with just some simple *.py file first, like example above, not using vsedit. Then you can go further and try to write all variables into that error txt log as well thru out that outputwindow.py like for example for executable variable:
with open(ERROR_FILENAME_LOG, 'a') as info:
info.write('sys.executable:')
info.write(executable) #executable should be 'python' or 'pythonw' for windows
etc, because this is the only way to find out values when sys.stdout is redirected, or try to get rid of that:
sys.stderr = OutputPipe('stderr')
at the end of outputwindow script, it might start print errors into python consol, IDLE etc.
edit: corrected 'wt' into 'a' so it just adds to log
PRAGMA
21st October 2019, 17:39
Possible, I tested it on Win7 and Ubuntu 18.04 though.
If pipe is not created it should write error into "error_printing_to_gui.txt".
I'd check it with just some simple *.py file first, like example above, not using vsedit. Then you can go further and try to write all variables into that error txt log as well thru out that outputwindow.py like for example for executable variable:
with open(ERROR_FILENAME_LOG, 'a') as info:
info.write('sys.executable:')
info.write(executable) #executable should be 'python' or 'pythonw' for windows
etc, because this is the only way to find out values when sys.stdout is redirected, or try to get rid of that:
sys.stderr = OutputPipe('stderr')
at the end of outputwindow script, it might start print errors into python consol, IDLE etc.
edit: corrected 'wt' into 'a' so it just adds to log
No idea why, but it only works if its not in the site-packages directory and loaded elsewhere, I got it working by doing the following inside VS-Editor script:
sys.path.append(os.path.dirname(os.path.realpath(__file__)))
import outputwindow
Which will add the directory of the vpy file to temporary PATH, allowing it to import outputwindow.py if I put it next to my vpy script.
Thanks a ton!
Wish there was a built in way to do this.
P.S. I was doing raise Exception("BlaBla") as a logger but of course it would end the script so it wasnt perfect. Is there perhaps a way we can figure out how raise Exception works and just pony up a similar thing except raise Log("Msg") that doesnt exit()?
_Al_
21st October 2019, 18:59
I'm so sorry, I forgot about that already, adding that dir to sys.path, I'm not using vsedit now. vsedit needed that. If importing it just from some other *.py running script it was fine having that in site-packages dir.
That outputwindow.py works with any python app so it is usable elsewhere. Printing, sys.stdout.write(str(some value)) or just print(...), into tkinter gui, which is python standard library. And even that app crashes that windows stays on to report error.
lansing
9th November 2019, 08:09
I'm trying to build the project in Qt Creator in Windows 10 and I'm getting the error "vapoursynth/VapourSynth.h file not found" from the #include lines. It worked without a problem the last time I ran it in Windows 7. Had the path changed?
Selur
9th November 2019, 09:13
You probably need to adjust
INCLUDEPATH += 'C:/Program Files (x86)/VapourSynth/sdk/include/'
to match where Vapoursynth is located on your system.
lansing
9th November 2019, 14:53
You probably need to adjust
INCLUDEPATH += 'C:/Program Files (x86)/VapourSynth/sdk/include/'
to match where Vapoursynth is located on your system.
Looks like the vs installation path did changed. I have the 64 bit version, before, the 64 bit version was stuffed inside "c:/program files(x86)/" folder, now it's in "c:/program files/".
In the vsedit.pro file, I tried changing the INCLUDEPATH under the win32{}, but it still reporting file not found.
Selur
9th November 2019, 22:31
You did:
1. edit the .pro file
2. Build->Run qmake
3. Build->Rebuild All
if you skipped the second step the changes of the .pro file might not have any effect. :)
lansing
10th November 2019, 00:10
You did:
1. edit the .pro file
2. Build->Run qmake
3. Build->Rebuild All
if you skipped the second step the changes of the .pro file might not have any effect. :)
I tried that too, still not working.
Here's what I did:
- Opened the pro.pro file in Qt
- Under "projects" tab, set the "Desktop Qt 5.13.1 MingGW 64-bit" compiler as default
- Modified the "includepath" line in vsedit.pro to:
win32 {
QT += winextras
INCLUDEPATH += 'C:/Program Files/VapourSynth/sdk/include/'
- go build->run qmake
- go build->rebuild all
The problem still persist. It still complains about the vapoursynth.h file not found.
lansing
10th November 2019, 05:25
Okay I finally figured out the problem. I need to modify the other two .pro files in the project that has this includepath line, since I'm rebuilding all of them.
Jukus
14th November 2019, 17:45
When I use for preview:
haf.QTGMC(clip, Preset='Very Slow', Sharpness=0.8, FPSDivisor=1, TFF=True)
clip = core.std.Crop(clip, 0, 0, 2, 0)
That’s all right.
But when I use:
haf.QTGMC(clip, Preset='Very Slow', Sharpness=0.3, FPSDivisor=1, SourceMatch=3, Lossless=2, MatchEnhance=0.75, TFF=True)
clip = core.std.Crop(clip, 0, 0, 2, 0)
Then I get the error:
Error on frame 0 request:
Resize error 1027: image dimensions must be divisible by subsampling factor
Selur
16th November 2019, 16:50
seems to me like you are missing a 'clip = ' before the 'haf.QTGMC' part :)
Jukus
16th November 2019, 17:18
seems to me like you are missing a 'clip = ' before the 'haf.QTGMC' part :)
No, I just did not copy it into the message.
Selur
17th November 2019, 11:16
Seems related to 'Lossless' using Lossless=0 removes the error.
Selur
17th November 2019, 13:03
It does, still this should be properly handled in QTGMC itself.
Tohno_Neil
23rd November 2019, 00:56
I installed vapoursynth version 46 the x64 bit on windows 10 pro, and I have latest x64 version of vs editor. However I get this:
I used VS repo GUI to get the path for scripts and plugins and put it in vs edit but still no use. Here are the paths:
first one for plugins and the other for scripts.
anything to solve it?
thanks!
UPDATE: I solved it by installing python in C:\ and for all users then installing VS for all users and in C.
:D
A better solution.
https://bitbucket.org/mystery_keeper/vapoursynth-editor/issues/41/cant-work-with-new-vapoursynth-r48
Sure, here is my build (https://drive.google.com/file/d/1Fm4vTfTPzT73q7hK4G2l-76WxRkiFlPx/view?usp=drivesdk) but I would recommend to have it built on your own Mint system. I don't think there are any special non-default dependencies needed, just follow my instructions (https://forum.doom9.org/showthread.php?p=1874118#post1874118) and install any missing packages from official repositories.
Is this also works on windows?
Cary Knoop
25th December 2019, 00:17
Anaconda Vapoursynth install
Installed vapoursynth-edit
command line: vsedit.exe
Hourglass for half a second then terminated.
No logfile or any message is given.
Does anyone have a clue?
Edited to update:
If I uninstall Vapoursynth the vs-edit windows comes up, reinstalling Vapoursynth again causes again nothing to happen, no window at all and no error message.
zerowalker
31st December 2019, 04:55
I am having issues with the preview for a video, it seems to lock at a certain frame, any any seeking beyond just shows that frame (it it loads kinda slowly).
It's frame 7311 if it matters.
The video plays just fine, and i even re-encoded to another lossless format to ensure it wasn't the codec (from lagarith to magicyuv).
Is there some logs i can check to see what's going on?
The video length is about 4:55 hours if that plays a role, YUV2 720x576 25fps.
import vapoursynth as vs
core = vs.get_core()
a = core.avisource.AVIFileSource("video.avi",pixel_type="YUY2")
a.set_output()
Added the YUY2 as it would otherwise say YUV420P8 on the preview which i thought might cause the issue, but it made no difference.
EDIT:
Oh wait i actually did save it as YV12 for magicyuv, my bad lol.
Still the issue is there nevertheless;P
poisondeathray
31st December 2019, 05:14
@zerowalker,
does it lock on the exact same frame even after you re-encoded to magicyuv?
did you try another preview method to rule out vsedit issue? e.g. vdub2, vspipe to something like ffplay, potplayer ?
did you try another source filter? eg. ffms2
poisondeathray
31st December 2019, 05:19
If I uninstall Vapoursynth the vs-edit windows comes up, reinstalling Vapoursynth again causes again nothing to happen, no window at all and no error message.
Could it have something to do with search paths ?
In vsedit settings, there are fields for vapoursynth library search paths , plugins paths (mine are blank... but it works. On windows..)
And does vapoursynth "work" on that computer ? ie. is problem limited vsedit only ?
Can you test a simple script with vspipe
vspipe --info script.vpy -
or preview script in something else like vdub2 , or potplayer ?
zerowalker
31st December 2019, 05:50
@zerowalker,
does it lock on the exact same frame even after you re-encoded to magicyuv?
did you try another preview method to rule out vsedit issue? e.g. vdub2, vspipe to something like ffplay, potplayer ?
did you try another source filter? eg. ffms2
It seems to be different frames.
I haven't tested another preview method, not sure how to do that, this is my first vapoursynth test in ages.
In a mediaplayer (mpc-hc) it works fine though.
EDIT:
I tried with vspipe -> ffmpeg, and it seems to freeze on the same frame as the preview.
poisondeathray
31st December 2019, 06:00
It seems to be different frames.
different frames each time?
or is it repeatable in the same application? e.g. close application try again in same application
In a mediaplayer (mpc-hc) it works fine though.
What works fine? Did you mean the .vpy script works completely ok, seeks ok past that point ? Or did you mean the video file directly ?
Cary Knoop
31st December 2019, 06:01
Could it have something to do with search paths ?
In vsedit settings, there are fields for vapoursynth library search paths , plugins paths (mine are blank... but it works. On windows..)
And does vapoursynth "work" on that computer ? ie. is problem limited vsedit only ?
Can you test a simple script with vspipe
vspipe --info script.vpy -
or preview script in something else like vdub2 , or potplayer ?
Starting python from the command line and entering:
from vapoursynth import core
print(core.version())
Works fine.
Running
vspipe --info myscript.vpy -
gives:
Fatal Python error: initfsencoding: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'
poisondeathray
31st December 2019, 06:05
Running
vspipe --info myscript.vpy -
gives:
Fatal Python error: initfsencoding: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'
file system codec? What was the script ?
What about testing a simple BlankClip with vspipe, something like
clip = core.std.BlankClip(format=vs.RGB24, color=[0, 0, 0])
Cary Knoop
31st December 2019, 06:08
file system codec? What was the script ?
What about testing a simple BlankClip with vspipe, something like
clip = core.std.BlankClip(format=vs.RGB24, color=[0, 0, 0])
from vapoursynth import core
clip = core.std.BlankClip(format=vs.RGB24, color=[0, 0, 0])
Same error:
Fatal Python error: initfsencoding: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'
Current thread 0x000094bc (most recent call first):
poisondeathray
31st December 2019, 06:12
from vapoursynth import core
clip = core.std.BlankClip(format=vs.RGB24, color=[0, 0, 0])
Same error:
Fatal Python error: initfsencoding: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'
Current thread 0x000094bc (most recent call first):
I'm assuming clip.set_output() too, right?
no idea, sorry - but you should mention the details like OS, version
Cary Knoop
31st December 2019, 06:26
Same error with or without set_output()
I think it has to do with my anaconda setup.
Windows 10 Pro, Python 3.7.5 64 bit.
I am going to throw away all my non- Anaconda python installs and see if that helps.
Thanks for all your help so far poisondeathray, I appreciate it!
zerowalker
31st December 2019, 06:55
ffms2 seems to work, so the issue i guess is related to the avisource.
It's not codec specific as proven, and also not format specific (as i have used YUY2 and YV12).
Would like to debug this more to solve it or help find the cause for a solution to be made, depending on what the issue may be.
Even if ffms2 works, it's still a workaround as lossless codecs that are AVI compatible should work with Avisource, and also are usually faster and preferred in my experience (Lagarith might be a special case though).
poisondeathray
31st December 2019, 07:02
ffms2 seems to work, so the issue i guess is related to the avisource.
It's not codec specific as proven, and also not format specific (as i have used YUY2 and YV12).
Would like to debug this more to solve it or help find the cause for a solution to be made, depending on what the issue may be.
Even if ffms2 works, it's still a workaround as lossless codecs that are AVI compatible should work with Avisource, and also are usually faster and preferred in my experience (Lagarith might be a special case though).
Do you have avisynth installed on that system also?
If so, can you try the corresponding x86 or x64 version with AVISource() in avisynth?
Both are run through VFW; if both fail, it's likely an issue with VFW, or at least on that system
Or vdub2 x86 or x64 the same , open the AVI directly - but make sure file=>file information says "lagarith", not some other input driver (vdub can use ffmpeg input driver instead to open video) and see if you can seek without issues
zerowalker
31st December 2019, 10:19
Do you have avisynth installed on that system also?
If so, can you try the corresponding x86 or x64 version with AVISource() in avisynth?
Both are run through VFW; if both fail, it's likely an issue with VFW, or at least on that system
Or vdub2 x86 or x64 the same , open the AVI directly - but make sure file=>file information says "lagarith", not some other input driver (vdub can use ffmpeg input driver instead to open video) and see if you can seek without issues
Thing is i am converting the video with virtualdub, so VFW should be used, and it works fine as far as i can tell:S
EDIT:
Okay wait, ffms2 while working seems to be inaccurate, the video is shorter by about 4-5 seconds, i sadly can't really pinpoint where as the video is quite long..
Any ideas how to analyse this?
EDIT2:
I also installed Avisynth and tried AviSource on the same file and preview it with Avspmod and i seem to be able to seek around just fine.
poisondeathray
31st December 2019, 16:18
Thing is i am converting the video with virtualdub, so VFW should be used, and it works fine as far as i can tell:S
With the file loaded directly (the AVI) , Check with file=>file information . It will tell you if FFMpeg is being used (ffmpeg input driver, or caching driver) or official lagarith decoder .
If it's not using lagarith, you can force what is being used in open file dialog box , the drop down "files of type" and select AVIFile input driver
EDIT:
Okay wait, ffms2 while working seems to be inaccurate, the video is shorter by about 4-5 seconds, i sadly can't really pinpoint where as the video is quite long..
Any ideas how to analyse this?
EDIT2:
I also installed Avisynth and tried AviSource on the same file and preview it with Avspmod and i seem to be able to seek around just fine.
I used AVI such as lagarith for years, and frequently, without issues, both avisynth and vapoursynth
But one "gotcha" is null frames. Some programs might not handle that properly. Did you have that enabled ?
zerowalker
31st December 2019, 17:15
With the file loaded directly (the AVI) , Check with file=>file information . It will tell you if FFMpeg is being used (ffmpeg input driver, or caching driver) or official lagarith decoder .
If it's not using lagarith, you can force what is being used in open file dialog box , the drop down "files of type" and select AVIFile input driver
I used AVI such as lagarith for years, and frequently, without issues, both avisynth and vapoursynth
But one "gotcha" is null frames. Some programs might not handle that properly. Did you have that enabled ?
It uses Lagarith.
I don't know if i uses null frames tbh, i will check the other file with ffms2.
But still one of them should work with the default decoder correctly, not sure what's wrong:S
MagicYUV doesn't even have null frames so it should just have duplicated frames, or at worst skip them.
poisondeathray
31st December 2019, 17:56
@zerowalker - yes, the observations do no not add up nicely, not sure what's going on
Another "workaround" you can use or test if since it works in avisynth is core.avisource.AVISource on the .avs (frameserve avs to vapourysnth) . It will be slower, more overhead
Cary Knoop
31st December 2019, 18:08
@poisondeathray
I removed all Python instances and removed Vapoursynth (all users). Then I installed Anaconda and Vapoursynth (all users).
Works in Python scripts, but when I use vsedit.exe or vspipe.exe I get:
Failed to initialize VapourSynth environment!
VSRepoGUI works fine and gives me in Diagnostics:
Python location: e:\anaconda3\python.exe
Loaded VapourSynth dll: e:\anaconda3\lib\site-packages\vapoursynth.dll
Found an installation in HKEY_LOCAL_MACHINE\SOFTWARE\VapourSynth
- Path: C:\Program Files\VapourSynth
- PythonPath:
- Version: 48
Any ideas what the problem might be?
poisondeathray
31st December 2019, 18:13
@Cary - it "feels" like path issues, but that's just guessing
I did have Anaconda installed too for some projects (since removed), but python and vapoursynth were installed beforehand and separately. Python and vapoursynth were in their default locations (not through anaconda or any related anaconda directory). It seemed like a seriously messed up configuration ,with many things duplicated, but it worked for both. I don't know if that was the "right" way to do it
eg. Your vapoursynth.dll is buried in the anaconda3 directory, not the default location . Maybe you can set an environment variable for that path, or edit the registry keys
Cary Knoop
31st December 2019, 18:55
When I blank the PythonPath in the Vapoursynth registry entry I get:
Failed to initialize VapourSynth environment
Setting it to "e\anaconda3" I get:
Fatal Python error: initfsencoding: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00007928 (most recent call first):
Using: "python myscript.vpy" works fine.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.