201

Re: SVP 4 Linux

Try vapoursynth R40 instead on R41. It helped to one mac user with the same error:

NameError: name 'video_in' is not defined

Re: SVP 4 Linux

... or vaporsynth-master instead of R41

203 (edited by tobindax 14-01-2018 12:11:05)

Re: SVP 4 Linux

Thanks, I bet it's that unofficial "multimedia" repo for debian that sucks and ruined it here, though I had tried a manual installation of vapoursynth and even if I clearly compiled mpv with support for it, it has an error at run time. I'll look into it some more.

update: Still does it

[vapoursynth] Could not initialize VapourSynth scripting.
Creating filter 'vapoursynth' failed.

Re: SVP 4 Linux

this is different error

the "video_in is not defined" one caused by Vapoursynth ver.41 and fixed in the latest commit on 2018-01-12

205 (edited by tobindax 14-01-2018 13:16:35)

Re: SVP 4 Linux

Yeah, I got that. Thanks, I replaced that file changed on the last commit on the source package from that repo and rebuilt and it works fine now.

(building master from source wasn't that successful by default, but that's off topic here so no point continuing it)

Re: SVP 4 Linux

Hi,

can someone tell me which GPU should I buy so my SVP for Linux uses GPU acceleration?

Is this one good enough?

XFX Radeon R7 360 2GB

And then which drivers should I download and from where?

Re: SVP 4 Linux

I also want to use mpv with vapoursynth if that's required for SVP, and I want it with LUA so I can use stuff like automatic subtitle download.

Re: SVP 4 Linux

On the wiki, it says the following under prerequisites:

(recommended) Proprietary video drivers including OpenCL ICD

Isn't that only for Nvidia GPUs?  I mean, the mesa drivers for Intel and AMD are widely regarded as being better than their according proprietary drivers.

Re: SVP 4 Linux

Nintendo Maniac 64 wrote:

On the wiki, it says the following under prerequisites:

(recommended) Proprietary video drivers including OpenCL ICD

Isn't that only for Nvidia GPUs?  I mean, the mesa drivers for Intel and AMD are widely regarded as being better than their according proprietary drivers.

Bro, can you help me in this topic ? https://www.svp-team.com/forum/viewtopic.php?id=4545

210 (edited by Nintendo Maniac 64 01-06-2018 02:11:48)

Re: SVP 4 Linux

So the wiki says that the HD5000 series is the minimum Radeon GPU that supports full GPU acceleration in Windows (and I can confirm this is the case between my HD4670 and HD5850), but what about Linux?

