Log in

View Full Version : VapourSynth Editor


Pages : 1 2 3 [4] 5 6 7 8 9 10 11 12 13 14 15 16

Mystery Keeper
10th April 2016, 15:46
Ah, not washed out. Difference in YUV to RGB conversion. Well, the "problem" is in the script. Personally I don't understand the YUV to RGB conversion, so can't help you.

Boulder
10th April 2016, 15:50
But why does it show correctly in R4, and has no effect in encoding?

Mystery Keeper
10th April 2016, 15:58
Your video is in YUV format. To display it on your monitor in preview frames must be converted to RGB. In R4 it was done internally. In R6 it is done using VapourSynth's plugin "resize". It doesn't affect the encoding because preview doesn't alter the script.

Boulder
10th April 2016, 16:04
The script where I got the screenshots is basically

clp2 = core.resize.Bicubic(clp, width=1280, height=536)
clp = rhq.resamplehq(clp, width=1280, height=536)
clp = core.std.Interleave(clips=[clp2,clp])

Shouldn't the issue affect both clp and clp2?

Mystery Keeper
10th April 2016, 16:06
You're using two different resamplers. They produce two different outputs.

Boulder
10th April 2016, 16:14
But should output almost the exact same luma levels, and also both clips output the same colorspace. Otherwise it wouldn't be possible to output them interleaved. This is what confuses me.

Mystery Keeper
10th April 2016, 16:16
I honestly don't know. Both are previewed the same way. Probably something done internally in resize plugin.

jackoneill
10th April 2016, 17:04
You can see the levels with the Histogram or Videoscope plugins.

