View Full Version : VapourSynth Editor
Pages :
1
2
3
4
5
6
7
8
9
10
11
12
[
13]
14
15
16
poisondeathray
31st December 2019, 19:01
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.
typo, right ? no colon -
e:\anaconda3\
what about the python registry keys
HKEY_LOCAL_MACHINE\SOFTWARE\Python\3.7
Intalled path etc..
Cary Knoop
31st December 2019, 19:06
Yes, typo in the forum message (not the actual path).
The Python reg. keys are only: Default: (value not set)
poisondeathray
31st December 2019, 19:28
Sorry, I meant
HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\3.7
InstallPath
PythonPath
poisondeathray
31st December 2019, 19:34
"ModuleNotFoundError: No module named 'encodings'"
Do you have that "encodings" directory somewhere ? where ?
Mine is in C:\Program Files\Python37\Lib\encodings
Check in your e:\anaconda3\ somewhere
It "feels" like a path or directory issue where it can't find stuff
Cary Knoop
31st December 2019, 19:43
InstallPath = "e:\enaconda3"
PythonPath = "e:\anaconda3\Lib;e:\anaconda3\DLLs"
encodings is found in "e:\anaconda3\lib\encodings"
what I find odd is that calling vapoursynth in a regular python session works fine, but using vspipe or vsedit it seems to look for an alternative environment.
age
20th March 2020, 18:32
After i've installed vapoursynth r49-rc1 or rc2 I get this message in windows 10
Failed to load vapoursynth script library! Please set up the library search paths in settings.
What path I should manually set?
Sakura
21st March 2020, 06:33
After i've installed vapoursynth r49-rc1 or rc2 I get this message in windows 10
What path I should manually set?
Maybe you should add these paths
C:\Program Files\VapourSynth\core
C:\Program Files\VapourSynth\vsrepo
to Environment Variables - System Variables (If VapourSynth is installed for all users)
or Environment Variables - User Variables for xxx (If VapourSynth is installed for current user)
age
21st March 2020, 14:50
Thanks for the answer Sakura but it doesn't have worked.
In the end I've just disinstalled and reinstalled both python and vapoursynth, and now it works.
farabundo
31st March 2020, 21:50
Firstly, thanks to all involved in making these tools. Absolute newbie here and without the work in these threads, tools, and explanations I'd be lost. I'm having two issues, which surely must be a result of my newbie status, but am hoping someone can help out. Massive thanks to anyone who takes the time to read this.
1. Even with a really basic script in VapourSynth Editor (no actual video, just BlankClip), I receive an error after trying to Encode Video. Here's a screenshot of the Python code, the Encode Video window with its settings, and the error. Also, here (https://pastebin.com/MYVTQqcb) is the full log/error:
https://i.ibb.co/KLWQ8hb/Screen-Shot-2020-03-31-at-3-42-48-PM.png
2. I imagine this is an underlying issue, same as #1, but when I try and locate a video to write Python code for I get an error related to either lsmas or ffms2 (depending on the code). I can see in $HOME/.installs there is both a folder for ffms2 and L-SMASH-Works in the VaporSynthPlugins folder. Maybe this is a two fold question: am I missing a component? And also: in my Python scripts, do I need to write out the file path to the test.mp4 file (i.e. ~/Downloads/test.mp4) or put the file in a particular place?
https://i.ibb.co/5v0SsfM/Screen-Shot-2020-03-31-at-3-47-35-PM.png
Thanks so so much for any help, and for tolerating what I imagine to be super obvious questions.
poisondeathray
31st March 2020, 22:25
@farabundo-
When you pipe raw video, there is no header to convey clip information. You have to enter the arguments defining the video in terms of framerate, resolution, pixel format
The raw video arguments need to precede the -i when defining the input format . The order matters. Commands that come after the -i are output parameters for ffmpeg syntax
For your blankclip , eg. to encode using png compression in mov as an output (fill in the actual path)
-f rawvideo -s 640x480 -r 2997/125 -pix_fmt rgb24 -i - -c:v png "PATH\output.mov"
For the 2nd case, the error says you are missing and need to load the LSmash plugin. Place it in the plugins directory to autoload , or load it explicitly. (Actually not sure if that' s how you load plugins on a mac, or if that specific .dll works on a mac. It might need a different .dll)
core.std.LoadPlugin(r'PATH/LSMASHSource.dll')
If the MKV video is YUV, you can set vsedit to "Y4M" instead of "no header" and it will convey theclip characteristics to ffmpeg through yuv4mpegpipe. ie. You don't have to enter the input information as you did for raw video
eg. encoding using libx264 (fill in the actual path)
-f yuv4mpegpipe -i - -c:v libx264 -crf 18 "PATH\output.mov"
farabundo
1st April 2020, 19:20
@farabundo-
When you pipe raw video, there is no header to convey clip information. You have to enter the arguments defining the video in terms of framerate, resolution, pixel format
The raw video arguments need to precede the -i when defining the input format . The order matters. Commands that come after the -i are output parameters for ffmpeg syntax
For your blankclip , eg. to encode using png compression in mov as an output (fill in the actual path)
-f rawvideo -s 640x480 -r 2997/125 -pix_fmt rgb24 -i - -c:v png "PATH\output.mov"
For the 2nd case, the error says you are missing and need to load the LSmash plugin. Place it in the plugins directory to autoload , or load it explicitly. (Actually not sure if that' s how you load plugins on a mac, or if that specific .dll works on a mac. It might need a different .dll)
core.std.LoadPlugin(r'PATH/LSMASHSource.dll')
If the MKV video is YUV, you can set vsedit to "Y4M" instead of "no header" and it will convey theclip characteristics to ffmpeg through yuv4mpegpipe. ie. You don't have to enter the input information as you did for raw video
eg. encoding using libx264 (fill in the actual path)
-f yuv4mpegpipe -i - -c:v libx264 -crf 18 "PATH\output.mov"
Thanks for the response. Will read up and work on #2. Re: #1, does this make sense:
https://i.ibb.co/McnCnpP/Screen-Shot-2020-04-01-at-1-17-27-PM.png
poisondeathray
1st April 2020, 19:55
sorry, it should be -pix_fmt gbrp for planar rgb.
-f rawvideo -s 640x480 -r 2997/125 -pix_fmt gbrp -i - -c:v png "PATH\output.mov" -y
But there seems to be another issue, the planes are swapped when run through vsedit, but vspipe directly works correctly
vspipe gives the correct RGB 25,25,100
vspipe script.vpy - | ffmpeg -f rawvideo -s 640x480 -r 2997/125 -pix_fmt gbrp -i - -c:v png vspipe.mov -y
but vsedit with the equivalent command gives RGB 100,25,25 for some reason
Not sure what is going on
poisondeathray
1st April 2020, 20:02
You can use ShufflePlanes to swap them, but not sure why there is a difference between vsedit and vspipe behaviour
add this before video.set_output() , and use -pix_fmt gbrp , that makes the them correct when encoding through vsedit
video = core.std.ShufflePlanes(video, planes=[1,2,0], colorfamily=vs.RGB)
Mystery Keeper
1st April 2020, 20:44
This is my preset for encoding via FFMPEG into FFV1 with y4m header:
-y
-nostats
-i -
-c:v ffv1
"{sd}/{sn}.ffv1.mkv"
You can simply use your codec of choice.
Program is not behaving like a CLI encoder.
That means that for some reason FFMPEG didn't close when VSEdit closed the pipe. That's how encoders are supposed to work. The check is there to prevent people from creating jobs that never finish due to program not closing when encoding is complete.
poisondeathray
10th April 2020, 00:53
feature request: add x= , y= position readout for the eyedropper
Shameless bump for this feature request :D
PRAGMA
14th April 2020, 02:04
If vapoursynth crashes by bad code, the editor tends to either totally freeze or crash along with it, any chance to add a crash handler for that?
cubix
20th May 2020, 20:37
Likewise, shameless bump for comparison feature.
Mystery Keeper
25th May 2020, 01:30
Sorry sorry sorry. Life's been a roller coaster. I'll try to get to it, but I really don't know when.
lansing
10th June 2020, 10:58
I made a test build implementing a zoomable timeline, test it out here (http://www.mediafire.com/file/yn2vyqmqq1hkicy/Vapoursynth_Editor_test-build-64bit-gcc.7z/file) and give feedback. Ctrl + mouse wheel for zooming, zoom on current frame pointer. The basic skeleton should be done and I need feedback on the navigation experience. And don't mind the ugly color.
ChaosKing
10th June 2020, 17:03
The min width of the time line should be max window width. I my quick test I could zoom out to 50% window width which does not make sense I think.
EDIT oh and the red bar is sometimes cut off. Try to zoom at the end of the video. The red bar disappears sometimes
https://i.imgur.com/ldLiVTi.png
lansing
10th June 2020, 17:32
The min width of the time line should be max window width. I my quick test I could zoom out to 50% window width which does not make sense I think.
EDIT oh and the red bar is sometimes cut off. Try to zoom at the end of the video. The red bar disappears sometimes
https://i.imgur.com/ldLiVTi.png
Ok, I'll fix the red bar disappearance problem.
For the width, I set minimum width to 1000px, which is about the width of the default width of the preview window. The 1000px base width is good when working with dvd content where you don't want to work on full screen. But you're also right that you would want max window when working with HD content, and with the red bar at 50% width is really weird. I'll try think of a solution that work for both cases.
lansing
11th June 2020, 06:29
I have test2 (http://www.mediafire.com/file/slriphv4c7wlejt/Vapoursynth_Editor_test2-build-64bit-gcc.7z/file) up, now the time line width default to match the size of the window, zoom factor will remain after resize.
The red bar disappearance looks to be a bug in QT, the QPainter doesn't paint for width that is over 32,765 px. So when extending the timeline too long will have the end with no red. I have posted the problem in their forum waiting for help.
UPDATE: I got reply from the QT people, the QPainter has a painting range of +/- 2^15, that is 32,768, so the zoom went over the limit. I'll set a limit before that point then.
Also I feel like the zoom too aggressive? It's like 2 scrolls and I'm over the limit.
ChaosKing
11th June 2020, 11:05
Still buggy https://i.imgur.com/YMhNCr2.png
lansing
11th June 2020, 19:10
test 3 (http://www.mediafire.com/file/whzynv4ul287m2p/Vapoursynth_Editor_test3-build-64bit-gcc.7z/file) up. Fixed the red bar disappear problem and added a ruler on top.
lansing
15th June 2020, 10:19
I have test 4 (http://www.mediafire.com/file/rlf9y7sf1oe1cn4/Vapoursynth_Editor_test4-build-64bit-gcc.7z) up. The thing I added/changed.
- we can now jump in timeline while in playback.
- the FPS limited mode drop down now has more predefined fps options to choose from.
- added the show x and y position with eyedropper by this request (https://forum.doom9.org/showthread.php?p=1907023#post1907023)
I also tried to align center the frame in the preview area, but it seems like centering and eyedropper cannot go together, looks to be a Qt issue.
l00t
15th June 2020, 16:54
Great improvements, thank you.
I've noticed one minor problem:
- Eyedropper's coordinates does not work properly with zoom (does not scale with it).
lansing
15th June 2020, 19:09
I've noticed one minor problem:
- Eyedropper's coordinates does not work properly with zoom (does not scale with it).
That's odd, it works on my end, I'm using Windows 10.
poisondeathray
15th June 2020, 19:31
Thanks lansing;
eyedropper coordinates are not correct for me either at 1x zoom (windows 8) , even on a "small" video like 1280x720 . Top left should be x=0, y=0 but I'm getting like x=14, y=43 or something . I think it's adding the windows borders dimensions
and they change if the window is not maximized (both incorrect at any zoom)
lansing
15th June 2020, 19:42
Okay I fixed it, updated last post.
I also found a bug of ruler end not showing when zooming on a 1 minute long clip.
l00t
15th June 2020, 20:09
Still broken, it gets the coordinates from the window, but not from the video itself (or is that intentional?).
I'm trying with this script:
clip = core.colorbars.ColorBars(resolution=2, format=vs.YUV444P10, hdr=0, wcg=0, compatability=2, subblack=1, superwhite=1, iq=1)
When I zoom in to 3.0, the shown coordinates go up to my desktop resolution (4k), while the footage's resolution is smaller for sure (720p).
(Using W10 2004 with 150% DPI scaling, if that matters)
poisondeathray
15th June 2020, 20:14
Thanks, it fixed x,y coordinates with 1x zoom.
x,y coordinates with 2x, 4x ...zoom still does not work correctly. I think it's just the value *zoom currently (e.g. 2x zoom current shows x=2559 at the right most on a 1280 width video), when it should be "divide by" current zoom level or something like that
What is the "yellow" bar for ?
It looks like old timeline is "deactivated" ? If I navigate in new timeline, it does not auto update in the old timeline ? So what is the purpose of keeping both taking up screen space? Maybe introduce the ability to toggle on/off either of them ?
Is there a way to actively resize the new timeline? Such as resizeable window height ?
lansing
15th June 2020, 20:55
Okay I see the problem with the zoom now, I'll work on the fix.
The yellow bar is just a dummy color, it makes it easier to spot bugs when something goes wrong. I'll change it later when all bugs are clean. Yes the old timeline is deactivated. I'm keeping it up for now until I finished transferring out the bookmark features. (It can still loads chapter file)
I am planning to make everything bigger for better control experience. Bigger timeline, bigger buttons, that'll probably requires button repositioning so it's still all trials and errors.
For the timeline height, I referenced it off Resolve's, and we're shorter, so I think it's okay. Navigation is easy, clicking is easy. Making it taller only make sense if we have previewing thumbnails in it.
lansing
16th June 2020, 08:47
I updated the last post again with fix, hopefully all known bugs are resolve now.
l00t
16th June 2020, 15:57
Neat, it's correct now. Thank you!
Looking forward for futher optimizations :)
Can I make a small request? Is it possible to compress the .png screenshots while saving?
Thank you very much in advance.
lansing
16th June 2020, 16:38
Neat, it's correct now. Thank you!
Looking forward for futher optimizations :)
Can I make a small request? Is it possible to compress the .png screenshots while saving?
Thank you very much in advance.
I see another user did a pull request (https://bitbucket.org/mystery_keeper/vapoursynth-editor/pull-requests/14) on the original fork two weeks ago but never got reviewed. Maybe I'll just copy from him?
l00t
16th June 2020, 18:45
Well, I'm not competent in this question, but giving a try won't hurt IMHO.
lansing
16th June 2020, 20:09
Well, I'm not competent in this question, but giving a try won't hurt IMHO.
Test (http://www.mediafire.com/file/nlto68d1e4lg0p8/Vapoursynth_Editor_test4.1-build-64bit-gcc.7z) it here. There's a quality parameter to determine the size, 0 is highest compression and 100 for no compression. The program was using 100 before.
Saving at quality 0 lags the program and I didn't bother exposing the parameter like the guy did. I didn't lag at 50 so I just go with that. Test it to see if it lags yours or we will need higher number.
l00t
17th June 2020, 10:19
Thanks! Works fine for me, it compresses well. I observed no lags, but I have a Threadripper 2950X, so that might be not that representative. Will try on cheaper HW later.
Test (http://www.mediafire.com/file/nlto68d1e4lg0p8/Vapoursynth_Editor_test4.1-build-64bit-gcc.7z) it here. There's a quality parameter to determine the size, 0 is highest compression and 100 for no compression. The program was using 100 before.
Saving at quality 0 lags the program and I didn't bother exposing the parameter like the guy did. I didn't lag at 50 so I just go with that. Test it to see if it lags yours or we will need higher number.
lansing
18th June 2020, 23:18
I'm working on the chapter manager and trying to load bookmark file and chapter file with the same button, how can I tell them apart?
poisondeathray
20th June 2020, 01:33
Another repeated request is " tabs" , a very useful feature in avspmod and vapoursynth multi viewer. M K said there would be stability issues implementing them - has anything changed or do you have any new ideas ?
lansing
20th June 2020, 02:54
Another repeated request is " tabs" , a very useful feature in avspmod and vapoursynth multi viewer. M K said there would be stability issues implementing them - has anything changed or do you have any new ideas ?
That is the one that everybody wanted for years. It is next up on my to do list after this bookmark manager I working on right now.
The main challenge is the core design, what Mystery Keeper wanted is a multi processes design, something like Google Chrome where each video node would be attached to one process, so if one of them die, the other would still be alive without the entire program crashing. I have that same idea too but I was waiting for him to do it.:)
And there wasn't many if any example to look at so I don't know the steps to do this, it'll probably take many tries. My idea right now is to make a separate program acting as a control center, and it able to call new vseditor processes and have them somehow attached to it like a tab.
If everything failed, I'm going to fall back to the single process multi-tab design implementation like avspmod. I just feel like we need to get something going, and having something done is better than having nothing done.
And btw any bug found in the timeline or any lagging when saving snapshot on lower end machine? If they're fine then I'll take out that ugly red bar in the next test build.
poisondeathray
20th June 2020, 04:59
I did not notice any lagging either for the screenshot saving
Will you add back that mouseover that displays a popup current time, or some other current time indicator of the playhead and or cursor (hh:mm:ss.ms) ?
lansing
20th June 2020, 05:11
I did not notice any lagging either for the screenshot saving
Will you add back that mouseover that displays a popup current time, or some other current time indicator of the playhead and or cursor (hh:mm:ss.ms) ?
Yes, I was thinking about putting them right under the current frame indicator so they're all in one place. So we'll have the box showing current frame on top, a second box show current time in the middle, and a third box showing the mouseover time.
_Al_
20th June 2020, 05:57
I constructed Qt for playing clips as well. Drawing frames is in a thread, together with timer an pulling frames from queue. Similar like M. Keepers. I was looking at his scripts for how-to. But using python so a module could be used together with any python editor.
Then I just realized to quick test opencv how that would go, not Qt and it just clicked from the beginning. Using view.py , quick zoom in, changing clips is an instant using keys on keyboard. I realized that simple might be better, no gui, with just assigning hot keys for functions + drawing slider, what opencv does very well. Also drawing selection, using mouse seams to be a bit easier than in Qt. I never came back to that Qt solution. Opencv has a main loop that reads keys, so you just feed any frame you want (switching a clip) and it will seamlessly go on. When zooming or zooming out, you do it for all clips always, so those clips are ready. How would I do that if those processes, clips, were in different threads like was constructed in Qt ? I was surprised how sturdy it all behaved,no crushing.
l00t
20th June 2020, 10:53
If possible, another request is to add a Search functionality. I know most of the codes are not that long, however, in certain cases it would be useful.
Myrsloik
20th June 2020, 11:10
That is the one that everybody wanted for years. It is next up on my to do list after this bookmark manager I working on right now.
The main challenge is the core design, what Mystery Keeper wanted is a multi processes design, something like Google Chrome where each video node would be attached to one process, so if one of them die, the other would still be alive without the entire program crashing. I have that same idea too but I was waiting for him to do it.:)
And there wasn't many if any example to look at so I don't know the steps to do this, it'll probably take many tries. My idea right now is to make a separate program acting as a control center, and it able to call new vseditor processes and have them somehow attached to it like a tab.
If everything failed, I'm going to fall back to the single process multi-tab design implementation like avspmod. I just feel like we need to get something going, and having something done is better than having nothing done.
And btw any bug found in the timeline or any lagging when saving snapshot on lower end machine? If they're fine then I'll take out that ugly red bar in the next test build.
I believe a multi-process design is pointless. Cores don't just fall over and crash and whenever a fatal error is discovered it's always fixed in the next release.
I'd say add the actually requested features in a single process and reach new levels of popularity.
lansing
20th June 2020, 11:14
Test 5 build here (http://www.mediafire.com/file/vsf838bw82joepw/Vapoursynth_Editor_test5-build-64bit-gcc.7z/file), here my log:
- Image saving (png) now uses better compression for smaller file size (quality 50 instead of no compression)
- New bookmark manager to interact with timeline
- bookmark can now be save as chapter file or bookmark with delimiter
- bookmark settings are saved
Test to see if all the buttons work. The close button doesn't work though. You can double click on bookmark to jump to frame in timeline. Saving to chapter file only saves the timestamp for now.
lansing
21st June 2020, 08:58
Test 5.1 here (http://www.mediafire.com/file/98dbzpm3l169tpx/Vapoursynth_Editor_test5.1-build-64bit-gcc.7z/file)
- Mouse click and drag in timeline works now
- Chapter title is now editable in bookmark manager and can be saved. (no XML)
I also fixed a couple of bug that only occurred from dragging. For chapter files, I'm not touching XML, I looked at mkvtoolnix's chapter editor and it scared me. People looking for more functionalities from their chapter file should look into those instead.
lansing
21st June 2020, 09:03
I believe a multi-process design is pointless. Cores don't just fall over and crash and whenever a fatal error is discovered it's always fixed in the next release.
I'd say add the actually requested features in a single process and reach new levels of popularity.
Will multi-process design alleviate memory usage for things like, loading three 1080p videos and flipping them back and forth doing comparison?
ChaosKing
21st June 2020, 10:12
My #1 wish for vsedit would be a better code completion system. The current one only works for plugins and only if you write core.std.... ; clip.std. does not work + it writes all parameter while often you only need 1 or 2.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.