Also the wiki says to use proprietary drivers, but the mesa open source drivers are the go-to solution for Radeon drivers as the closed-source Radeon drivers for anything other than Nvidia on Linux are a bit of a trainwreck (heck there aren't even separate proprietary drivers available for Intel GPUs as well as really new Radeon GPUs like the iGPU on the Ryzen 2200G and 2400G).  I'm only a Linux newbie so there's not much problem-solving I can do myself, but it seems that my HD5850 didn't have out-of-the-box support for SVP's GPU acceleration even though it did have fully-supported hardware accelerated polygonal 3D rendering in the likes of the Dolphin emulator...but maybe I have to actually do something in order to enable SVP GPU acceleration on Linux.

Re: SVP 4 Linux

I have exactly nothing to say big_smile
If it works - good for you, if doesn't - RTFM. "Linux way" (c)

212 (edited by Nintendo Maniac 64 05-06-2018 01:56:40)

Re: SVP 4 Linux

Chainik wrote:

if doesn't - RTFM. "Linux way" (c)

I just want to know before I take the time to "RTFM" on trying to make an HD5850 work if it even can work on SVP 4 Linux (perhaps you yourself do not know if an HD5850 is supported by SVP 4 Linux?).

And I can't RTFM with regards to whether its supported because there's isn't really a manual for that - the only manuals that exists (the SVP wiki page on Linux) just says to use proprietary drivers, but no amount of drivers* will make it work if I'm using GPU hardware that isn't supported by SVP 4 Linux in the first place (and the GPU compatibility SVP wiki page is about Windows drivers and such).  For example, we know that the hardware of an old Radeon 9600 would never work with SVP 4 Linux, yet even a modern Vega GPU that was merely lacking the correct drivers would give you the exact same result in SVP 4 Linux as that completely unsupported Radeon 9600.



*technically this isn't true as you can always implement missing hardware features in software, but the performance penalty can be enormous to the point of being completely impractical for even offline rendering let alone real-time rendering

Re: SVP 4 Linux

> you yourself do not know if an HD5850 is supported by SVP 4 Linux?

This's not a question of "<some video card> is supported by SVP", but "does <some video card> supports OpenCL using given drivers".

HD5850 DO have all "hardware features" required for SVP to work.
SVP wants a "FULL_PROFILE" GPU OpenCL device supporting "cl_khr_byte_addressable_store" extension, that's all.

214 (edited by DangerThunder 29-06-2018 23:59:00)

Re: SVP 4 Linux

Similar problems here on Ubuntu 18.04 with proprietary NV driver. Can't get GPU acceleration working:

Playback [bd74770c]: VS - Script evaluation failed:
Playback [bd74770c]: VS - Python exception: SVSmoothFps: unable to init GPU-based renderer - code 262111
Playback [bd74770c]: VS - Traceback (most recent call last):
Playback [bd74770c]: VS - File 'src/cython/vapoursynth.pyx', line 1847, in vapoursynth.vpy_evaluateScript
Playback [bd74770c]: VS - File '/home/DangerThunder/.local/share/SVP4/scripts/bd74770c.py', line 53, in <module>
Playback [bd74770c]: VS - smooth = interpolate(clip)
Playback [bd74770c]: VS - File '/home/DangerThunder/.local/share/SVP4/scripts/bd74770c.py', line 36, in interpolate
Playback [bd74770c]: VS - smooth = core.svp2.SmoothFps(input_m,super['clip'],super['data'],vectors['clip'],vectors['data'],smoothfps_params,src=input_um,fps=src_fps)
Playback [bd74770c]: VS - File 'src/cython/vapoursynth.pyx', line 1739, in vapoursynth.Function.__call__
Playback [bd74770c]: VS - vapoursynth.Error: SVSmoothFps: unable to init GPU-based renderer - code 262111

vapoursynth 43-1
nvidia-driver-390
libnvidia-compute-390
mpv 1:0.28.0-1
python 3.6

CPU-based works fine.

215 (edited by Nintendo Maniac 64 30-06-2018 00:03:03)

Re: SVP 4 Linux

DangerThunder wrote:

Similar problems here on Ubuntu 18.04 with proprietary NV driver. Can't get GPU acceleration working

You probably should also mention what model of Nvidia GPU you are actually using.

Re: SVP 4 Linux

"code 262111" means "clCreateContext returns CL_INVALID_DEVICE"

217

Re: SVP 4 Linux

According to https://www.svp-team.com/wiki/GPU_Compatibility a GT430 should be capable, but GPU accerlation is way to slow. I recognized that if disable GPU accerlation CPU usage is around 40-50% and GPU Utilization is @ 30-33%. If I enable GPU accerlation CPU usage drops to 10% and GPU Utilization is below 10% and video playback is hard desynced and stuttering

(Video Engine Utilazation is always @0%)

Logs:

qt5ct: using qt5ct plugin
12:53:25.575 [i]: Main: starting up SVP 4 Linux [4.2.0.137]... 
12:53:25.576 [i]: Main: args: none
12:53:25.576 [i]: Main: working dir is ***
12:53:25.576 [i]: Main: data dir set to ***
12:53:25.577 [i]: Settings: loading reg.cfg OK
12:53:25.577 [i]: Settings: loading main.cfg OK
12:53:25.577 [i]: Settings: loading ui.cfg OK
12:53:25.577 [i]: Settings: loading frc.cfg OK
12:53:25.578 [i]: Settings: loading profiles.cfg OK
12:53:25.578 [i]: Settings: loading custom.cfg OK
12:53:25.578 [i]: Settings: loading lights.cfg OK
12:53:25.578 [i]: Main: using Qt 5.11.1 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 8.1.1 20180531)
12:53:25.579 [i]: Main: device scale is 1, user defined scale is 1
12:53:25.579 [i]: Main: system locale is [de]
12:53:25.579 [i]: Main: preferred language is [de-de]
12:53:25.581 [i]: Main: setting language file to de.qm...
12:53:25.583 [i]: Main: module 'plugins/libsvpflow1_vs64.so': 4.2.0.133
12:53:25.583 [i]: Main: module 'plugins/libsvpflow2_vs64.so': 4.2.0.145
12:53:25.585 [i]: Main: VLC filter (64 bit): 0.9.0.114
12:53:25.585 [i]: Main: running OpenCL info...
qt5ct: 12:53:25.590 [i]: D-Bus system tray: no
12:53:25.592 [i]: Main: collecting system information...
12:53:25.597 [i]: OS: Linux 4.17.3-1-ARCH #1 SMP PREEMPT Tue Jun 26 04:42:36 UTC 2018 x86_64
12:53:25.622 [i]: Desktop environment: /usr/bin/lightdm / gnome
12:53:25.626 [i]: CPU: Common KVM processor [base frequency 3000 MHz, 16 threads]
12:53:25.628 [i]: Video: reading OpenCL info...
12:53:25.656 [i]: Video: 1 GPU OpenCL device(s) on NVIDIA CUDA [OpenCL 1.2 CUDA 9.1.84] (NVIDIA Corporation)
12:53:25.656 [i]: Video 1: device name 'GeForce GT 430' (NVIDIA Corporation, ver.390.67) [gpuID=11]: OK
12:53:25.658 [i]: Memory:  3943  MB total,  2698 MB free
12:53:25.658 [i]: System: finding network settings...
12:53:25.687 [i]: Power: AC is ON [1]
12:53:25.698 [i]: Screens: updating information, 2 screen(s) found
12:53:25.698 [i]: Screens: screen 0 (VGA-0) - 1920x1080 @60.000 Hz, x1.0 [68 DPI]
12:53:25.698 [i]: Screens: screen 1 (HDMI-0) - 1920x1080 @60.000 Hz, x1.0 [30 DPI]
12:53:25.698 [i]: Screens: primary screen is 0
12:53:25.714 [i]: Main: preparing video profiles...
12:53:25.752 [i]: Main: preparing performance graphs...
12:53:25.788 [i]: Main: preparing mpv...
12:53:25.809 [i]: Main: preparing remote control...
12:53:25.809 [i]: RemoteControl: started
12:53:25.810 [i]: Main: preparing main menu...
12:53:25.827 [i]: Main: loading extensions...
12:53:25.831 [i]: Extensions: found svplight 2.0.0.116 ...
12:53:25.832 [i]: Settings: loading leds.cfg OK
12:53:25.892 [i]: Main: initialization completed in 301 ms
12:53:25.964 [i]: Updates: checking now...
12:53:28.754 [i]: Performance: quick estimation = 674 (previous value was 667)

