Re: SVP 4 Linux

I built an SVP4 environment on "Ubuntu 22.04" based on "https://www.svp-team.com/wiki/SVP:Linux" but mpv does not work. mpv's video filter "Vapoursynth" does not seem to be properly investigated. So instead of "echo --enable-vapoursynth >> mpv_options" when building mpv, I used "echo --enable-vapoursynth >> ffmpeg_options" and it worked properly. I also added "echo --enable-nvenc >> ffmpeg_options" and "echo --enable-cuvid >> ffmpeg_options" and confirmed that NvEnc also works properly.

352 (edited by Nintendo Maniac 64 25-07-2022 17:29:53)

Re: SVP 4 Linux

opportunity027 wrote:

I used "echo --enable-vapoursynth >> ffmpeg_options" and it worked properly.

Could you quickly check if AV1 decode support works?  When I built mpv+vapoursynth on Mint 20.3 a few months ago, it was unable to decode AV1 video dsspite the very same AV1 video working in the "Celluloid" application that comes pre-bundled with Mint 20.3.

If you need an example AV1 video (note that it's a tiny 256x128 resolution in order to keep file size down):
- https://ttm.sh/wad.mkv

If you run into the same situation there I do where audio plays but there's no video nor even a video player, then you'll have to end the mpv process via the system monitor in order to get the audio to stop.

353 (edited by opportunity027 26-07-2022 12:52:53)

Re: SVP 4 Linux

echo --enable-libaom >> ffmpeg_options

When I used "libaom", it was able to decode normally.

Post's attachments

Screenshot.png, 414.99 kb, 900 x 509
Screenshot.png 414.99 kb, 283 downloads since 2022-07-26 

Re: SVP 4 Linux

opportunity027 wrote:
echo --enable-libaom >> ffmpeg_options

When I used "libaom", it was able to decode normally.

You're probably a more experienced Linux user than me, so could you elaborate more specifically on what you did?  I ran that in the terminal and it seemed to do nothing (I honestly didn't think it would) so clearly there's something more specific that one is supposed to do with that.

Re: SVP 4 Linux

I have only built an environment based on "https://www.svp-team.com/wiki/SVP:Linux". However, there are some differences. First, I built and installed cython for vapoursynth. Then I installed it according to the instructions.However, the options are different and more dependencies are required.It also includes options for nvidia.
ffmpeg_options

--enable-libx264
--enable-libx265
--enable-libmp3lame
--enable-nvdec
--enable-nvenc
--enable-cuvid
--enable-vapoursynth
--enable-openal
--enable-opencl
--enable-opengl
--enable-cuda-nvcc
--nvcc=/usr/local/cuda/bin/nvcc
--enable-vaapi
--enable-vdpau
--enable-libmfx
--enable-gpl
--enable-gnutls
--enable-libaom
--enable-libsvtav1
--enable-libass
--enable-libfdk-aac
--enable-libfreetype
--enable-libopus
--enable-libvorbis
--enable-libvpx
--enable-nonfree

mpv_options

--enable-vapoursynth
--enable-libmpv-shared
--enable-vdpau
--enable-xv
--enable-x11
--enable-gl

Re: SVP 4 Linux

I have problem. When i use svpcode. FAILED. I am newbie. vapoursynth installed.

06:31:11.230: ===== Starting mpv ======
06:31:11.230: Command line: /usr/bin/mpv /home/kali/Desktop/TT2/lv_0_20220804110039.mp4 --o=/home/kali/Desktop/TT2/lv_0_20220804110039.SVP.VO.mkv --no-audio --no-sub --no-sub-auto --input-ipc-server=/tmp/mpvencodesocket --input-media-keys=no --no-msg-color --vf=vapoursynth:/home/kali/.local/share/SVP4/scripts/ffff.py:4:2 --ovc=libx264 --ovcopts=preset=slow,crf=12,threads=2
06:31:11.402: Option vf: vapoursynth doesn't exist.
06:31:11.402: Error parsing option vf (option parameter could not be parsed)
06:31:11.402: Setting commandline option --vf=vapoursynth:/home/kali/.local/share/SVP4/scripts/ffff.py:4:2 failed.
06:31:11.402: Exiting... (Fatal error)
06:31:11.409: (!!!) Intermediate file may be broken: /home/kali/Desktop/TT2/lv_0_20220804110039.SVP.VO.mkv
06:31:11.409: ===== mpv exited with code 1 =====

357

Re: SVP 4 Linux

06:31:11.402: Option vf: vapoursynth doesn't exist.

You need vapoursynth:
https://www.svp-team.com/wiki/SVP:Linux#Vapoursynth

And You need mpv with vapoursynth support:
https://www.svp-team.com/wiki/SVP:Linux … th_support

Re: SVP 4 Linux

