View Full Version : VapourSynth Editor 2
lansing
1st February 2021, 00:21
Updated version to R4
R4: [2021-01-31]
- Add option to release memory on tab
- Remember tabs on close
- Opening script that was already opened will change to its tab
- Fixed a save file dialog pop up when loading from the recent script list while the active script is labeled as modified
- Fixed script template loading with tabs
- Fixed log window visibility. The window will show up from hidden when there's an error
- Removed the ugly white margin around log window
- Capping frame cache and frame ticket queue sizes, greatly reducing memory usage
- Added "copy to new tab" option to right click tab context menu
- Updated more deprecated type cast
I fixed most of the reported issues, the user experience should be a lot better now. I should start to look at improving syntax highlighting and autocompletion now. And there's issue of 4K video not playing at full speed on playback but I already have it hardware decoded, don't know why.
lansing
3rd February 2021, 07:29
Updated to R4.3
- Added option in menu to open plugins and scripts folder
- Setting of "characters typed to start autocompletion" doesn't affect VS functions anymore
- Autocompletion for VS functions now default to be triggered by zero typed character after "core."
- Added an "about Vapoursynth" dialog to the menu to show current VS and API versions
I fixed the annoying issue with the characters typed to start autocompletion setting option. Before when we set the option to 0, the autocompletion mechanic would be triggered on everywhere by everything like spacebar or enter, but we'll need it to be at 0 or the plugin autocompletion feature would be pointless. Now that option will not affect plugin autocompletion and autocompletion would be triggered after "core." or a period in the chain.
I also added the one click open option for opening the plugins and scripts folders, utilizing vsrepo. I couldn't find a proper way to catch error in QProcess though, for example:
pythonxyz vsrepo.py paths # error caught
python vsrepo.py pathsxyz # error not caught
so I didn't even bother for error checking.
ChaosKing
3rd February 2021, 13:16
Autocompletion for VS functions now default to be triggered by zero typed character after "core."
Much more usable now thx.
lansing
4th February 2021, 07:10
Updated to R4.4
log
- Autocompletion for Python script functions, still in beta
- Some code refactoring on the last commit that is necessary for autocompletion
A beta version for autocompletion for Python script functions, very buggy still. The program will generate the qcomplete model for the scripts you have in your script folder. Functions are parsed by reading the scripts looking for the definitions. Private methods and child methods are ignored. Well that's the best I can think of to filter out the unnecessary ones. For scripts that don't private their utility or helper methods, there's really nothing I can do. They will just be added to the model.
Limitation so far is that the there's no logic to change module name, and I'm still don't know what to do with gigantic functions like QTGMC with like 50+ arguments.
ChaosKing
4th February 2021, 09:53
The autocomplete list shows up on the left side of my screen, but only with havsfunc.
https://i.imgur.com/tLlCTiH.png
lansing
4th February 2021, 10:24
The autocomplete list shows up on the left side of my screen, but only with havsfunc.
https://i.imgur.com/tLlCTiH.png
I think that's probably because of some long definition in the list. I'll take out the arguments in the definitions, that should fix it.
lansing
5th February 2021, 05:47
Updated to R4.6
changelog
- Fixed autocompletion argument value not printing
- Fixed parsing definition with "\"
- Autocompleter list shows only function names instead of the entire definition now, much easier to read
I fixed all the problems I can find for the python script autocompleter, now the whole thing should be usable. A lot of time has been spent unexpectedly on debugging because switching to the new signal/slot syntax somehow broke the text selection logic.
Autocompleter on VS filter arguments doesn't have default values because the current API doesn't provide them, so we'll have to wait for Myrsloik for API 4.
The final piece for autocompletion will be autocompletion for VS Classes (http://www.vapoursynth.com/doc/pythonreference.html) but I don't know where to get that list.
lansing
5th February 2021, 08:40
When I run a script with core = vs.get_core(), in PyCharm, it'll give a warning about the function being deprecated, but in vseditor, nothing was printed.
lansing
6th February 2021, 18:26
After couple of days of reading, I feel like the next evolution for the editor part of the program would be to use a Python language server. It provides autocompletion for all filters and modules (what we have now), as well as keeping track of the type of the variables so we can have autocompletion like vs.YUV420P8 or clip.set_output() and chaining filters, which is what we couldn't do now. And Myrsloik already had the stubs file prepared for that, well the autocompletion still doesn't work well for VideoNode, like allowing things like this:
clip.ffms2.Source(r"hello.mkv")
but it will get there eventually.
ChaosKing
9th February 2021, 09:42
It seems when I press F6 (check script) all tabs a checked. My 1. tab is very slow (heavy filtering) & my 2. tab is fast. I only want to check tab 2, but it takes very long until tab2 show the result. Removing tab 1 results in fast resonse.
Is this by design or a bug?
lansing
9th February 2021, 16:28
It seems when I press F6 (check script) all tabs a checked. My 1. tab is very slow (heavy filtering) & my 2. tab is fast. I only want to check tab 2, but it takes very long until tab2 show the result. Removing tab 1 results in fast resonse.
Is this by design or a bug?
I can't reproduce it. I throws in three smdegrain(tr=6) in tab 1 and check script still running fast for me on tab 2.
lansing
9th February 2021, 17:24
Vapoursynth's memory preallocation is becoming a serious problem too. They can't be release even when the core was deleted. Running checkscript on a few heavy scripts will hoard all memory in a hurry.
ChaosKing
9th February 2021, 19:12
Seems like it was a one time bug xD Can't reproduce it too.
lansing
10th February 2021, 17:52
Updated to R5
changelog
R5: [2021-02-10]
- Bug fixed: switching from tab A with a larger frame number than the max frame number of tab B will cause an out of range frame request error
- Bug fixed: switching to tabs that are not in the same group during playback would keep on playing
- Bug fixed: in group playback, switching to the same tab using hotkey would break the playback
- Fixed missing connect for preview advance setting dialog, but its usage is still unknown to me
- Config file now saved as vsedit2.config to avoid conflicting with the original version
- Updated to VSAPI 3.6 calls, now requires Vapoursynth R47 or higher
- Updated deprecated QProcess calls for encode and job server watcher
- Autocompleter list shows only function names instead of the entire definition
- Autocompletion for Python script functions, but only limited to non alias calls
- Autocompletion popup now triggers on zero character type after "." on known filter/script names, normal words will not be affected
- Added "about Vapoursynth", "open plugins folder" and "open scripts folder" options to menu
An autocompleter for Python scripts, but it doesn't work with alias. So you can only do "havsfunc.QTGMC", no "haf.QTGMC".
And many bug fixes for tab switching on playback, hopefully no more crashings.
Also there're some changes in the QProcess syntax so I need to change some logic for encode and job server watcher, so you may want to test it out to see if they still work.
Ninelpienel
28th February 2021, 13:52
I can't make VSEditor 2 to become default editor for vpy files on Windows:
- I can associate it, but when I click on the script, VSEditor opens with a blank tab instead of the target script.
(VSEditor doesn't even pick up script argument when called via CLI)
- In addidion, I get theme_presets.txt file created in the folder where my script is located.
Both items seem to be regressions compared to v1.
The problem still exists. :/
lansing
2nd March 2021, 06:30
The problem still exists. :/
File association was never implemented on the program side, it just happened to work in the original version by coincident.
I'll look into it.
lansing
2nd March 2021, 21:28
Updated to R5.2,
changelog
- File association for vpy file option on Windows platform, opening vpy will load as new tab in the program
- A vapoursynth logger plugin for vseditor to log warning messages to console
I added a logger vs plugin to log deprecation warning messages to console. Just put the vsedit_logger.dll to the plugin folder and it should work. I tried to load the dll using the custom plugin folder path defined in vseditor but it looks like it had been broken for a long time. So just use the regular plugins folder for now.
The reported line number for fatal error has also been offset by the logger script so just ignore it for now. I'll fix it altogether later after no issues reported for the logger.
For the file association, first try to associate it using right click->open with->choose program to see if it works. The "associate vpy" button in the program setting will write to registry and I'm not sure if it's necessary.
poisondeathray
3rd March 2021, 00:02
R5.2 error msg
Failed to evaluate the script:
Python exception: No attribute with the name vsedit exists. Did you mistype a plugin namespace?
Traceback (most recent call last):
File "src\cython\vapoursynth.pyx", line 2244, in vapoursynth.vpy_evaluateScript
File "src\cython\vapoursynth.pyx", line 2245, in vapoursynth.vpy_evaluateScript
File "script_42", line 29, in
File "src\cython\vapoursynth.pyx", line 1756, in vapoursynth.Core.__getattr__
AttributeError: No attribute with the name vsedit exists. Did you mistype a plugin namespace?
script
import vapoursynth as vs
core = vs.get_core()
clip = core.std.BlankClip(format=vs.YUV420P8, length=240, color=[16, 128, 128])
clip = core.std.AssumeFPS(clip, fpsnum=24000, fpsden=1001)
clip = core.text.FrameNum(clip)
clip.set_output()
Script works ok in R5 and earlier versions
lansing
3rd March 2021, 00:08
There's a vsedit_logger.dll in the folder, just put it to the plugin folder
poisondeathray
3rd March 2021, 00:26
There's a vsedit_logger.dll in the folder, just put it to the plugin folder
:o ooohh oops sorry. I thought it was "optional", but I copy/pasted and it works ok now :)
Thanks
lansing
3rd March 2021, 01:21
:o ooohh oops sorry. I thought it was "optional", but I copy/pasted and it works ok now :)
Thanks
It could be hassle free and work right out of the box if the program's user defined plugins path was not broken. I'm still trying to figure out where the problem is.
ChaosKing
3rd March 2021, 08:28
I like the new logger.
But can this be improved with maybe showing the module or filename as additional info?
DeprecationWarning : line 105: get_core() is deprecated. Use "vapoursynth.core" instead.
DeprecationWarning : line 2142: get_core() is deprecated. Use "vapoursynth.core" instead.
DeprecationWarning : line 2622: get_core() is deprecated. Use "vapoursynth.core" instead.
DeprecationWarning : line 1757: get_core() is deprecated. Use "vapoursynth.core" instead.
DeprecationWarning : line 6: get_core() is deprecated. Use "vapoursynth.core" instead.
DeprecationWarning : line -4: get_core() is deprecated. Use "vapoursynth.core" instead. <-- can this be true?
lansing
3rd March 2021, 08:44
I like the new logger.
But can this be improved with maybe showing the module or filename as additional info?
DeprecationWarning : line 105: get_core() is deprecated. Use "vapoursynth.core" instead.
DeprecationWarning : line 2142: get_core() is deprecated. Use "vapoursynth.core" instead.
DeprecationWarning : line 2622: get_core() is deprecated. Use "vapoursynth.core" instead.
DeprecationWarning : line 1757: get_core() is deprecated. Use "vapoursynth.core" instead.
DeprecationWarning : line 6: get_core() is deprecated. Use "vapoursynth.core" instead.
DeprecationWarning : line -4: get_core() is deprecated. Use "vapoursynth.core" instead. <-- can this be true?
There shouldn't be negative number. Is the reported line number correct for the rest? How do I reproduce it?
feisty2
3rd March 2021, 09:24
It could be hassle free and work right out of the box if the program's user defined plugins path was not broken. I'm still trying to figure out where the problem is.
you can manually load a plugin not placed in the autoload folder using core.std.LoadPlugin()
ChaosKing
3rd March 2021, 10:14
There shouldn't be negative number. Is the reported line number correct for the rest? How do I reproduce it?
The line numbers are all wrong. (I think they are shifted always? by 19)
https://i.imgur.com/jwnJbaP.png
The -4 is triggerd by
#https://github.com/theChaosCoder/lostfunc
import lostfunc as lst
clip = lst.MfTurd(clip)
lansing
3rd March 2021, 10:26
Yes the line number were offset by 19 because of the logger script that was prepended to the main script. I'll put a check on the origin of the warning message and keep the line number untouch for those that came from imported modules.
lansing
12th March 2021, 09:30
Updated to v5.3
changelog
- Single instance implementation using the KDSingleApplication library
- vsedit logger dll will now auto load on program start up, no more need for putting it into the plugins directory
Took me a lot of time to get this single instance implementation working. The first library I tried was buggy and very unresponsive, took about half a second to response when I double click a vpy file. Now this second library is working correctly and very snappy.
danfgtn
14th March 2021, 01:01
It is very nice to see that someone has continued the project, I have a suggestion and would like to check some problems. It would be nice to have to press enter or click outside the frame box before going to the typed frame. If I want to go to frame 1000, it loads frames 1, 10 and 100 as I type, which is a problem in heavy filtering.
Someone already asked, but I couldn't find an answer, is there any prediction when the crop editor will work?
Also some buttons are cut off here, I tried changing the DPI settings but it didn't work.
https://i.imgur.com/7kZtmvE.png
https://i.imgur.com/EAhlVMa.png
https://i.imgur.com/7jM3tLR.png
These two buttons are without icon, I don't know if they have always been like this
https://i.imgur.com/Pwa7rQd.png
lansing
14th March 2021, 06:50
It is very nice to see that someone has continued the project, I have a suggestion and would like to check some problems. It would be nice to have to press enter or click outside the frame box before going to the typed frame. If I want to go to frame 1000, it loads frames 1, 10 and 100 as I type, which is a problem in heavy filtering.
Will fix.
Someone already asked, but I couldn't find an answer, is there any prediction when the crop editor will work?
I'm currently working on it, the working frame will be movable inside the crop editor window.
Also some buttons are cut off here, I tried changing the DPI settings but it didn't work.
These two buttons are without icon, I don't know if they have always been like this
I don't know much about DPI so this issue will be in my last priority.
There are many actions in the menu that are without icons right now because the icon package (http://www.famfamfam.com/lab/icons/silk/) had like 1,000 icons and it gave me a headache trying to find the right one out of that. You can help if you can spot them.
poisondeathray
29th March 2021, 17:31
vsedit color picker issue with RGB30
-The vsedit2 r5.x branch reads only displays values in the "R" channel (incorrect for "G", "B", "RGB"; for example, the R value should be placed in the "G" channel for the G strip, or the "B" channle for the B strip, etc...)
-works ok in vsedit r19 , vsedit2 r4.x
RGB30 (gbrp10le) R, G, B, R+G+B ramp pattern 0-1023 . 1024x720. FFV1
https://www.mediafire.com/file/3libjjt41q8d3m4/Comp_GradientRamp_RGB30_1024x720_ffv1.mkv/file
clip = core.lsmas.LWLibavSource(r'Comp_GradientRamp_RGB30_1024x720_ffv1.mkv')
poisondeathray
30th March 2021, 06:01
Actually, the color picker seems completely broken in R5.x. When testing 8bit solid color bars, the numbers change almost randomly as you mouse over a color (not dithering issue, solid single color). R4.x works ok
lansing
30th March 2021, 14:34
Actually, the color picker seems completely broken in R5.x. When testing 8bit solid color bars, the numbers change almost randomly as you mouse over a color (not dithering issue, solid single color). R4.x works ok
The color picker was probably broken by one of the filter in the preview filter chain. I'm planning to reimplement it next in my todo list because the current implementation will reload the entire script every time a filter in the chain was turned on/off. Instead I should be using video nodes so that filters that had ran shouldn't need to rerun again. This same workflow should also be use when comparing similar scripts but I don't know the logics yet.
After testing out the warning message logger for some time, I think I will be reverting it back because it basically does nothing beside logging the deprecation warning messages, which no regular users needed it. While the plugin developers will get those warnings anyway using any python ide in development. I will keep the logger filter though as people might need it as a print function for debugging.
fAy01
7th April 2021, 03:45
Thanks for working on this project. I tested it and found a few things maybe you could implement.
1 - Loading a script in vsedit without filepath and just the script name shows preview but currently vsedit2 doesn't have that feature.
2 - The preview doesn't load unless I press the F5 key or hit the preview button. What doesn't work is going to the 'Video' menu and selecting 'Play.'
3 - Is it possible for "Preview Advanced Settings" to fetch information from the d2v/m2ts/mkv/etc. file?
4 - Could you possibly add a search bar in the hotkeys menu?
https://i.imgur.com/cwr9cd9.png
Kind Regards
Tima
9th April 2021, 23:20
A nasty bug: if I open some script and close VSEdit, and then delete this script, VSEdit crashes on all subsequent runs.
Mystery Keeper
10th April 2021, 02:02
A nasty bug: if I open some script and close VSEdit, and then delete this script, VSEdit crashes on all subsequent runs.
No such bug in vsedit. Must be a vsedit 2 thing.
lansing
10th April 2021, 06:06
A nasty bug: if I open some script and close VSEdit, and then delete this script, VSEdit crashes on all subsequent runs.
Cannot reproduce. The program will just warn on missing scripts on next startup and continue running.
lansing
10th April 2021, 06:35
Thanks for working on this project. I tested it and found a few things maybe you could implement.
1 - Loading a script in vsedit without filepath and just the script name shows preview but currently vsedit2 doesn't have that feature.
2 - The preview doesn't load unless I press the F5 key or hit the preview button. What doesn't work is going to the 'Video' menu and selecting 'Play.'
3 - Is it possible for "Preview Advanced Settings" to fetch information from the d2v/m2ts/mkv/etc. file?
4 - Could you possibly add a search bar in the hotkeys menu?
Kind Regards
1. Do you mean loading video file without file path in the source filter? I don't know if it's better to just get the file path with "os.path.dirname(os.path.realpath(__file__))" in the script or have the program do it implicitly. It's just one line of code.
2. Video won't play unless the script has been run. I can disable the button until the script was loaded if that causes confusion.
3. What information are you looking for?
4. I'll add that to the todo list.
fAy01
11th April 2021, 19:39
1. Do you mean loading video file without file path in the source filter? I don't know if it's better to just get the file path with "os.path.dirname(os.path.realpath(__file__))" in the script or have the program do it implicitly. It's just one line of code.
Yes, please. I move files around a lot. I like the convenience of loading the scripts from any storage device.
2. Video won't play unless the script has been run. I can disable the button until the script was loaded if that causes confusion.
Actually, I want the script to load and preview when I press the f5, play button, and video button. Maybe?
3. What information are you looking for?
Actually, nevermind. I think I've misunderstood what it does.
Tima
11th April 2021, 23:53
Cannot reproduce. The program will just warn on missing scripts on next startup and continue running.
Reproduces for me in 100% cases -- it occurs next thing after the warning message.
Stacktrace for VSEdit 2 R5.3 (Win10 x64):
> vsedit.exe!00000000004846b9() Unknown
vsedit.exe!0000000000494509() Unknown
Qt5Core.dll!0000000068b974bb() Unknown
Qt5Widgets.dll!0000000000fe3ce6() Unknown
vsedit.exe!0000000000487df4() Unknown
vsedit.exe!000000000048a36c() Unknown
vsedit.exe!000000000048d267() Unknown
vsedit.exe!0000000000498b8d() Unknown
vsedit.exe!00000000004013c7() Unknown
vsedit.exe!00000000004014cb() Unknown
kernel32.dll!00007ff8839d7974() Unknown
ntdll.dll!00007ff8843ca2d1() Unknown
vigan1
10th May 2021, 10:59
Hello.
I am trying to get vapoursynth up and running on Ubuntu 20.04. But I can't build and install vsedit (vapoursynth editor).
Can you help me getting Vapoursynth editor 2 running on my linux ?
git clone https://bitbucket.org/gundamftw/vapoursynth-editor-2
cd vapoursynth-editor-2/pro
qmake -norecursive pro.pro CONFIG+=release
make
Here is a justepastit of the errors I encounter : https://justpaste.it/23n0j
It seems that ‘splitCommand’ is not a member of ‘QProcess’
feisty2
1st June 2021, 17:42
vsedit doesn't seem to display the indentation of a multi-line string properly, that's kinda weird,,,
https://i.imgur.com/CzvKz9C.png
as you can see from the preview window, the string being displayed is indented and it doesn't appear so in the message box. this problem can be traced back to the original version of vsedit.
core.test.Test() simply prints and returns the string representation of the first frame of a video node
PluginInstantiator::RegisterFunction("Test(clip: vnode)", [](auto Arguments, auto Core) {
auto clip = static_cast<Node>(Arguments["clip"]);
Core.Print(clip[0]);
return static_cast<std::string>(clip[0]);
});
lansing
4th June 2021, 06:49
vsedit doesn't seem to display the indentation of a multi-line string properly, that's kinda weird,,,
as you can see from the preview window, the string being displayed is indented and it doesn't appear so in the message box. this problem can be traced back to the original version of vsedit.
core.test.Test() simply prints and returns the string representation of the first frame of a video node
It probably has to do with styling. Do you have test script and the test filter? How do I print the info to the console?
feisty2
4th June 2021, 08:21
Do you have test script and the test filter? How do I print the info to the console?
script is shown above.
the source code and compiled binary of core.test.Test is available here: https://gist.github.com/IFeelBloated/4b49c340bf5ba960ce3e628e5166d7e1
lansing
4th June 2021, 17:05
script is shown above.
the source code and compiled binary of core.test.Test is available here: https://gist.github.com/IFeelBloated/4b49c340bf5ba960ce3e628e5166d7e1
The script above is an image, I couldn't copy it.
feisty2
4th June 2021, 17:10
alright...
from vapoursynth import *
clp = core.std.BlankClip(width=640, height=480, format=YUV444PS)
clp = core.std.SetFrameProp(clp, "aaa", data=["cccc", "hello"])
blk = core.std.BlankClip()
clp = core.std.ClipToProp(clp, core.std.ClipToProp(blk, core.std.BlankClip()))
clp = core.text.Text(clp, core.test.Test(clp))
clp.set_output()
lansing
4th June 2021, 18:14
It should be fixed now.
c3eni23
13th June 2021, 13:35
Hello,
I already fix some issues and create pull request (https://bitbucket.org/gundamftw/vapoursynth-editor-2/pull-requests/1).
Hope this program can be more useful. :)
lansing
16th July 2021, 02:36
I fixed the problem with the matrix coefficient selection not working correctly in the Preview Advanced Settings. Now changing from rec709 to rec601 will show a change in color in the preview.
I think I'll also move the matrix setting to the preview filter dialogue and remove all the rest in the Preview Advanced Settings, since they served no purpose at all.
Myrsloik
1st August 2021, 13:23
The compat formats will be removed in future builds of VS meaning that you'll have to use RGB24 as output and pack the image yourself. You can get the beta builds with this behavior here:
https://forum.doom9.org/showthread.php?t=183070
Zarxrax
13th August 2021, 23:54
I'm not sure if I'm doing this wrong, but I am trying to write a .py script, and it seems that I have to close and reopen my vaporsynth script every time I want to reload a new version. Simply hitting f5 to update the preview doesn't reload the .py script. Not sure if there is a workaround for that, or if not, maybe scripts/plugins could be reloaded each time you preview the script?
It would also be great if when pressing f5 to preview, it would automatically change focus to the video area, so my arrow keys will let me navigate the video. Save a click of the mouse.
And is there any way to change the resize algorithm used for the preview video? Looks like its using point resize. Or alternatively, it would be fantastic if I could press Alt+Enter to pop up a full-screen preview.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.