Performance test:

12:53:48.890 [i]: Performance: motion vectors estimation = 5687
12:53:59.400 [i]: Performance: CPU-based frame rendering = 8474
12:54:10.332 [i]: Performance: GPU-based frame rendering [gpuID=11] = 22

Disabled GPU accerlation:

 (+) Video --vid=1 (*) (h264 1280x720 25.000fps)
 (+) Audio --aid=1 --alang=ger (*) (dts 6ch 48000Hz)
     Audio --aid=2 --alang=eng (ac3 6ch 48000Hz)
13:04:51.297 [i]: VideoPlayer: mpv connected, waiting for the video info...
AO: [pulse] 48000Hz 5.1(side) 6ch float
VO: [gpu] 1280x720 yuv420p
13:04:53.757 [i]: VideoPlayer: mpv 0.28.0-624-g861c10268d
13:04:54.386 [i]: Media: video 1280x720 [PAR 1.000] at 25.000 fps [constant]
13:04:54.386 [i]: Media: codec type is AVC, YUV/4:2:0/8 bits
13:04:54.711 [i]: Playback: starting up...
13:04:54.738 [i]: Playback [2e5b9ea1]: resulting video frame 1920x1080 [1280x720 -> scaled -> 1920x1080]
13:04:54.738 [i]: Playback [2e5b9ea1]: 1 acceptible profiles, best is 'Automatisch' [0]
13:04:54.743 [i]: Playback [2e5b9ea1]: enabled while video is playing
13:04:54.744 [i]: Profile: using auto values [1]
13:04:54.785 [i]: Playback [2e5b9ea1]: playing at 60 [25 *12/5] 
13:04:55.010 [W]: Lights: attempt to turn on while LED hardware isn't connected
VO: [gpu] 1920x1080 yuv420p

Enabled GPU accerlation