I don't suppose anyone know if something special needs to be done to make HDR videos look correct on an SDR display in the compiled mpv+vapoursynth?  They look overly blown-out compared to the same video played in Celluloid with the default configuration provided by Mint 20.3, and the result in Celluloid looks very similar to the SDR version of the very same video(s).

For reference I'm just using YouTube HDR videos for this; here's a very recent example video of such:
https://youtu.be/MuzwlZi7FP8

(the main reason I'm trying to do this is because I don't have the grunt to interpolate 1440p videos but I can do 1080p videos, and YouTube's HDR 1080p encode gets over double the bitrate of their equivalent SDR VP9 encode)

Re: SVP 4 Linux

https://mpv.io/manual/master/#options-tone-mapping

360 (edited by NM64 08-08-2022 19:52:51)

Re: SVP 4 Linux

Sure enough, all I had to do was add:

tone-mapping=hable

...and HDR videos now "look good" to my eyes in the compiled mpv+vapoursynth on my SDR monitor.

Curiously, none of the 'tone-mapping' settings matched the result displayed by Celluloid; this isn't really a problem but it was interesting nevertheless.

Re: SVP 4 Linux

Has anyone gotten SVP to work on POP OS? I've tried several different things but I can't seem to get SVP to detect the video playback, even when hitting the SVP icon, and then open fial via SVP. I have the config file and seemingly all the dependencies when running ldd but no avail. Trying to switch from Windows to Pop and would love to bring this over..

362 (edited by NM64 13-08-2022 05:21:37)

Re: SVP 4 Linux

knifeproz wrote:

Has anyone gotten SVP to work on POP OS?.

Since it's based on Ubuntu, have you tried the thing mentioned a few posts up that was required to get it working on Ubuntu 22.04?

opportunity027 wrote:

I built an SVP4 environment on "Ubuntu 22.04" based on "https://www.svp-team.com/wiki/SVP:Linux" but mpv does not work. mpv's video filter "Vapoursynth" does not seem to be properly investigated. So instead of "echo --enable-vapoursynth >> mpv_options" when building mpv, I used "echo --enable-vapoursynth >> ffmpeg_options" and it worked properly

Re: SVP 4 Linux

These are very strange advices cause "enable-vapoursynth" is a mpv's option, not ffmpeg's...
I'll build it on a clean 22.04 and update the instructions.

----
and everything seems to work ok with a minor changes

364 (edited by NM64 13-08-2022 19:20:52)

Re: SVP 4 Linux

Chainik wrote:

I'll build it on a clean 22.04 and update the instructions.

I see that you added some additional ffmpeg options to the mpv compilation step; any chance of also adding

echo --enable-libaom >> ffmpeg_options

to the instructions so that other beginners don't run into the issue of AV1 not working like I ran into above now that AV1 is becoming more common on YouTube?

Re: SVP 4 Linux

libaom is a AV1 encoder
if you're interested in AV1 decoding you should build with dav1d, but this definitely isn't a minimal install

366

Re: SVP 4 Linux

Chainik wrote:

if you're interested in AV1 decoding you should build with dav1d

Ah right, I forgot that was a thing.

Chainik wrote:

but this definitely isn't a minimal install

I mean, I would argue that including nvdec and vaapi is also not a minimal installation (which historically were not listed on the wiki as seen by this previous revision of that wiki article).

Re: SVP 4 Linux

I thought it's too minimal w/o any hw acceleration at all big_smile

---
BTW there's a Homebrew for Linux existing.
Maybe it's a better option for inexperienced Linux users...
Never tried it though. I personally think than inexperienced users should not run Linux at the first place, Windows is good enough for everyone big_smile

368 (edited by NM64 14-08-2022 01:15:38)

Re: SVP 4 Linux

Hey um, I just realized that the post with slew of mpv+vapoursynth compile options doesn't list dav1d - so what would be the corresponding "ffmpeg_options" argument for dav1d?


Chainik wrote:

I personally think than inexperienced users should not run Linux at the first place, Windows is good enough for everyone big_smile

Ehhh... I'm a PC hardware enthusiast through-and-through but software is actually quite a weak point for me (I cannot code worth a darn, and I have major trouble remembering terminal commands).

A big reason I switched to Linux is because I was becoming dissatisfied with the... "software BS" associated with post-7 versions of Windows that seems to become worse and worse with each subsequent version - "software BS" that, in my mind, gets in the way of just letting me using my hardware as I deem fit.

To give some perspective, I'm also a user of Pale Moon rather than Firefox or Chrome, and much prefer the "function-over-form" web design of the mid to late 2000s as is used by places like romhacking.net or vndb.org rather than the "modern" design seen on the likes of the websites for the Framework laptop or Linux Mint.

Speaking of which, keep in mind that I use Linux Mint which is quite the "baby's first Linux", and I would argue that it's better for beginners than Windows nowadays, in large part to its "no BS"-ness (which is amusing considering they've gone with a "modern" design for their website, but it's my understanding that they largely did it #1 for sort of marketing to "normies" and #2 they purchased a pre-existing site design since they didn't have anyone around to write one from scratch)

