Cool!
Where exactly is the mpv command for SVPCode generated?
I found some stuff regarding bitrates etc. in the settings manager but no --ofps
Is that part of the code generally closed, or am I just not finding it in the scrtips
You are not logged in. Please login or register.
SmoothVideo Project → Posts by smooth-motion
Cool!
Where exactly is the mpv command for SVPCode generated?
I found some stuff regarding bitrates etc. in the settings manager but no --ofps
Is that part of the code generally closed, or am I just not finding it in the scrtips
Hey Chainik, I have a quick question about SVP Code.
I would like to edit the the mpv command SVPCode uses in order to remove "--ofps=60", as it is deprecated and I can't use the lower git version as I have embedded the newer release into a remastersys iso which already shipped out.
The SVP Control Panel Settings do not seem to offer this specific option and I couldn't find anything in the scripts.
Now I tried to negate --ofps by adding the "--null" in the mpv_args section, which should negate the mpv option which has been designated, but I get an error.
Is there any other way to accomplish this?
Thanks for the hints, pointing to SVTube actually works fine, I didn't expect that.
But could you be a little more specific on SVPCode, in what files or dirs is the command generated?
....
really annoying that you're always right btw, you know that? o.O
I compiled it and it didn't work, but the built packages from the repo did, thought I had you this time.
Anyways, I have one more tough cookie, that might finally break you.
I want to edit the mpv commands that SVP uses for SVPCode and SVPTube, how can it be achieved?
Checked every single script and where or rather when the commands are generated.
Hey Chainik, it's me, Mario.
I have noticed that SVPTube does not appear in the SVP Panel despite having selected it during installation on Ubuntu 18.04.
In the past the cause of this was a lack of libpython >=3.5, which is confirmed by the fact that SVPTube does appear on 16.04 by installing it from the deadsnakes repository.
On 18.04 the min default package installed from the ubuntu main repo is already libpython3.7 and 3.6, not offering an installation candidate for version 3.5 from the deadsnakes repo.
Now to be sure I compiled it using the source provided by deadsnakes and created symlinks, but it still won't appear.
Have you made similar findings, and what command does SVP use to launch it's own youtube-dl extension and refer to libsvptube?
You don't necessarily need such a powerful CPU when you have gpu acceleration enabled and can tolerate slightly lower settings, but the processor in question here would thermal throttle from playing tetris.
The OSD sometimes does not report the correct value for targets higher than 60FPS, I had a similar issue.
The terminal output almost always depicts the actual FPS.
Use the "Fixed 75FPS" option in the SVP Panel.
playing at 75.4286 [24 *22/7]
Just wanted to share my script to execute the transcoding command against any file located in the specified working directory --> OP updated.
Note: You have to change the container so that it differs from the source, or choose a different directory for the output.
#!/bin/bash
for f in /home/donald/clips/*$f; do mpv "$f" -o "$f.mkv" --ovc=h264_nvenc --vf=vapoursynth:/home/donald/60fps.vpy:4:16 --ovcopts=b=55055051,rc=vbr_hq,preset=slow,profile=high,threads=16; done
Yes, it works with SVP, just checked, but I had to add a second script which halts by n-2, renames the last output and recommences script 1 with a for loop.
I am now trying to do it cleaner, with a single bash script.
mpv allows multiple instances, I am now figuring out how to designate -o with a static pointer for each filename + an extra string like "1" or "a" descending.
Ok, let me explain a little better.
I have a Youtube Channel where I upload the best sports highlights of the week. Basically, I take a bunch of clips, append them, add transitions, some music and do some minor editing.
Interpolating each clip individually would be a real pain, even though it might be possible with a script that would perform the mpv transcode command with every single clip in a folder......huh could that work actually?
Something like mpv *.mp4 or from a subdir, I guess it would fail with the output file, unless you can specify a static prefix ---> I will check the mpv documentation.
Anyways, I have to render the project in 1080p60FPS because the transitions/effects look choppy otherwise
But as I mentioned, the SVP script will not engage since the source frame rate reports >59.9FPS
Now I have tried to enable the option of a variable framerate, even recompiled kdenlive from scratch, looking for any ever so tiny hint of that f*cking functionality, but nope. Only available in Adobe Premiere Pro, but the day I use Windows I must be in a hostage situation.
Would SVP even be able to recognize the portions with 24FPS in a file with a variable framerate?
I always thought that the script inspects and intuitively interpolates scenes with motion, so basically editing the >59.9 FPS threshhold condition should have solved the problem, but I was wrong, apparently.
faster encoding -> more GPU utilization
Hey man, I wonder if your superman skills have met their kryptonite with this one, because I have lost years of my life over it.
Let's say you take 5 separate video clips with a 1080p resolution and framerate of 24FPS, put them together in a video editor and render them with a 1080p60FPS project profile.
The resulting output file will report 60FPS even though the clips are still 24FPS, due to a constant framerate forcibly having to be set up.
Now when one tries to interpolate/transcode this file with SVP, the interpolation/transcoding will fail as the script reads the reported 60FPS and exits.
Is there a way to make SVP recognize the parts with 24FPS material, even though the file reports 60FPS, or to commence interpolation of the entire file, regardless of the reported 60FPS?
Changing the "else" argument that decides whether or not to continue when the source is >59.9 doesn't work.
(The reason why the project profile has to be 60FPS is because of effects/transitions need to be rendered at 60FPS) (Rendering them also at 24FPS and having SVP interpolate the entire thing doesn't work, because there is text involved and it gets messed up, no matter how much artifact masking etc)
If you can solve this, then I would like to buy some shares of SVP and name my first born son Chainik.
You are absolutely right, sorry for picking up slow, I am still learning as I go about.
I really love this stuff though, is there anything I can do on the Linux end with/for SVP?
Not an expert, but I am trying, haha.
Sure, but the primary focus is more GPU Utilization.
I have read the documentations and gathered all the info I could on the forum, regarding the script parameters in question, which led me to achieve 60% Utilization at max.
How to achieve 90% - 100% Video Engine Utilization?
Hey Chainik, I have some more details to report.
Transcoding works fine, with about 40% - 50% Video Engine Utilization and 80% - 90% CPU usage.
My goal now is to increase Video Engine Utilization to the maximum, while retaining quality.
Without using SVP Panel to modify the interpolation options, I have been editing ffff.py and override.js to change interpolation parameters in order to speed up transcoding.
With the following values I can achieve 60% Video Engine Utilization and an average of 174FPS during transcoding.
super_params = "{scale:{up:0},gpu:1,rc:true}"
analyse_params = "{block:{w:8,overlap:0},main:{search:{coarse:{distance:-12,bad:{sad:2000}},type:2}}}"
smoothfps_params = "{gpuid:11,rate:{num:5,den:2},algo:13,scene:{blend:true,mode:0}}"
[vo/lavc] Opening encoder: NVIDIA NVENC H.264 encoder [h264_nvenc]
[encode] Opening output file: /home/donald/Downloads/default
[encode] Opening muxer: Matroska [matroska]
V: 00:00:27 / 00:02:06 (21%) {0.6min 172.2fps 334.6MB}
When using the command without --vf option, Utilization shoots up to 100% with about 230FPS, so there must still be room for improvement.
[vo/lavc] Opening encoder: NVIDIA NVENC H.264 encoder [h264_nvenc]
[encode] Opening output file: /home/donald/Downloads/default
[encode] Opening muxer: Matroska [matroska]
V: 00:02:06 / 00:02:06 (99%) {0.0min 235.2fps 131.9MB}
Do you have any suggestions on how to accomplish even more Engine Utilization by editing certain parameters in the various scripts?
1.)Clone the latest git of mpv, which will contain build scripts for libass and ffmpeg.
Follow the instructions on this website, regarding the necessary dependencies to compile mpv.
https://github.com/mpv-player/mpv-build
2.)In order for nvenc to be supported, the option must be enabled in ffmpeg.
cd into /mpv-build and execute the following commands. (The first three are mandatory for encoding to work in general)
echo --enable-libx264 >> ffmpeg_options
echo --enable-libmp3lame >> ffmpeg_options
echo --enable-libfdk-aac >> ffmpeg_options
echo --enable-nvenc >> ffmpeg_options
echo --enable-cuvid >> ffmpeg_options
3.)You must clone the nvenc headers git and make/install
git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git
make
sudo make install
4.) Install libvapoursynth-dev from the djcj/vapoursynth repository
https://launchpad.net/~djcj/+archive/ubuntu/vapoursynth
5.)Add vapoursynth support by executing the following:
echo --enable-vapoursynth > mpv_options
6.)Execute the following:
./rebuild -j4
Don't panic, the script might fail because you forgot to install a dependency.
This output will pop up, detailing the options/packages that have been enabled/disabled or not found
Should an essential package not have been found, check which one and it's version number, install it and run ./rebuild -j4 again.
Checking for compiler flags -Werror=implicit-function-declaration : yes
Checking for compiler flags -Wno-error=deprecated-declarations : yes
Checking for compiler flags -Wno-error=unused-function : yes
Checking for compiler flags -Wempty-body : yes
Checking for compiler flags -Wdisabled-optimization : yes
Checking for compiler flags -Wstrict-prototypes : yes
Checking for compiler flags -Wno-format-zero-length : yes
Checking for compiler flags -Werror=format-security : yes
Checking for compiler flags -Wno-redundant-decls : yes
Checking for compiler flags -Wvla : yes
Checking for LGPL (version 2.1 or later) build : disabled
Checking for GPL (version 2 or later) build : yes
Checking for internal audio filter chain : yes
Checking for mpv CLI player : yes
Checking for shared library : disabled
Checking for static library : disabled
Checking for static build : disabled
Checking for whether to include binary compile time : yes
Checking for whether to optimize : yes
Checking for whether to compile-in debugging information : yes
Checking for manpage generation : no (missing RST2MAN)
Checking for html manual generation : disabled
Checking for pdf manual generation : disabled
Checking for dynamic loader : yes
Checking for C plugins : yes
Checking for zsh completion : disabled
Checking for inline assembly (currently without effect) : yes
Checking for test suite (using cmocka) : disabled
Checking for generate a clang compilation database : disabled
Checking for compiler support for noexecstack : yes
Checking for linker support for --nxcompat --no-seh --dynamicbase : no
Checking for -lm : yes
Checking for MinGW : os-win32 not found
Checking for POSIX environment : yes
Checking for Android environment : no
Checking for development environment : yes
Checking for Universal Windows Platform : disabled
Checking for win32 desktop APIs : os-win32 not found
Checking for internal pthread wrapper for win32 (Vista+) : posix found
Checking for POSIX threads : yes
Checking for GNU C extensions : yes
Checking for stdatomic.h : yes
Checking for stdatomic.h support or slow emulation : yes
Checking for linking with -lrt : yes
Checking for iconv : yes
Checking for w32/dos paths : os-win32 not found
Checking for spawnp()/kill() POSIX support : yes
Checking for spawnp()/kill() Android replacement : posix-spawn-native found
Checking for any spawnp()/kill() support : yes
Checking for Windows pipe support : posix found
Checking for glob() POSIX support : yes
Checking for glob() win32 replacement : posix found
Checking for any glob() support : yes
Checking for fchmod() : yes
Checking for vt.h : yes
Checking for gbm.h : no
Checking for GLIBC API for setting thread name : yes
Checking for OSX API for setting thread name : glibc-thread-name found
Checking for BSD API for setting thread name : glibc-thread-name found
Checking for BSD's fstatfs() : no
Checking for Linux's fstatfs() : yes
Checking for Samba support (makes mpv GPLv3) : disabled
Checking for Lua : no ('luajit >= 2.0.0' not found)
Checking for Javascript (MuJS backend) : no ('mujs >= 1.0.0' not found)
Checking for SSA/ASS support : yes
Checking for libass OSD support : yes
Checking for dummy OSD support : libass-osd found
Checking for zlib : yes
Checking for Bluray support : no ('libbluray >= 0.3.0' not found)
Checking for dvdread support : disabled
Checking for dvdnav support : disabled
Checking for DVD/IFO support : dvdread not found
Checking for cdda support (libcdio) : disabled
Checking for uchardet support : no ('uchardet' not found)
Checking for librubberband support : no ('rubberband >= 1.8.0' not found)
Checking for LCMS2 support : no ('lcms2 >= 2.6' not found)
Checking for VapourSynth filter bridge (Python) : yes
Checking for VapourSynth filter bridge (Lazy Lua) : lua not found
Checking for VapourSynth filter bridge (core) : yes
Checking for libarchive wrapper for reading zip files and more : no ('libarchive >= 3.0.0' not found)
Checking for SDL2 : disabled
Checking for OSS : yes
Checking for RSound audio output : no
Checking for sndio audio input/output : disabled
Checking for PulseAudio audio output : no ('libpulse >= 1.0' not found)
Checking for JACK audio output : no ('jack' not found)
Checking for OpenAL audio output : disabled
Checking for OpenSL ES audio output : no
Checking for ALSA audio output : no ('alsa >= 1.0.18' not found)
Checking for CoreAudio audio output : no
Checking for AudioUnit output for iOS : no
Checking for WASAPI audio output : os-win32 not found
Checking for Cocoa : no
Checking for DRM : yes
Checking for DRM Prime ffmpeg support : yes
Checking for GBM : gbm.h not found
Checking for wayland-scanner : yes
Checking for wayland-protocols : no ('wayland-protocols >= 1.14' not found)
Checking for Wayland : wayland-protocols not found
Checking for X11 : no ('x11 >= 1.0.0 xscrnsaver >= 1.0.0 xext >= 1.0.0 xinerama >= 1.0.0 xrandr >= 1.2.0' not found)
Checking for Xv video output : x11 not found
Checking for OpenGL Cocoa Backend : cocoa not found
Checking for OpenGL X11 Backend : x11 not found
Checking for OpenGL X11 EGL Backend : x11 not found
Checking for OpenGL DRM EGL Backend : gbm not found
Checking for OpenGL Wayland Backend : wayland not found
Checking for OpenGL Win32 Backend : win32-desktop not found
Checking for OpenGL/DirectX Interop Backend : gl-win32 not found
Checking for OpenGL ANGLE headers : os-win32 not found
Checking for OpenGL Win32 ANGLE Library : egl-angle not found
Checking for OpenGL Win32 ANGLE Backend : egl-angle not found
Checking for VDPAU acceleration : x11 not found
Checking for VDPAU with OpenGL/X11 : vdpau not found
Checking for VAAPI acceleration : x11 not found
Checking for VAAPI (X11 support) : vaapi not found
Checking for VAAPI (Wayland support) : vaapi not found
Checking for VAAPI (DRM/EGL support) : vaapi not found
Checking for VAAPI GLX : vaapi-x11 not found
Checking for VAAPI EGL on X11 : vaapi-x11 not found
Checking for VAAPI EGL : vaapi-x-egl not found
Checking for CACA : no ('caca >= 0.99.beta18' not found)
Checking for JPEG support : no
Checking for Direct3D support : win32-desktop not found
Checking for libshaderc SPIR-V compiler (shared library) : no
Checking for libshaderc SPIR-V compiler (static library) : no
Checking for libshaderc SPIR-V compiler : shaderc-shared not found
Checking for libcrossc SPIR-V translator : no ('crossc' not found)
Checking for Direct3D 11 video output : win32-desktop not found
Checking for Raspberry Pi support : no
Checking for iOS OpenGL ES hardware decoding interop support : no
Checking for OpenGL without platform-specific code (e.g. for libmpv) : libmpv-shared not found
Checking for MALI via Linux fbdev : no
Checking for OpenGL context support : gl-cocoa not found
7.) Once you have successfully compiled mpv, simply execute the following in order to install it locally, which is not necessary as you can simply copy /mpv-build/build/mpv into /usr/local/bin
sudo ./install
8.) Finally, the SVP command for transcoding with NVENC will cause an error as it uses the option --ofps which has apparently been deprecated with the latest git of mpv.
I have been using this with a script to launch it for now.
mpv /home/donald/Downloads/sintel.mkv -o output --no-audio --no-sub --no-sub-auto --input-ipc-server=mpvencodepipe --vf=vapoursynth:/home/donald/60fps.vpy:4:16 --of=matroska --ovc=h264_nvenc --ovcopts=b=11055051,rc=vbr_hq,preset=slow,profile=high,threads=16
Playing: /home/donald/Downloads/sintel.mkv
(+) Video --vid=1 (h264 1920x818 24.000fps)
Audio --aid=1 --alang=eng 'AC3 5.1 @ 640 Kbps' (ac3 6ch 48000Hz)
VO: [lavc] 1920x818 yuv420p
[vo/lavc] Opening encoder: NVIDIA NVENC H.264 encoder [h264_nvenc]
[encode] Opening output file: output
[encode] Opening muxer: Matroska [matroska]
V: 00:04:36 / 00:14:48 (31%) {5.5min 111.6fps 2349.6MB}
V: 00:04:42 / 00:14:48 (31%) {5.4min 111.6fps 2354.5MB}
V: 00:04:55 / 00:14:48 (33%) {5.3min 111.3fps 2370.3MB}
Cheers!
Probably hardware resources, but I have done it on Linux.
Obviously, not with the SVP Panel, but you can open multiple instances of mpv with the --vf option using the SVP script, which still gives you the ability to modify and control any parameters/option regarding the interpolation by editing override.js
Oh, ok.
Sorry, I assumed that you had an Nvidia GPU.
For AMD cards, you can run this command in order to generate the xorg.conf in /etc/X11/xorg.conf
Is your Laptop GPU a full descrete graphics card, or some hybrid solution?
sudo amdconfig --intial -f --adapter=all
With an Nvidia card it would be
sudo nvidia-xconfig
>>I'm sorry, I don't really understand what to do.
There multiple ways of how to enable SVP.
You can either open a file from the SVP Panel, have SVP recognize an active instance of mpv playing a video file with regards to the mpv-socket or you can open a video file with an SVP pointer.
The second option requires you to either run mpv with this command
--input-ipc-server=/tmp/mpvsocket
or to put it in the mpv.conf without "- - "
>> I forgot to say I actually use the latest Kubuntu 10.04 LTS version. (nothing changes though)
No, a lot has changed, that is your problem.
The packages required to properly run SVP on Ubuntu mandate version 16.04 or higher.
The djcj repository for example only offers mpv and vapoursynh for xenial, artful or bionic.
I mean, you could compile mpv with vapoursynth support enabled for 10.4 + all the residual stuff, but it would be easier to just use a later version of Ubuntu.
If SVP is not hooking the mpv socket you can try deleting mpvsocket from /tmp and putting this in the mpv.conf
--input-ipc-server=/tmp/mpvsocket
But this is still unreliable so what I originally did, was just opening files by having a short script point to the SVPManager executable with root privileges as default applicationt to open video file types.
Tearing in Ubuntu can be fixed by enabling TripleBuffering in the xorg.conf which can be found at /etc/X11/xorg.conf
In the "Device" section of the xorg.conf just enter the following:
Option "TripleBuffer" "True"
Should you wish to enable GPU Overclocking and Fan Control you can also enter the "Coolbits" option.
But first I advise you to upgrade your system to at least 16.04 to properly run SVP.
I have compiled ffmpeg from latest git with nvenc support enabled, how exactly do I point SVP to that binary file? (couldn't find anything in the folder or available scripts)
I have built everything from scratch + gpu driver, exclusively running necessary shit without the chance of coinciding packages.
OpenCL, CUDA, NVENC, ffmpeg has all been tested and confirmed to work properly.
Since you are a professional, I am sure that you run Linux as well. If you can find the time at some point, would it be possible for you to test transcoding with Nvenc? Would be amazing, man.
I have checked some SVP threads about Nvenc Transcoding issues, and it seems to come up a lot, even on Windows, without any real solution, as far as I have seen.
The djcj repo requires >=16.04 or upwards, so xenial, artful or bionic. What version of Ubuntu is your Zorin OS based on? That could explain why the package can't be found.
As for mpv, yes there is a GUI. Simply go to your start menu and click mpv under Sound/Video or wherever it is listed in your case.
You can also open a gui instance of mpv from the terminal via this option.
--profile=pseudo-gui
mpv.conf is only generated after you run mpv. Just enter "mpv" in the terminal and press enter.
After that you'll find it in /.config/mpv/mpv.conf
Chainik is very busy I think, so I'll give you in depth support because I've been through all of it on Linux with SVP.
"Unable to find packages" when you try to install libass5 is due to a lack of the corresponding repos. (although mpv should still work, since that is in the official repo).
Do the following:
sudo add-apt-repository ppa:djcj/vapoursynth && sudo apt-get update && sudo apt-get install mpv libass5 vapoursynth vapoursynth-extra-plugins
Use mpv not smplayer, it works better.
For graphics drivers, install the correct driver for your card from this repository:
sudo add-apt-repository ppa:graphics-drivers/ppa && sudo apt-get update && sudo apt-get install nvidia-XXX
XXX = the version that is compatible with your graphics card.---> you can check the official nvidia website, type in your gpu and find out which drivers both compatible and the most recent for your model.
After that, for GPU acceleration to work on Linux you need the nvidia-modprobe package
sudo apt-get install nvidia-modprobe
That should do it.
Additionally, you can put your preferred settings in the mpv.conf which is generated in /home/user/.config/mpv/mpv.conf
I have had that same error on Ubuntu.
That's a qt error, make sure you install the packages listed on the SVP page.
sudo apt-get install libqt5concurrent5 libqt5svg5 libqt5qml5
Ok, running it without --vf option produces the same error, so it's definitely not SVP's fault.
But dude, I have literally tried every single Nvidia driver since 2015, it can't be the driver, right?
Now, it is a widely known fact, that since kernel > 4.10 all the way up to 4.18 rc1 both OpenCl and Cuda are broken on Ubuntu, so I am using 4.8.
WTF could be causing this.... I mean that pretty much leaves mpv or the driver, correct?
I want to get into this deep, man.
$ mpv /home/donald/sintel.mkv -o output --no-audio --no-sub --no-sub-auto --input-ipc-server=mpvencodepipe --ofps 60.000 --of=matroska --ovc=h264_nvenc --ovcopts=b=11055051,rc=vbr_hq,preset=slow,profile=high,threads=16
Playing: /home/donald/sintel.mkv
(+) Video --vid=1 (*) (h264 1280x720 29.970fps)
Audio --aid=1 --alang=eng (*) (opus 1ch 48000Hz)
Using conversion filter.
Using conversion filter.
Image formats incompatible or invalid.
Video filter chain:
[in] 1280x720 yuv420p bt.709/bt.709/bt.1886/limited SP=1.000000 CL=mpeg2/4/h264
[convert] 1280x720 yuv420p bt.709/bt.709/bt.1886/limited SP=1.000000 CL=mpeg2/4/h264 [a]
[out] ??? <---
[convert] ??? [a]
Cannot initialize video filters.
Could not initialize video chain.
Video: no video
Exiting... (Errors when loading file)
[encode-lavc] vo-lavc: encoded 0 bytes
[encode-lavc] ao-lavc: encoded 0 bytes
Apparently 10bit colors are selected by default, that was definitely breaking some shit, because after switching it off GPU utilization during normal interpolation jumped from 15% to 35%.
Transcoding still only works with Software Encoding, anything else causes instant Fail.
Come on, I know you can solve this, you guys are geniuses!
Yes, sir.
Both x264 software encoding and gpu acceleration work fine with SVP.
I only get these errors when trying to encode with NVENC option.
So should I open an issue at the Ubuntu Nvidia forum section for an OpenCL incompatibility or do you have any possible fixes in mind?
Listen, I don't want to come off too pushy here, I really appreciate all the amazing work you guys have done here and I am obsessed with this progam, that's why I want to iron out any irregularities on the Linux end.
SmoothVideo Project → Posts by smooth-motion
Powered by PunBB, supported by Informer Technologies, Inc.