(+) Video --vid=1 (*) (h264 1280x720 25.000fps)
 (+) Audio --aid=1 --alang=ger (*) (dts 6ch 48000Hz)
     Audio --aid=2 --alang=eng (ac3 6ch 48000Hz)
13:07:17.664 [i]: VideoPlayer: mpv connected, waiting for the video info...
AO: [pulse] 48000Hz 5.1(side) 6ch float
VO: [gpu] 1280x720 yuv420p
13:07:18.932 [i]: VideoPlayer: mpv 0.28.0-624-g861c10268d
13:07:19.273 [i]: Media: video 1280x720 [PAR 1.000] at 25.000 fps [constant]
13:07:19.273 [i]: Media: codec type is AVC, YUV/4:2:0/8 bits
13:07:19.298 [i]: Playback: starting up...
13:07:19.306 [i]: Playback [2e5b9ea1]: resulting video frame 1920x1080 [1280x720 -> scaled -> 1920x1080]
13:07:19.306 [i]: Playback [2e5b9ea1]: 1 acceptible profiles, best is 'Automatisch' [0]
13:07:19.307 [i]: Playback [2e5b9ea1]: enabled while video is playing
13:07:19.308 [i]: Profile: using auto values [1]
13:07:19.322 [i]: Playback [2e5b9ea1]: playing at 60 [25 *12/5] 
13:07:19.509 [W]: Lights: attempt to turn on while LED hardware isn't connected
VO: [gpu] 1920x1080 yuv420p

Audio/Video desynchronisation detected! Possible reasons include too slow
hardware, temporary CPU spikes, broken drivers, and broken files. Audio
position will not match to the video (see A-V status field).

opencl.log:

Number of platforms                               1
  Platform Name                                   NVIDIA CUDA
  Platform Vendor                                 NVIDIA Corporation
  Platform Version                                OpenCL 1.2 CUDA 9.1.84
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_fp64 cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll cl_nv_copy_opts cl_nv_create_buffer
  Platform Extensions function suffix             NV

  Platform Name                                   NVIDIA CUDA
Number of devices                                 1
  Device Name                                     GeForce GT 430
  Device Vendor                                   NVIDIA Corporation
  Device Vendor ID                                0x10de
  Device Version                                  OpenCL 1.1 CUDA
  Driver Version                                  390.67
  Device OpenCL C Version                         OpenCL C 1.1 
  Device Type                                     GPU
  Device Profile                                  FULL_PROFILE
  Device Topology (NV)                            PCI-E, 01:00.0
  Max compute units                               2
  Max clock frequency                             1400MHz
  Compute Capability (NV)                         2.1
  Max work item dimensions                        3
  Max work item sizes                             1024x1024x64
  Max work group size                             1024
  Preferred work group size multiple              32
  Warp size (NV)                                  32
  Preferred / native vector sizes                 
    char                                                 1 / 1       
    short                                                1 / 1       
    int                                                  1 / 1       
    long                                                 1 / 1       
    half                                                 0 / 0        (n/a)
    float                                                1 / 1       
    double                                               1 / 1        (cl_khr_fp64)
  Half-precision Floating-point support           (n/a)
  Single-precision Floating-point support         (core)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
    Correctly-rounded divide and sqrt operations  No
  Double-precision Floating-point support         (cl_khr_fp64)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
    Correctly-rounded divide and sqrt operations  No
  Address bits                                    64, Little-Endian
  Global memory size                              1011351552 (964.5MiB)
  Error Correction support                        No
  Max memory allocation                           252837888 (241.1MiB)
  Unified memory for Host and Device              No
  Integrated memory (NV)                          No
  Minimum alignment for any data type             128 bytes
  Alignment of base address                       4096 bits (512 bytes)
  Global Memory cache type                        Read/Write
  Global Memory cache size                        32768
  Global Memory cache line                        128 bytes
  Image support                                   Yes
    Max number of samplers per kernel             16
    Max 2D image size                             16384x16384 pixels
    Max 3D image size                             2048x2048x2048 pixels
    Max number of read image args                 128
    Max number of write image args                8
  Local memory type                               Local
  Local memory size                               49152 (48KiB)
  Registers per block (NV)                        32768
  Max constant buffer size                        65536 (64KiB)
  Max number of constant args                     9
  Max size of kernel argument                     4352 (4.25KiB)
  Queue properties                                
    Out-of-order execution                        Yes
    Profiling                                     Yes
  Profiling timer resolution                      1000ns
  Execution capabilities                          
    Run OpenCL kernels                            Yes
    Run native kernels                            No
    Kernel execution timeout (NV)                 Yes
  Concurrent copy and kernel execution (NV)       Yes
    Number of async copy engines                  1
  Device Available                                Yes
  Compiler Available                              Yes
  Device Extensions                               cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_fp64 cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll cl_nv_copy_opts cl_nv_create_buffer