Re: SVP 4 Linux

NM64 wrote:
knifeproz wrote:

Has anyone gotten SVP to work on POP OS?.

Since it's based on Ubuntu, have you tried the thing mentioned a few posts up that was required to get it working on Ubuntu 22.04?

Thank you for the suggestion. I was able to get a little bit further with those instructions actually, but still have some issues. It appeared I was running an outdated version of vapoursynth so I updated it but when I try to use the make -j4 command when compiling vapour, I get this block of text, it would almost appear as if I'm missing some dependencies perhaps? I'm rather new to Linux in general so forgive me if I'm missing something straight forward...

root@pop-os:/home/senselessed/vapoursynth# make -j4
  CXX      src/core/libvapoursynth_la-genericfilters.lo
  CXX      src/core/kernel/libvapoursynth_la-generic.lo
  CC       src/core/kernel/libvapoursynth_la-transpose.lo
  CXX      src/core/libvapoursynth_la-lutfilters.lo
src/core/kernel/generic.cpp: In function ‘T {anonymous}::xrint(float)’:
src/core/kernel/generic.cpp:42:83: error: ‘numeric_limits’ is not a member of ‘std’
   42 |     return static_cast<T>(std::lrint(std::min(std::max(x, static_cast<float>(std::numeric_limits<T>::min())), static_cast<float>(std::numeric_limits<T>::max()))));
      |                                                                                   ^~~~~~~~~~~~~~
src/core/kernel/generic.cpp:42:99: error: expected primary-expression before ‘>’ token
   42 |     return static_cast<T>(std::lrint(std::min(std::max(x, static_cast<float>(std::numeric_limits<T>::min())), static_cast<float>(std::numeric_limits<T>::max()))));
      |                                                                                                   ^
src/core/kernel/generic.cpp:42:102: error: ‘::min’ has not been declared; did you mean ‘std::min’?
   42 |     return static_cast<T>(std::lrint(std::min(std::max(x, static_cast<float>(std::numeric_limits<T>::min())), static_cast<float>(std::numeric_limits<T>::max()))));
      |                                                                                                      ^~~
      |                                                                                                      std::min
In file included from /usr/include/c++/11/algorithm:62,
                 from src/core/kernel/generic.cpp:21:
/usr/include/c++/11/bits/stl_algo.h:3455:5: note: ‘std::min’ declared here
 3455 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
src/core/kernel/generic.cpp:42:135: error: ‘numeric_limits’ is not a member of ‘std’
   42 |     return static_cast<T>(std::lrint(std::min(std::max(x, static_cast<float>(std::numeric_limits<T>::min())), static_cast<float>(std::numeric_limits<T>::max()))));
      |                                                                                                                                       ^~~~~~~~~~~~~~
src/core/kernel/generic.cpp:42:151: error: expected primary-expression before ‘>’ token
   42 |     return static_cast<T>(std::lrint(std::min(std::max(x, static_cast<float>(std::numeric_limits<T>::min())), static_cast<float>(std::numeric_limits<T>::max()))));
      |                                                                                                                                                       ^
src/core/kernel/generic.cpp:42:154: error: ‘::max’ has not been declared; did you mean ‘std::max’?
   42 |     return static_cast<T>(std::lrint(std::min(std::max(x, static_cast<float>(std::numeric_limits<T>::min())), static_cast<float>(std::numeric_limits<T>::max()))));
      |                                                                                                                                                          ^~~
      |                                                                                                                                                          std::max
In file included from /usr/include/c++/11/algorithm:62,
                 from src/core/kernel/generic.cpp:21:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: ‘std::max’ declared here
 3467 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
  CC       src/core/libvapoursynth_la-mergefilters.lo
make: *** [Makefile:1728: src/core/kernel/libvapoursynth_la-generic.lo] Error 1
make: *** Waiting for unfinished jobs....
src/core/genericfilters.cpp: In function ‘void genericCreate(const VSMap*, VSMap*, void*, VSCore*, const VSAPI*)’:
src/core/genericfilters.cpp:443:31: error: ‘numeric_limits’ is not a member of ‘std’
  443 |                 d->thf = std::numeric_limits<float>::max();
      |                               ^~~~~~~~~~~~~~
src/core/genericfilters.cpp:443:46: error: expected primary-expression before ‘float’
  443 |                 d->thf = std::numeric_limits<float>::max();
      |                                              ^~~~~