Are_
10th April 2016, 18:11
OK my bad, there was indeed a bug in the script, now it should output correct results.
Why encodes were OK and in r4 it was OK too, remains a mystery to me (gist was updated). :(

Mystery Keeper
10th April 2016, 22:25
Just tried r6 on Ubuntu and Fedora today, both give the "Failed to initialize VapourSynth" error, both still work with r5 and process scripts fine.

What I have found out so far: This fails. (https://github.com/vapoursynth/vapoursynth/blob/master/include/cython/vapoursynth_api.h#L123)
Looks like VapourSynth installation quirk.
http://www.vapoursynth.com/doc/installation.html#compilation

l33tmeatwad
11th April 2016, 14:39
What I have found out so far: This fails. (https://github.com/vapoursynth/vapoursynth/blob/master/include/cython/vapoursynth_api.h#L123)
Looks like VapourSynth installation quirk.
http://www.vapoursynth.com/doc/installation.html#compilation
I'm familiar with that issue and how to fix it. The OS installs I tested it on have had that issue fixed and worked fine with r5.

Mystery Keeper
11th April 2016, 14:59
Still, it is an issue of Python not loading "vapoursynth" module. We need to find out why and how to fix it.

jackoneill
11th April 2016, 15:28
diff --git a/src/vapoursynth/vapoursynthscriptprocessor.cpp b/src/vapoursynth/vapoursynthscriptprocessor.cpp
index f60950c..93a7e42 100644
--- a/src/vapoursynth/vapoursynthscriptprocessor.cpp
+++ b/src/vapoursynth/vapoursynthscriptprocessor.cpp
@@ -477,6 +477,7 @@ bool VapourSynthScriptProcessor::initLibrary()

QString libraryFullPath;
m_vsScriptLibrary.setFileName(libraryName);
+ m_vsScriptLibrary.setLoadHints(QLibrary::ExportExternalSymbolsHint);
bool loaded = m_vsScriptLibrary.load();

#ifdef Q_OS_WIN

Found here: https://riverbankcomputing.com/pipermail/pyqt/2007-January/015313.html

l33tmeatwad
11th April 2016, 17:14
diff --git a/src/vapoursynth/vapoursynthscriptprocessor.cpp b/src/vapoursynth/vapoursynthscriptprocessor.cpp
index f60950c..93a7e42 100644
--- a/src/vapoursynth/vapoursynthscriptprocessor.cpp
+++ b/src/vapoursynth/vapoursynthscriptprocessor.cpp
@@ -477,6 +477,7 @@ bool VapourSynthScriptProcessor::initLibrary()

QString libraryFullPath;
m_vsScriptLibrary.setFileName(libraryName);
+ m_vsScriptLibrary.setLoadHints(QLibrary::ExportExternalSymbolsHint);
bool loaded = m_vsScriptLibrary.load();

#ifdef Q_OS_WIN

Found here: https://riverbankcomputing.com/pipermail/pyqt/2007-January/015313.html
Nice find, that fixed it.

Mystery Keeper
11th April 2016, 20:48
jackoneill, thank you very much!

mawen1250
13th April 2016, 14:35
Is there memory leak issue with vsedit?
Every time I refresh preview with F5, the memory used previously won't be released.

Mystery Keeper
13th April 2016, 14:39
Not released at all? Weird. I tested it extensively for the leaks. It did leak due to Python, but not critically. But that was long ago. Is it the same with R5?

mawen1250
13th April 2016, 15:03
R5 is OK. R6 doesn't release at all.

Mystery Keeper
13th April 2016, 15:07
Another question, are we talking R6, or latest commits in git repository?

mawen1250
13th April 2016, 15:27
Just R6, not latest commit.

Mystery Keeper
13th April 2016, 18:00
R7 is here with bugfixes and awesomeness:
-BUGFIX: Bt.601 YUV to RGB conversion matrix. Not sure if it works correctly, but it works.
-BUGFIX: Massive memory leak.
-Late linking to vsscript library. Can start with no VapourSynth installed.
-Better detection of VapourSynth installation on Windows.
-Experimental color picker. Shows values under cursor in preview window. Not thoroughly tested.

Had to rush this release due to huge memory leak in R6. Thus, the color picker many of you wanted so much has not been thoroughly tested. Please report any quirks in its work. Also feel free to give suggestions on improving its usability. However, please do not ask me to also display RGB values on non-RGB video.

Update: Added a link to OSX distribution in the first post.

mawen1250
14th April 2016, 03:56
Wow, thanks for the quick update!

Boulder
22nd April 2016, 17:04
I'm having a small problem with the preview display, it gets distorted if I crop a BD source by 4 pixels of the left or right side. It doesn't affect the encoding at all, the picture's normal in both cases.

Non-cropped: https://drive.google.com/open?id=0BzeF_1syecQwWUZUTk83dF9MMTg
Cropped by 4 pixels off the left side: https://drive.google.com/open?id=0BzeF_1syecQweTRBaEdqZkU2aTQ

Mystery Keeper
22nd April 2016, 20:05
R8 is out with a quick fix for preview stride.

Boulder
22nd April 2016, 20:09
Thanks a lot :)

l33tmeatwad
23rd April 2016, 01:13
I'll update the Mac version Monday.

Sent from my SM-N910V using Tapatalk

~SimpleX~
12th July 2016, 17:00
Added some features to VapourSynth Editor:

Multiline tabs and backtabs (shift + tab). Not smart at all, but useful.
Last viewed frame number save and restore.
Add option to use spaces instead of tabs and option to set tab/spaces length.
Moved portable mode description to portable mode checkbox tooltip.
Some build enhancements.


Take the test build here (http://www.mediafire.com/download/74f2b6v311yyiz6/release-64bit-msvc.rar).
Sent PR to upstream repo (https://bitbucket.org/mystery_keeper/vapoursynth-editor/pull-requests/).

Mystery Keeper
12th July 2016, 17:34
Thank you for your improvements. I have received notifications for your pull requests. I'll get to them. Right now I'm working on the asynchronous (multithreaded) frame requests branch. Expect play, benchmark and CLI encoding features. Though I can not promise when.

~SimpleX~
13th July 2016, 10:05
Yup, okay. I've posted it here because I need some feedback on tab/backtab feature. I've made it work in any position at line (if you select a word and press tab, it'll insert a tab/spaces before that word). Qt Creator in such situation would remove that word.

jackoneill
13th July 2016, 11:24
Pls just pretend the tab character doesn't exist and always indent with spaces.

Mystery Keeper
13th July 2016, 11:41
Yup, okay. I've posted it here because I need some feedback on tab/backtab feature. I've made it work in any position at line (if you select a word and press tab, it'll insert a tab/spaces before that word). Qt Creator in such situation would remove that word.
I actually planned tab to work like that if more than one line is selected. And Shift+Tab for backtabbing.

Are_
13th July 2016, 12:50
Pls just pretend the tab character doesn't exist and always indent with spaces.
Please

Also have a shortcut to convert tabs to spaces.

(And a shortcut to coment/uncoment)

Mystery Keeper
13th July 2016, 13:17
Yeah. I know. I wanted to work on editing features before I made the preview fixes. But had little time back then. It is still high on my list.

~SimpleX~
14th July 2016, 01:01
Pls just pretend the tab character doesn't exist and always indent with spaces.

I always use 4-space indentation everywhere instead of tabs. PEP8 also says to use it. But VS Editor had tab indentation for almost two years! So I won't break it only because I don't like it, thus tabulation with spaces is optional. At least for now. ;)
Please

Also have a shortcut to convert tabs to spaces.

(And a shortcut to coment/uncoment)

Done and done! Multiline comment/uncomment (ctrl + /), "smart home button" (HOME now moves cursor to the start of the non-whitespace text block instead of line start, like in Qt Creator), shortcut to convert tabs to spaces (edit -> convert tabs to spaces).
But well, how would you know script has tabs? Maybe add option to make the conversion on script loading?

Here's the new test version (http://www.mediafire.com/download/b19w448fwk58w1m/release-64bit-msvc-rev2.rar).

Are_
14th July 2016, 11:43
Thank you!

I don't use Windows so I will try it when it gets merged into the main branch.
But well, how would you know script has tabs?
The text editors I have, use visual marks where there are tabs. This is how it looks for
2_TAB
2_TAB
4_SPACES 1_TAB
http://imgur.com/P4eTtE1.png

lansing
15th August 2016, 15:21
I like to request an option to be able to add custom template heading, so that I don't have to add it myself every time I start a new script.

AzraelNewtype
15th August 2016, 23:34
While that would be nice, if you're on windows you can in the interim just edit template.vpy in your vapoursynth install directory, and create the files via the shell extension on right click in explorer. It'll generate copies of template.vpy instead of blank files for you. It's pretty neat. I'm sure the file exists in all installs, but I'm not sure whether there's a similar hook for OSX/linux to make it this trivial.

Mug Funky
16th August 2016, 13:32
Osx and nix have bash scripting. You can do some amazing things using ffprobe and cat'ing some template scripts, replacing a keyword with the filename.

AzraelNewtype
16th August 2016, 22:45
Osx and nix have bash scripting. You can do some amazing things using ffprobe and cat'ing some template scripts, replacing a keyword with the filename.

I mean, sure. Windows has a (much uglier) equivalent too, if that's what you're looking for. It's not really a good replacement for Right Click->Create New VapourSynth Script in terms of being utterly trivial.

lansing
17th August 2016, 00:35
While that would be nice, if you're on windows you can in the interim just edit template.vpy in your vapoursynth install directory, and create the files via the shell extension on right click in explorer. It'll generate copies of template.vpy instead of blank files for you. It's pretty neat. I'm sure the file exists in all installs, but I'm not sure whether there's a similar hook for OSX/linux to make it this trivial.

noo, I'm talking about the template when you click File->new script within the program

AzraelNewtype
17th August 2016, 03:47
noo, I'm talking about the template when you click File->new script within the program

...yes. I know. I was giving you an option for a temporary workaround until it's implemented (assuming Mystery Keeper is even interested).

Selur
3rd September 2016, 14:00
Would be nice if VapourSynth Editor could have any command line switches to:
a. allow to directly open a script inside the preview
b. start with a specific paths for library and plugin paths.
c. not save the settings at all
also if Vapoursynth editor could be controlled over a localsocket (http://pastebin.com/iYiMpP83) would be the bomb. :)

Background: I'm looking into adding a preview of VapourSynth scripts into my tool (Hybrid) and thought about writing a simple viewer, but since Vapoursynth Editor already can do so much, I thought I should ask whether it could get some extensions,..

Mystery Keeper
3rd September 2016, 15:49
Maybe sometime in the future. Could you please elaborate how you would use such features? Especially the localsocket control.

Selur
3rd September 2016, 18:39
In a first step I would send updates from Hybrid to the editor whenever Hybrid generated another script. :)
Wrote that today, see: http://pastebin.com/Ssg4h6tt, there I modified the source to

compile in Qt Creator with current VS C++ version
to accept two parameters which tell to whom it should listen via a localsocket

to interpret a command "changeTo## PATH_TO_NEW_VPY_INPUT" in a way that it would load the specified source and preview it (instead of sending a simple string one should probably send some sort of specified xml/json formatted string)

to accept a parameter which tells it to preview-only a source (this also tells the program to hide the main window)

The next steps I plan to add to the sources are:

modify the changeTo interpretation in a way that only when the preview is already open the new file will also be previewed
send any errors that occurred during the script over the socket connection (to Hybrid or whoever is at the other end)
to use the cropping help inside the Preview and feed the cropping settings back over the socket connection (to Hybrid or whoever is at the other end)
put the whole thing up on github so others can use the code

(side note: the code above it mainly meant for testing whether I could really use the Vapoursynth Editor source as I planned)

The main goal would be to have some way for other tool developers to interact with the Vapoursynth Editor.

Cu Selur

Ps.: uploaded the initial modified version (see patch above) to https://github.com/Selur/vapoursynth-editor

Mug Funky
7th September 2016, 04:21
maybe this has been asked already (too lazy to read the thread back), but i've a weird problem with vsedit in ubuntu.

if i run it, i don't get the option to f5 or f6 or even ctrl+s to save, preview, check etc.

if i run it with sudo, the menu bar appears on the dialog rather than the top of the screen (as unity loves to do), and the shortcut keys work.

i have no idea what's going on there and it's likely not strictly a vsedit issue (and it's certainly not a show stopper), but i'd be interested to know if there's anything that could be done to make vsedit and unity get along a little better so i don't have to use sudo to get shortcut keys.

Mystery Keeper
7th September 2016, 14:35
Never heard of such thing. I would guess broken Qt.

Selur
10th September 2016, 15:00
wild guess: when not running as root there is another application running with higher rights that is capturing the signal,...

Mystery Keeper
16th September 2016, 00:18
Windows 64-bit build with play feature and more responsive GUI. (https://bitbucket.org/mystery_keeper/vapoursynth-editor/downloads/vapoursynth-editor-64bit-play.7z)
Feel free to try, give feedback and suggestions.

Selur
16th September 2016, 04:15
some small general glitches I noticed:
* The YUV component indication of the color picker should get a fixed size to avoid a wiggling when colors change.
* When switching to 'crop view' the preview zoom isn't kept. (annoying on a high resolution screen)
* Normal zoom control should be disabled during 'crop view' since only the zoom inside the crop pane has any effect.
* option to increase the text size of the numbers over the timeline would be nice. (annoying small on a high resolution screen

Mystery Keeper
16th September 2016, 05:34
* The YUV component indication of the color picker should get a fixed size to avoid a wiggling when colors change.I'll think about it. Problem is: it can get long on high bitdepth.
* When switching to 'crop view' the preview zoom isn't kept. (annoying on a high resolution screen)Done with my own workflow in mind. I usually go x1 on preview, but use zoom when cropping. Would you like an option to synchronize preview fixed zoom with crop zoom?
* Normal zoom control should be disabled during 'crop view' since only the zoom inside the crop pane has any effect.Can do.
* option to increase the text size of the numbers over the timeline would be nice. (annoying small on a high resolution screenYou can do that in the theme settings. Edit "Timeline labels".

Any thoughts about the play functionality and changed GUI responsiveness?