NULL platform behavior
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  No platform
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   No platform
  clCreateContext(NULL, ...) [default]            No platform
  clCreateContext(NULL, ...) [other]              Success [NV]
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  No platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  No platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR)  No platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM)  No platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL)  No platform

Something wrong with my system or is the information about the GT430 just out of date, and the card is to slow for SVP 4.x?
But I'm absolutly confused about the CPU/GPU utalization. Why is GPU utalization higher if I disable accerlation, and why is GPU utalization just around 10% if accerlation is enabled (no wonder it lags/stutters/desyncs as hell).

Best regards

Re: SVP 4 Linux

> Performance: GPU-based frame rendering [gpuID=11] = 22
> Common KVM processor

Virtualization?

Intel's IGP gives
> Performance: GPU-based frame rendering [gpuID=11] = 457

I really doubt that NV 430 is 20 times slower than Intel 530.
I can believe in 2-3 times but not 20.

219

Re: SVP 4 Linux

Yes this system is virtualized, but performance is at 95% @ everywhere else. What about the low GPU utalization?

Re: SVP 4 Linux

I have no idea about low GPU utilization as long as indicated performance is 10 times lower than it should be.
Just turn off GPU accel. and forget about it.

Re: SVP 4 Linux

efeu wrote:

but performance is at 95% @ everywhere else

Does that apply to GPU performance though?

It was my impression that proper GPU virtualization is only something that's really become a thing in the last year or so (and even then I don't believe it's fully baked yet), and your use of a GT 430 would make all the more likely that you're not using a modern platform that supports such proper GPU virtualization.


One way around this is to use "GPU passthrough" instead, where your host OS uses one GPU by itself and your virtualized OS uses the other GPU by itself (integrated graphics can work as one of these GPUs).  I've never done this myself however and it's my impression that it too doesn't work on all configurations (though I believe it can work on many more configurations than the likes of proper GPU virtualization, especially if integrated graphics is present).

222 (edited by efeu 04-07-2018 08:59:56)

Re: SVP 4 Linux

I'm using GPU passthrough for over 4 years now w/o any issue. You may confuse this with igpu passthrough (which was unusable in the past).

I figured out, that the problem was with nvidia-39xxx, using 340 instead and everything works as expected. GPU load is @98% and CPU load @10%.

Edit:
It seems that with opencl-nvidia-390xx the card stays in lowest power mode and some more issues (like it still could have a higher GPU load even in lowest power mode)
As I read through the internet I see that other ppl having issues with 390 and "older" cards as well.

Edit2:
It's just another bug in nvidias proprietary driver, at least there's some work done on OpenCL support in nouveau driver this summer, maybe we can get rid of this nvidia driver shit later on this year.
I keep it with Linus "NVidia, fuck you!"

Regards

223 (edited by rubenxinternet 29-08-2018 20:44:15)

Re: SVP 4 Linux

I use Manjaro and with the AUR packages I can get SVP and Vapoursynth installed, but when opening file in vlc with svp option in menu, It just plays at 30fps, SVP doesn´t detect any video, is something wrong with vapoursynth or vlc AUR packages?

Re: SVP 4 Linux

what's in the SVP's log?

Re: SVP 4 Linux

I discovered the problem. Apparently, vlc in Spanish doesn´t show the Vapoursynth option in the video filter section. I mean, I had the program in Spanish and I followed a tutorial that didn´t work, but following exactly the same with the program in English did. So, it´s a bug with vlc, vapoursynth and the Spanish translation, SVP works perfectly. I use Manjaro Linux KDE with 1.14 Kernel.
What I didn´t get is mpv to detect SVP, because I don´t know how to compile it with Vapoursynth support, well, I really don´t know how to compile it in general, because I´m new in Linux, so, if you could share a tutorial or something to compile it in Arch Linux it would be great. Because is so easy to download the PPA version in Ubuntu, but isn´t in Manjaro.