src/core/genericfilters.cpp:529:46: error: ‘numeric_limits’ is not a member of ‘std’
  529 |             if (std::abs(matrix_sumf) < std::numeric_limits<float>::epsilon())
      |                                              ^~~~~~~~~~~~~~
src/core/genericfilters.cpp:529:61: error: expected primary-expression before ‘float’
  529 |             if (std::abs(matrix_sumf) < std::numeric_limits<float>::epsilon())
      |                                                             ^~~~~
src/core/genericfilters.cpp:529:61: error: expected ‘)’ before ‘float’
  529 |             if (std::abs(matrix_sumf) < std::numeric_limits<float>::epsilon())
      |                ~                                            ^~~~~
      |                                                             )
src/core/genericfilters.cpp: In function ‘const VSFrameRef* levelsGetframeF(int, int, void**, void**, VSFrameContext*, VSCore*, const VSAPI*)’:
src/core/genericfilters.cpp:852:69: error: ‘numeric_limits’ is not a member of ‘std’
  852 |         if (std::abs(d->gamma - static_cast<T>(1.0)) < std::numeric_limits<T>::epsilon()) {
      |                                                             ^~~~~~~~~~~~~~

src/core/genericfilters.cpp:852:85: error: expected primary-expression before ‘>’ token
  852 | :abs(d->gamma - static_cast<T>(1.0)) < std::numeric_limits<T>::epsilon()) {
      |                                                             ^

src/core/genericfilters.cpp:852:88: error: ‘::epsilon’ has not been declared
  852 | s(d->gamma - static_cast<T>(1.0)) < std::numeric_limits<T>::epsilon()) {
      |                                                             ^~~~~~~

make: *** [Makefile:1714: src/core/libvapoursynth_la-genericfilters.lo] Error 1

Re: SVP 4 Linux

Just tried Homebrew, and it works. It takes _a_lot_ of time though, but it's fully automated, has almost everything built-in, and you don't need to know anything about building stuff.
https://brew.sh/

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install mpv

and you'll have everything installed in its own directory /home/linuxbrew/.linuxbrew, i.e. /home/linuxbrew/.linuxbrew/bin/mpv


---
FYI, it's a MacOS stuff ported to Linux

---
the only minor issue there's some Python conflict only when running Homebrew's mpv from SVP, resulting in "Playback [3a437f2f]: VS - Could not initialize VapourSynth scripting" error
but if you run it from any other place it works

371

Re: SVP 4 Linux

Chainik wrote:

Just tried Homebrew, and it works. It takes _a_lot_ of time though, but it's fully automated, has almost everything built-in, and you don't need to know anything about building stuff.

Does it include the dav1d AV1 decoder?

Chainik wrote:

the only minor issue there's some Python conflict only when running Homebrew's mpv from SVP

Are you referring to if one associates or opens a video file with SVP itself so that it then automatically opens in mpv with the correct arguments?

Chainik wrote:

if you run it from any other place it works

So are you say that if we instead associates or opens a video file in mpv directly, it'll work then?  Do we still need to add --input-ipc-server=/tmp/mpvsocket to our mpv.conf file though?

Re: SVP 4 Linux

Anyone been able to get AMD GPU Acceleration working on Fedora? I installed rocm-opencl but I get the following error

mesa: CommandLine Error: Option 'h' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options

373

Re: SVP 4 Linux

Unconventional question - is it possible to make the tray icon not be present?

Currently the only tray arguments I know of is -tray which is only for making the tray icon appear when, by default, SVP's tray icon is not visible.  But what about if SVP's tray icon is visible by default - is there some way to then tell SVP to hide its tray icon?

While I'm here, I don't suppose it's possible to tell SVP to never automatically check for updates?

Re: SVP 4 Linux

-no-tray ? big_smile

375 (edited by NM64 05-10-2022 19:50:23)

Re: SVP 4 Linux

Psst by the way, is the mpv compile option for dav1d by chance:

--enable-libdav1d

yes/no?  I only ask because it's not included in the list of mpv/ffmpeg options above (the same list that the SVP wiki page links to).


Chainik wrote:

-no-tray ? big_smile

Hmm, that works but has a worse result by subsequently displaying the SVP program window instead whenever SVP is launched.

I'm guessing the way it works is that you always either have the tray or the program window, and it is impossible to have SVP running in the background without having either of those be present?


Also, about the update notification, the issue is actually that I've set up my OS to do automatic background updates since I've even got TimeShift snapshots being backed up to a second drive, so this means that SVP is the only thing left that's basically displaying visible update notifications.  Therefore, alternatively, if there's some way to update SVP in the background through my package manager, then that would also totally work (and could actually even be preferable).  SVP being made available as a flatpak would also work because I similarly have my update manager set to automatically update flatpaks.