Closed pat357 closed 7 years ago
I haven't tried it ever again since cuvid stopped needing cuda, likely still works. $cuda_path is set by the CUDA SDK installer to where the SDK is installed. Just make sure it is, and if not it means you haven't installed the necessary components.
You need the whole SDK. Arch Linux's cuda package is also 2.2GB. This is not like decklink where it's just three files. You need CUDA SDK installed to compile and to run whatever it's compiled into.
What version from CUDA SDK is prefered ? Currently I have the v6.5 cudart32_65.dll /cudart64_65.dll that came with display driver install. I don't know why my 09/16 display driver installed v6.5 since v7.0, v7.5 is also released and now v8.0 is in development. Can I install v8.0 beta while display driver folder contains the CUDA 6.5 RT ? I've also download CUDA SDK v7.5 and noticed this one has a folder /include in the root and a folder /lib also in the root. This could point to the expected structure in MPV with "$CUDA_PATH"/include and "$CUDA_PATH"/lib.
I hope that a few users from media-autobuild-suite are using libnpp already and have successful compiled MPV with it. Maybe just waiting until that user kicks in.....
I only tried with 7.5 back when I added this and tried just now with 8.0. These options in the installer should be enough to both compile and run:
I hope that a few users from media-autobuild-suite are using libnpp already and have successful compiled MPV with it.
Doubt it. You need a Nvidia GPU, be using cuvid and nvenc to be worth the effort of using -vf scale_npp
, and you need CUDA SDK installed to even run FFmpeg. Too much trouble just to have faster scaling.
The GPU drivers install some CUDA runtime DLLs (cuvid and nvenc), but not the libs needed for scale_npp.
Just tried now, still works:
ffmpeg -y -hwaccel cuvid -c:v hevc_cuvid -i input-hevc8-4k.mkv -vf scale_npp=-1:720 -c:v hevc_nvenc -an out.mkv
I was under the impression that libnpp does more than scaling, but I'm not sure. Any idea what kind of scaling algoritm it uses ? I hope not some low Q as nearest neighbour or bilinear.. I wonder how ffmpeg finds the CUDA libs ? If I look in configure: enabled libnpp && require libnpp npp.h nppGetLibVersion -lnppi -lnppc
Did you have to copy /include and /lib from CUDA dir to the standard $LOCALDESTDIR/include & $LOCALDESTDIR/lib ?
Any idea what kind of scaling algoritm it uses ? I hope not some low Q as nearest neighbour or bilinear..
It's all documented in FFmpeg.
Did you have to copy /include and /lib from CUDA dir to the standard $LOCALDESTDIR/include & $LOCALDESTDIR/lib ?
No.
I doesn't work out of the box for me: I get an error because my CUDA-PATH contains spaces, which are not properly handled by GCC.
From my config.log created by ffmpeg configure:
gcc -D_FORTIFY_SOURCE=2 -D__USE_MINGW_ANSI_STDIO=1 -mthreads -O2 -march=native -pipe -DLIBTWOLAME_STATIC -fopenmp -DCACA_STATIC -DMODPLUG_STATIC -DCHROMAPRINT_NODLL -DZMQ_STATIC -DPTW32_STATIC_LIB -DKVZ_STATIC_LIB -IC:/PROGRA~1/NVIDIA GPU Computing Toolkit/CUDA/v8.0/include -c -o /tmp/ffconf.vCGZu6jX.o /tmp/ffconf.5e6Csr7c.c
gcc.exe: error: GPU: No such file or directory
gcc.exe: error: Computing: No such file or directory
gcc.exe: error: Toolkit/CUDA/v8.0/include: No such file or directory
C compiler test failed.
Any idea how to handle it ?
Yes, send me logs.zip so I can know what you're doing wrong. Script works for me.
Here is the log: https://0x0.st/yVn.zip
Yeah, sorry, your scripts are too different from mine. I can't help you there.
Euh ..? I just got those scripts from your site !! Only the bat is a bit older, but the 3 .sh scripts must be identical to yours !
They're clearly not, or else they'd work. The compile.log looks absolutely nothing like it's supposed to. I've seen your altered scripts before, I know you do it. I hope you don't expect me to fix some issue that's not in the original scripts. I'm not paid to do your work for you, nor to guess what you screwed up in your changes to the scripts.
Yes, there are probably parts in the log that were from my altered script, but at a certain moment I replaced all my scripts with the latest from your site to test, but the problem remained. I would never bothered you with a problem that's only present in my altered script files, I always test first with the official scripts . The last of the log is pure original scripts, which were also in the zip. If you take a look in config.log from ffmpeg 64bit configure, you'd see the problem. It has everything to do with the spaces in my CUDA_PATH:
gcc -D_FORTIFY_SOURCE=2 -D__USE_MINGW_ANSI_STDIO=1 -mthreads -mtune=generic -O2 -pipe -DLIBTWOLAME_STATIC -fopenmp -DCACA_STATIC -DMODPLUG_STATIC -DCHROMAPRINT_NODLL -DZMQ_STATIC -DPTW32_STATIC_LIB -DKVZ_STATIC_LIB -IC:/PROGRA~1/NVIDIA GPU Computing Toolkit/CUDA/v8.0/include -c -o /tmp/ffconf.1CM3aXxA.o /tmp/ffconf.1y2u0bAk.c
gcc.exe: error: GPU: No such file or directory
gcc.exe: error: Computing: No such file or directory
gcc.exe: error: Toolkit/CUDA/v8.0/include: No such file or directory
C compiler test failed.
I have reinstalled the CUDA SDK to a path without spaces and now everything works ! But technically it should be possible to work with paths containing spaces.
Can you have a look how the paths look like when gcc starts ? Are these paths quoted when GCC gets them ?
It seems that cygpath is the culprit:
$ cygpath -sm "c:\Program Files\Pismo File Mount Audit Package"
C:/PROGRA~1/Pismo File Mount Audit Package
convert to DOS
patrick@Win7 /trunk
$ cygpath -d "c:\Program Files\Pismo File Mount Audit Package"
C:\PROGRA~1\Pismo File Mount Audit Package
C:\PROGRA~1\Pismo File Mount Audit Package is certainly not a DOS path, DOS only reads 8dot3 filenames, IIRC
Why does it convert C:\Program Files to C:\PROGRA~1 but not \Pismo File Mount Audit Package to a 8dot3 equivalent ? I would have expected something like C:\PROGRA~1\PISMO~1\ . When you tested, did you CUDA_PATH also contained spaces ?
Yes, default installation path.
λ cygpath -sm "$CUDA_PATH"
C:/PROGRA~1/NVIDIA~2/CUDA/v8.0
Seems like a problem with your cygpath.
What package contains cygpath ? Will try to reinstall the thing...
pacman -Qo $(which cygpath.exe)
I just have a question: What do I need to install to be able to compile FFmpeg/MPV with libnpp ? I downloaded CUDA toolkit v8.0.61, but this file is a whopping 1.2 GB !! I really hope I do not have to install the whole thing (I do not plan to develop CUDA-things myself). What files are needed by ffmpeg/MPV ? Is 8.0 (no final yet, IIRC) even the recommended version ?
According to CUDA-Z (http://sf.net/projects/cuda-z/) I have: Display Driver Version: 373.06 Driver Dll Version: 8.0 (6.14.13.7306) Runtime Dll Version: 6.50
It seems my display-driver installation installed v6.5 cudart(32|64)_65.dll I suppose the "$CUDA_PATH" for MPV is the location from the installed files ?