SVP:Linux

From SmoothVideo Project
Jump to navigation Jump to search

Svp4linux-mpv.png

Compatible video players

  • mpv itself can act as a standalone video player
  • SMPlayer
  • VLC
  • Plex (??)

Warning: there's no way for now for using SVP with Snap or Flatpak apps (i.e. VLC from Snap, Plex from Flatpak).

Prerequisites

SVP needs the following packages to be installed via your distro's package manager:

  1. lsof command line tool
  2. libxcb-cursor0
  3. OpenSSL >= 3.0
  4. Proprietary video drivers with OpenCL (e.g. nvidia-opencl) and Vulkan
  5. VAAPI an/or VDPAU drivers for your video card

The software from the following list can be installed by you, or SVP can download pre-built versions and install them locally into SVP folder. You can install or remove any of this at any time via the Maintenance tool.

  1. Qt >= 6.8
  2. Vapoursynth >= R60
  3. Python 3.12 (not >=3.12, but specifically 3.12!)
  4. mpv player built with Vapoursynth support and some useful encoders (see below)
  5. ffmpeg applicaton (any version)
  6. mkvmerge from MKVToolNix (any version)
  7. NVIDIA TensorRt runtime

And a video players:

  1. Recommended UI for mpv: SMPlayer
  2. VLC 3.0 installed from the package manager (NOT a Snap/Flatpak version!)

Ubuntu packages

Common packages

sudo apt-get install lsof libxcb-cursor0 libva-x11
# SMPlayer:

sudo add-apt-repository ppa:rvm/smplayer 
sudo apt-get update 
sudo apt-get install smplayer smplayer-themes smplayer-skins
# VLC

sudo apt-get install vlc

Arch packages

# common packages
pacman -S lsof

Building mpv from sources

# install dependencies: add more if you want additional ffmpeg/mpv codecs and features
sudo apt-get install libssl-dev libfribidi-dev libharfbuzz-dev libluajit-5.1-dev libx264-dev xorg-dev libxpresent-dev libegl1-mesa-dev libfreetype-dev libfontconfig-dev libffmpeg-nvenc-dev libva-dev libdrm-dev libplacebo-dev
# you need at least one of these to enable audio output
sudo apt-get install libasound2-dev libpulse-dev

git clone https://github.com/mpv-player/mpv-build.git
cd mpv-build
./use-ffmpeg-release

# minimal install, feel free to add more options to ffmpeg_options and mpv_options
# see https://www.svp-team.com/forum/viewtopic.php?pid=80787#p80787
echo --enable-libx264 >> ffmpeg_options
echo --enable-nvdec >> ffmpeg_options
echo --enable-vaapi >> ffmpeg_options
echo -Dvapoursynth=enabled >> mpv_options
echo -Dlibmpv=true >> mpv_options
./rebuild -j4
sudo ./install
cd ..

mpv configuration

Svp4linux-open.png

Just add --input-ipc-server=/tmp/mpvsocket to mpv args (or config file) and SVP should find it. Alternatively you can "open" video file via SVPManager - it'll execute mpv with the correct argument.

As Vapoursynth processing requires a "copy-back" video decoder, you have to also include

--hwdec=auto-copy

VLC configuration

As of now SVP assumes that VLC installed into /usr/bin, /usr/lib etc.

SVP's plugin for VLC replaces the "deinterlace" filter. To be able to quickly switch them from SVP's main menu you may need to change VLC's plugins folder access rights:

sudo chmod 777 /usr/lib/vlc/plugins/video_filter 
# OR (e.g. Ubuntu 17.04)
sudo chmod 777 /usr/lib/x86_64-linux-gnu/vlc/plugins/video_filter 

Then "install" or "uninstall" SVP's plugin via SVP main menu -> Utilities -> SVP in VLC.

If it doesn't work then manually put the plugins path (e.g. "/usr/lib/vlc/plugins") into main.setup.vlc.plugins property in SVP's All settings.

You must turn on deinterlace in VLC via Video -> Deinterlace -> On to start using SVP's plugin.. Alternatively you can turn it on permanently: Tools -> Preferences -> Video -> Deinterlacing = On

Note 1: Hardware decoding is not be compatible with the Vapoursynth filter!

Issues

Installation

DO NOT install mpv via package manager - it won't work! Use provided pre=built version or build it on your own instead.


If SVP Manager doesn't run after installation you may want to check if all the dependencies are met, run it in the Console and see the error message(s).

Common issues

One major issue is incompatibility between the way system tray icon/menu implemented in Qt and some display managers. For example in Xubuntu 15.10/Xfce tray icon is completely unusable. Because of this SVP runs w/o tray icon by default, BUT it's possible to switch Windows behavior with -tray command line arg.


For GPU acceleration support use proprietary video drivers with (probably) some additional modules - search for "OpenCL ICD". For example in case of NV cards "nvidia-modprobe" package is needed for OpenCL to work. Check the installation with utils/clinfo.


AMD cards may need additional driver component for the SVP's GPU acceleration (see more details there):

Image support is supplied by a closed-source component of the ROCr runtime (libhsa-ext-image64.so) that is part of the hsa-ext-rocr-dev package.


"Auto" settings expect hardware video decoding which may be unavailable for mpv with Vapoursynth video filter enabled. So you may need to lower SVP settings manually.


Unlike the Windows version, SVP 4 Linux doesn't measure actual screen refresh rate, but uses OS provided value instead. For 59.xxx Hz screens this value is often rounded to "59.0", so you'll get sub-optimal FRC rate like 25/11 instead of 5/2. To avoid this use fixed "Movie x2.5" target rate.


The number of computation threads are set for the Windows' Avisynth and may not be optimal for Vapoursynth. In case of any unexpected video stuttering try to adjust this value at the first place.


Error message - Unable to find mpv's pid:

SVP uses lsof utility to find which mpv instance is on the other end of the local socket, so ensure that lsof is installed. In Gentoo-based distros you may also need to update lsof to ver.4.89 or later.