Hi folks,
Apologies, i'm able to get opencv compiled successfully (using dlandon's docker) - nvidia-smi shows up the right driver (440.59) for the build. CUDA 10.2 seems to install ok (although
```nvcc --version``` shows as command not found? Does that mean it failed? Cant find any errors in the logs?
What i really need is some guidance how to remove FFMPEG and recompile it with cuvid / cuda support (as cant find a good guide)
If anyone can share or point me in the right direction that would be great its a tad beyond my skillset.
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Oct_23_19:24:38_PDT_2019
Cuda compilation tools, release 10.2, V10.2.89
I did find this guide, so will try this (my concern is matching the variables with what Zoneminder uses)
Recompile ffmpeg
To enable ffmpeg to use the GPU codec provided by CUDA, ffmpeg must be recompiled to enable it to invoke CUDA through dynamic links
First compile and install the nv-codec-headers Library
git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git
make PREFIX="/home/local/ffmpeg_build" BINDDIR="/home/local/bin"
make install PREFIX="/home/local/ffmpeg_build" BINDDIR="/home/local/bin"
Enter the / home/local/ffmepg_sources/ffmpeg-3.3.8/directory to re-execute ffmpeg compilation and installation
Note the difference between the configure command parameter and the previous configure command parameter
ok, i'm clearly not understanding this correctly. recompiling is giving me a bunch of warnings about things not present, despite using the same variables as the existing ffmpeg (would they be located in a different location?)
The docs assume a deep technical knowledge, so are quite useless.
Each time i'm prepping the ffmpeg compile (below) something else isnt found and I have to install it. Definitely cant be right?
i'm assuming based on the dockerfile it was just installed with `apt install ffmpeg` but i would have thought it would have only installed those items available on the system and installed?
This is absurd
Is there documented anywhere what is needed from the ffmpeg to run default Zoneminder?
Half of these libraries are named differently and there is no consistency whatsoever.
I can't imagine zoneminder is using all these libraries, despite the list output.
Building packages from source is not for everyone. It's why binary distributions are popular.
Build options (naming) can change across versions. My approach is to at least script the build, so I can tweak and then re-run.
Do you need to bother? Probably not. Try the least options that get you your hardware encoding. You probably want x264. Then try it and also log ffmpeg debug.
cd ~/ffmepg_sources/
git clone --depth=1 https://github.com/OpenVisualCloud/SVT-AV1
cd SVT-AV1
cd Build
cmake .. -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release
make -j4
sudo make install
cd ~/ffmpeg_sources/
git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git
cd nv-codec-headers
make
sudo make install
and finally ffmpeg (which is where I get stuck) as it seems to compile ok, but I'm not sure the order I need?
Should I "apt remove ffmpeg" first? then make install?
You can do a remove using your package manager, just to keep it tidy. If you don’t then your make install will overwrite anything, provided you use the exact same paths as your system has for the libraries and the binaries.
The only downside of the apt remove is when you try to install software that contains FFMPEG as a dependency. You might take the view that leaving it installed in apt and then re-running your custom install afterwards is the simpler option. Depends how you use the machine.
welp - still going and no closer (in fact a big loop lol)
went down a gcc-10 rabbit hole
weirdly, cuda doesnt seem to be fully installed (i'm assuming it pulls down a lot more packages from Nvidia)
as despite adding the cuda location to PATH, the FFMPEG ./configure fails and complains about Error: failed checking for nvcc
I've also updated to CUDA 11.1 and driver 455.38 in the hopes that magically made it easier.
I cant believe there isnt an installer/deb for Ubuntu 18.04 with cuvid, or some kind of script where you specify what is needed and it grabs the dependencies or compiles that as well?