View Full Version : VapourSynth Editor
Pages :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
[
15]
16
lansing
29th July 2020, 19:24
Some idea - using zoom as crop and zoom in for previewing rgb clip. This way zooms-in perform even faster than original resolutions. Keeping track for CropAbs() values in memory, values are always relative to original resolution. Then one button could be dedicated to just return to previous zoom. I do it that way. Always performing crops and zooms for all clips so clips could be compared (if loaded more clips) in any zoom state.
vseditor uses Qt's QPixmap.scale for zooming, I'll see if there's any image cropping function in Qt.
lansing
29th July 2020, 19:28
Well I once stacked 24 openings together to find differences :p
How? Like like 6 x 4 stack? But then where does 0.1x zoom comes in?
ChaosKing
29th July 2020, 19:43
How? Like like 6 x 4 stack? But then where does 0.1x zoom comes in?
More or less yes. I needed to see every video at once on my screen. (I could have resized them but this was quicker :P)
I'm just saying why not allow smaller values by manual input, it is an unnecessary restriction.
I tested the zoom with mouse control now, and I like it :)
Could you also fix the old and annoying bug in "encode video"? It always sets the Header setting to "no header" instead of "Y4M" (you need to close and start vsedit)
lansing
29th July 2020, 21:03
I'm just saying why not allow smaller values by manual input, it is an unnecessary restriction.
I'll think about it, maybe a constant step when zooming with mouse or keyboard and allowing custom values when entering by hand.
Could you also fix the old and annoying bug in "encode video"? It always sets the Header setting to "no header" instead of "Y4M" (you need to close and start vsedit)
I have never tried the encode feature, I don't even know how it works. I loaded in a script from the editor and the x264 exe, when I click start it said "no input file"?
And does video encoding always come attached with a "Y4M" header? If it is then I'll make a global setting to remember it, if not then I'll make it savable with preset.
poisondeathray
29th July 2020, 21:25
I have never tried the encode feature, I don't even know how it works. I loaded in a script from the editor and the x264 exe, when I click start it said "no input file"?
You need to enter the encoder arguments in the box
eg.
- --demuxer y4m --crf 18 --muxer mkv -o "output.mkv"
And does video encoding always come attached with a "Y4M" header? If it is then I'll make a global setting to remember it, if not then I'll make it savable with preset.
Not if it's rawvideo
Y4M includes header info, like fps, dimensions, pixel format for YUV formats. Those entries must be entered on the encoder side when piping raw video (e.g. maybe for an RGB script) , so Y4M is usually preferred when piping YUV. Y4M header in vsedit is the same thing as vspipe --y4m , it refers to the headers for the stream that is input into the encoder
lansing
29th July 2020, 21:46
You need to enter the encoder arguments in the box
eg.
- --demuxer y4m --crf 18 --muxer mkv -o "output.mkv"
How do I put in the script as input?
ChaosKing
29th July 2020, 23:10
Simple example
https://i.imgur.com/Hulhrj2.png
Or use my config with some presets (you'll notice that header_type is = 1 but is set to 0 when you open the enc window)
https://github.com/theChaosCoder/vapoursynth-portable-FATPACK/blob/master/VapourSynth64Portable/VapourSynth64/vsedit.config
lansing
30th July 2020, 00:04
Simple example
https://i.imgur.com/Hulhrj2.png
Or use my config with some presets (you'll notice that header_type is = 1 but is set to 0 when you open the enc window)
https://github.com/theChaosCoder/vapoursynth-portable-FATPACK/blob/master/VapourSynth64Portable/VapourSynth64/vsedit.config
Okay I got the encoding running. The headertype was saved with preset for me. When I loaded the preset the headertype was also loaded.
lansing
30th July 2020, 05:46
A fixed build here (https://www.mediafire.com/file/711jdj25vb2e273/Vapoursynth+Editor+test9.1-build-64bit-gcc.7z/file).
- Fixed wrong zoom ratio step when controlled by arrow keys
- Added a close all function and button in the tool bar
- Fixed a bug where bookmark manager doesn't change with tab change
For the zoom step I have decided to keep it like this with 0.2x being the minimum because it's reasonably small already and normal people just don't go inputting 0.13x on their own.
For the missing icons...it's hard to find the right one when there's 1000 icons in the package (http://www.famfamfam.com/lab/icons/silk/).
For the laggy zooming navigation problem, I've tried with a fixed widget size of the pixmap itself and the container, both didn't do anything, so I don't think it can be resolved on the Qt side. It would need to be from the script side like the way _AI_ mentioned.
ChaosKing
30th July 2020, 07:21
Cosmetic bug:
I open a new script ( 2 tabs ): App title bar shows: "abc.vpy". I click on close all tabs => abc.vpy is still shown.
Okay I got the encoding running. The headertype was saved with preset for me. When I loaded the preset the headertype was also loaded.
Here is my test: https://i.imgur.com/dznAd6S.gif
Y4M is not set after app restart for me.
lansing
30th July 2020, 18:59
New fix up (https://www.mediafire.com/file/rmmss3ogyv1ufar/Vapoursynth+Editor+test9.2-build-64bit-gcc.7z/file). Both issues fixed. I also added a few checks to prevent bookmark manager from crashing on empty scripts.
- Encoding preset selection now auto saved
fAy01
30th July 2020, 19:26
Is it possible to have a layout similar to avspmod?
lansing
31st July 2020, 03:15
I started my own thread on my fork here (https://forum.doom9.org/showthread.php?t=181708).
stax76
31st July 2020, 18:28
For the continuation of the project, I think I'll do what Staxrip and Staxrip 2 did and rename mine to vseditor 2.
The staxrip name was never changed, there were only maintainer/repo/site changes, the current repo/site can be found in my signature, there are two admins, one inactive.
shph
23rd August 2020, 00:08
I would really appreciate if you contribute icons for the project. That includes application icon (SVG which scales well to 16x16) and buttons/menu icons (16x16 PNG).
Hi there. How about to update VS viewer icons based on something like modified SF Apple Symbols?
https://www.avanderlee.com/swift/sf-symbols-guide/
"SF Symbols were introduced during WWDC 2019 and are a big present for us developers. Apple basically gave us free symbols to use in our app and it’s even really easy to use them as well! With SF Symbols 2.0 being introduced in WWDC 2020 we’ve got even more possibilities to show beautiful icons in our apps."
"SF Symbols is a set of over 1,500 symbols that you can use in your app. They’re aligned and configurable in a wide range of weights and scales to adapt to your designs. As they are integrated into the San Francisco system font they automatically ensure optical vertical alignment with text for all weights and sizes."
You may see my another slowly moving customization project based on those icons here: https://www.pl32.com/forum3/viewtopic.php?f=3&t=6302&start=30
Here is my sketch for VapourSynth Editor. All icons are in vector format, but manually redrawn and optimized for 16x16 pixel grid size. If it possible, you may add some svg icons support for UI in future, so icons will look sharp on on hi-dpi retina-like displays. Let me know what you think. I can provide icons in PNG format as well.
https://i.imgur.com/k9jDNzf.jpg
jmartinr
23rd August 2020, 09:35
Hi there. How about to update VS viewer icons based on something like modified SF Apple Symbols?
I don't see how that's possible.
Can I use the symbols everywhere?
No, definitely not! Keep an eye sharp on the license agreements that apply. As quoted from Apple:
You may not use SF Symbols—or glyphs that are substantially or confusingly similar—in your app icons, logos, or any other trademark-related use. Apple reserves the right to review and, in its sole discretion, require modification or discontinuance of use of any Symbol used in violation of the foregoing restrictions, and you agree to promptly comply with any such request.
shph
23rd August 2020, 10:23
But i don't use them as "app icons, logos, or any other trademark-related use"
They used only as signs for buttons inside app.
l33tmeatwad
23rd August 2020, 20:02
But i don't use them as "app icons, logos, or any other trademark-related use"
They used only as signs for buttons inside app.It really serves no purpose aside from cosmetics and just puts the developer at risk of legal action. If you want to modify it yourself for personal use the source is available.
shph
23rd August 2020, 23:36
okay...
Too bad that in compiled version icons are hardcoded somewhere deep inside but not in "Resources" folder inside app contents.
AOmundson
12th March 2021, 16:33
I'm attempting to upscale a 720x480 8-bit video using Waifu2x-Vulkan, and output a 10-bit video. But I'm unsure how to accomplish this. In addition, the current output is noticeably stretched horizontally in comparison to the original video file, and the interlacing is much more pronounced when the footage is in-motion.
VapourSynth Editor Code:
import vapoursynth as vs
core = vs.get_core()
clip = r'D:\Video\title_t02.mkv' #replace with your video file
clip = core.ffms2.Source(clip)
#this is for converting the video to 32 bit float which the plugin needs
clip = core.fmtc.resample (clip, css="444")
clip = core.fmtc.matrix (clip, mat="601", col_fam=vs.RGB)
clip = core.fmtc.bitdepth(clip, bits=32)
#see plugin github page for what the arguments (settings) do
clip = core.w2xnvk.Waifu2x(clip, noise=2, scale=2, model=0, tile_size=180, gpu_id=0, gpu_thread=0, precision=32)
#convert back to 8bit so we get the correct output for encoding
clip = core.fmtc.matrix (clip, mat="601", col_fam=vs.YUV, bits=32)
clip = core.fmtc.resample (clip, css="420")
clip = core.fmtc.bitdepth(clip, bits=8)
#Press F5 to preview
#Press F8 to encode
#Set header to Y4M, ffmpeg as the executeable and the string itself should look like this
#-i pipe: -c:v libx264 -crf 18 -y test.mp4
clip.set_output()
The video source is an anime DVD ripped using MakeMKV.
Izuchi
15th March 2021, 08:06
If you're seeing interlacing artifacts you should deinterlace/IVTC first.
vigan1
10th May 2021, 12:10
Hello Mystery Keeper when I try to build vsedit I have this error on ubuntu 20.04 when I want to launch it :
https://i.postimg.cc/HsKnTNdN/Screenshot-from-2021-05-10-13-09-16.png
https://i.postimg.cc/jjvLYS5H/Screenshot-from-2021-05-10-13-14-53.png
I DID :
sudo apt install qtchooser (needed for qmake)
git clone https://bitbucket.org/mystery_keeper/vapoursynth-editor.git
cd vapoursynth-editor/pro
sudo qmake pro.pro
make -j4
Thank you.
Mystery Keeper
10th May 2021, 12:36
You somehow got it built as shared library instead of application. Sorry, I've got no idea what's the case. Might need to see, what happened to Qt, and update the project files.
vigan1
10th May 2021, 12:44
Thank you.
Can you make an appimage for linux user ? Is it possible ? It would be so useful for us compared to Windows user we really have not a single way to have acces to great video tools. I can't get a temporal denoiser that work at 16bit. I know handbrake offer nlmeans but it can only encore to 12bit files. Blender do not provide noise reduction for video, only for renders. And shotcut is 8-bit timeline and render. Kdenlive is so buggy.
FFmpeg is perfect but BM3D implementation is only spatial and not temporal...
I wanted to use BM3D as a temporal denoiser (best open source denoiser) and only vapoursynth offer this option.
I know there is the flatpack but when I install it i have this issue :
https://i.postimg.cc/Z5P5S5Rf/Screenshot-from-2021-05-10-13-39-01.png
Jukus
10th May 2021, 16:48
It would be so useful for us compared to Windows user we really have not a single way to have acces to great video tools
The easiest way is to use Arch https://aur.archlinux.org/packages/?O=0&K=vapoursynth The other thing is that using Arch can be tricky ¯\_(ツ)_/¯
There's also https://deb-multimedia.org/
vigan1
10th May 2021, 17:38
The easiest way is to use Arch https://aur.archlinux.org/packages/?O=0&K=vapoursynth The other thing is that using Arch can be tricky ¯\_(ツ)_/¯
There's also https://deb-multimedia.org/
I used manajaro (gnome) a little bit before settling on ubuntu. Because it was a little more stable (sometime on manjaro the terminal would not open, and small little bug like this) but as I use ubuntu more and more there is also some bugs. So I might just go full arch linux in a near future.!!! The only thing I miss in ubuntu is the AUR from arch, it's the best thing that I found on linux. Ppa from ubuntu are not even as varied and as well maintained to be even fair.
By the way I tried the deb-multimedia before building vapoursynth and the editor, but it seems to only work on debian. Because it tells me there is a dependency that will never be satisfiable, and I tried looking for this libass9 on ubuntu it does not exist :
https://i.postimg.cc/MTsCvj4t/Screenshot-from-2021-05-10-18-32-06.png
https://i.postimg.cc/gcxz3YDr/Screenshot-from-2021-05-10-18-36-02.png
vigan1
11th May 2021, 11:51
HI guys is there a way to use vapoursynth without vapoursynth editor ?
poisondeathray
11th May 2021, 15:12
HI guys is there a way to use vapoursynth without vapoursynth editor ?
In what way ? Such as a preview for feedback ?
You can use vspipe to ffplay (or if ffplay has vapoursynth demuxer compiled, use it directly) , or mpv to preview
vigan1
11th May 2021, 15:54
Thank you for the answer, I am on linux by the way. I would love to be able to preview with mpv (I use it on my system).
If I understand correctly VSPIPE is part of vapoursynth. I succesfully compiled vapoursynth on my system. Is there a tutorial on how to use it ?
But how can I run vapoursynth scripts now ? How can I even test to see if vapoursynth is installed correctly ?
EDIT : I just tested FFplay is on my install !
ffplay video.mp4
works fine !
If I understand correctly VSPIPE is part of vapoursynth. I succesfully compiled vapoursynth on my system. Is there a tutorial on how to use it ?
http://www.vapoursynth.com/doc/gettingstarted.html#output-with-vspipe
But how can I run vapoursynth scripts now ? How can I even test to see if vapoursynth is installed correctly ?
vspipe --version
As you can see on the documentation page you can feed vspipe output to anything for encoding or previewing (as far as it supports y4m streams).
Ofc I still think vsedit is a better workflow for previewing anything as it can easily keep a given frame for preview if your only problem are those warnings I would just ignore them.
vigan1
11th May 2021, 19:19
Hi I think Vapoursynth is succesfully installed vspipe --version return this :
VapourSynth Video Processing Library
Copyright (c) 2012-2021 Fredrik Mellbin
Core R53
API R3.6
Options: -
I cant use vspipe with an rgb file it seems :
Error: Can only apply y4m headers to YUV and Gray format clips without alpha
I would love to use vsedit but I can't compile it on Ubuntu 20.04, I am waiting for Mystery Keeper to see if he can do something ;)
if your only problem are those warnings I would just ignore them.
Thanks. And no it's a flatpak version (flatpak are like apps running in a container), on this version I can't add library for it to find plugins (it seems it can't acces some folders on the system)
poisondeathray
11th May 2021, 20:15
You can pipe rawvideo with vspipe for RGB
Since there are no headers, you usually have to enter the info in the receiving application - such as the pixel format, fps, dimensions
poisondeathray
11th May 2021, 20:28
You can pipe rawvideo with vspipe for RGB
Since there are no headers, you usually have to enter the info in the receiving application - such as the pixel format, fps, dimensions
eg. sample rgb script
import vapoursynth as vs
core = vs.get_core()
clip = core.std.BlankClip(fpsnum=24, fpsden=1, length=1200, format=vs.RGB24, color=[0, 0, 0])
clip = core.text.FrameNum(clip)
clip.set_output()
vspipe to ffplay
vspipe script.vpy - | ffplay -f rawvideo -pixel_format gbrp -video_size 640x480 -framerate 24 -i -
vigan1
11th May 2021, 21:17
Thank you so much. Here is what I want to do. I want to use BM3D at 16bit float internal processing, and send it to FFmpeg to be encoded to a 16bit float RGB PNG sequence. What should I do ?
I don't even know if the code for BM3D is ok.
import vapoursynth as vs
import mvsfunc as mvf
core = vs.core
#core.max_cache_size = 8000
clip = core.lsmas.LWLibavSource(source=r"/home/desktop/input.mkv")
clip = mvf.BM3D(clip, sigma=60.0, profile1="fast", radius1=1)
clip.set_output()
vspipe BM3D.vpy - | ffmpeg -i rawvideo -pixel_format gbrp -video_size 1920x1080 -framerate 30 output_%04d.png
poisondeathray
11th May 2021, 22:39
Thank you so much. Here is what I want to do. I want to use BM3D at 16bit float internal processing, and send it to FFmpeg to be encoded to a 16bit float RGB PNG sequence. What should I do ?
I don't even know if the code for BM3D is ok.
import vapoursynth as vs
import mvsfunc as mvf
core = vs.core
#core.max_cache_size = 8000
clip = core.lsmas.LWLibavSource(source=r"/home/desktop/input.mkv")
clip = mvf.BM3D(clip, sigma=60.0, profile1="fast", radius1=1)
clip.set_output()
vspipe BM3D.vpy - | ffmpeg -i rawvideo -pixel_format gbrp -video_size 1920x1080 -framerate 30 output_%04d.png
Adjust the settings (vsedit would be nice for feedback) until you're happy. If you can't get vsedit to work, use ffplay or mpv. Otherwise you can't tell if you're using the correct settings (maybe to strong denoise, maybe too weak, maybe you need other filters like sharpen etc....)
After your filters, convert to 16bit RGB and pipe 16bit RGB instead of 8bit RGB . It would look something like this
clip = core.resize.Bicubic(clip, format=vs.RGB48)
The pixel format in ffmpeg would be "gbrp16le" instead of "gbrp"
For my earlier simple example it would look something like this
vspipe blankclip.vpy - | ffmpeg -f rawvideo -pixel_format gbrp16le -video_size 640x480 -framerate 24 -i - -start_number 0 output_%06d.png
poisondeathray
11th May 2021, 22:53
Another preview option is "view" from _Al_
https://forum.doom9.org/showthread.php?t=181553
https://github.com/UniversalAl/view
vigan1
12th May 2021, 21:20
Thank you I tested your ffmpeg script and it works fine I have 16bit (integrer) PNG files. Each frame from a 1080p video is 6.2mb !!!! Almost impractical.
I will use it for short sequences (for long sequence I will encode to x265 10-bit) but it's true that rendering to see if the image is nicely processed is time consuming.
I reinstalled ubuntu and tried rebuilding vsedit, still no success..
I will try view.py. I hope it will work, instead of using vapoursynth-editor it seems it just need a Python IDE, I should past the vpy script there and clic "run" to make the view.py windows show up.
I will try to see if it works. Thank you for the suggestion and the help. You might see me back ;)
vigan1
14th May 2021, 00:44
Hi guys I have a good news.
Today I upgraded from ubuntu 20.04 to 21.04, and after many trials and error I could get everything running !
So Mystery Keeper nothing wrong with the code or QT it compiles fine on ubuntu 21.04. The problem must lie with the cumulative updates for 20.04 must have gotten wrong somewhere along the months.
I kept 20.04 up to date with many update, so it may work fine on an old 20.04 iso, but not on the updated version !!!!!!!!!!
And now on a fresh 21.10 :
https://i.postimg.cc/K8D0KTtk/Screenshot-from-2021-05-14-01-31-13.png
I kinda find a bug on the vapoursynth build, but I need to confirm it :
- If i run : ./autogen.sh before ./configure : I can still make and sudo make install, but vspipe -v would not find vapoursynth installed. And vsedit would tell me it can't find the vapoursynth library.
I needed to run ./configure then ./autogen.sh to be able to install vapoursynth ! What do you think ?
Thank you to all of you who helped me !
Mystery Keeper
14th May 2021, 08:56
Thanks. But I'm still wondering how could you build it as a shared library.
vigan1
14th May 2021, 10:02
I don't know. But it's probably the QT libraries on 20.04.2 (the version I had after updates) which got corrupted along the way, maybe ? I followed the same steps on ubuntu 21 and it worked fine !
Maybe it's the small updates each 2 weeks or so, which corrupted QT, I will probably never update after a working install ever. If it works I will keep it that way and disable every update that may break a system. (ironically, much like I would do on windows 10 ;) )
Almost 5 posts before I was talking about how Ubuntu is way more stable than Arch/Manjaro.......... I guess I was wrong, sorry Arch users, I will join you when I find the time !
EDIT : YOU WILL NEVER BELIEVE IT, but minutes after I finished typing this post, I wanted to minimize firefox, and the whole system froze/bugged and I got logged out !!!! I know 21.04 swiched to wayland from Xorg, it might be why. But that timing ! it's almost like ubuntu got angry I wanted to switch to Arch lol.
ognirats
1st October 2021, 13:57
very basic question: how do i render it into a file
edit: never mind i found out
l33tmeatwad
1st October 2021, 20:57
For anyone that builds this for themself on macOS, it appears that Qt 5.10+ will have a weird issue on a multi-monitor setup where it will only LAUNCH from the primary monitor (it can still be dragged to any monitor, but the shortcut used to open it can only be located on the monitor designated as the primary monitor). The only version of Qt I have confirmed works fine is 5.6.
Yomiko
1st October 2021, 21:43
For anyone that builds this for themself on macOS, it appears that Qt 5.10+ will have a weird issue on a multi-monitor setup where it will only LAUNCH from the primary monitor (it can still be dragged to any monitor, but the shortcut used to open it can only be located on the monitor designated as the primary monitor). The only version of Qt I have confirmed works fine is 5.6.
What may happen if launching from console?
l33tmeatwad
1st October 2021, 21:48
What may happen if launching from console?Does not matter, if it's launched on any screen other than the primary it won't launch. You can change the primary and it will work on that monitor, or you can launch on the primary and drag it over, but if the OS is trying to launch it from not the primary monitor it does not.
Yomiko
1st October 2021, 23:57
I suppose other Qt programs don't have the same problem, such as Texmaker (https://www.xm1math.net/texmaker/download.html with Qt 5.15.2)
So it should be possible to modify something in VSEditor to suppress this issue.
Anyway, I cannot contribute anything before having a Hackintosh.
l33tmeatwad
2nd October 2021, 02:56
It's hard to say what causes it, on the setup I was using there were three different kinds of monitors so that could have played into it as well. I actually still need to report the bugs compiling mod 2 & 3 as well... Hopefully I find some time next week to troubleshoot.
Jukus
20th January 2022, 01:00
I tried to compile for Debian
https://www.l33tmeatwad.com/vapoursynth101/software-setup#h.p_We8vNVDLfSaf
C. VapourSynth Editor
1. Browse to the installs folder:
cd $HOME/.installs
2. Download VapourSynth-Editor:
git clone https://github.com/YomikoR/VapourSynth-Editor
3. Browse to the new folder:
cd $HOME/.installs/vapoursynth-editor/pro
4. Run the following commands to install VapourSynth-Editor:
Debian & Pacman:
qmake pro.pro
make
../../common-src/helpers.h:4:10: fatal error: vapoursynth/VapourSynth.h: No such file or directory
4 | #include <vapoursynth/VapourSynth.h>
How to fix it?
l33tmeatwad
20th January 2022, 01:13
I tried to compile for Debian
https://www.l33tmeatwad.com/vapoursynth101/software-setup#h.p_We8vNVDLfSaf
../../common-src/helpers.h:4:10: fatal error: vapoursynth/VapourSynth.h: No such file or directory
4 | #include <vapoursynth/VapourSynth.h>
How to fix it? It looks like the header files aren't found, which is odd, you could edit those files with the exact path.
Jukus
21st January 2022, 17:38
It doesn't work even if add the file on purpose, it still says it doesn't exist
l33tmeatwad
21st January 2022, 18:46
Okay, so I just spun up a Deban 11 VM to test this out and ran into no issues setting up everything up. Can you make sure VapourSynth is setup and working properly? Try:
vspipe -v
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.