Cant get Zoneminder to use CUDA
Posted: Thu Nov 19, 2020 2:33 pm
I am running Zoneminder v1.35.14 frm iconnor PPA. I have compiled ffmpeg with cuda support using options,
and can confirm cuda is working
I tested ffmpeg on the camera and it uses 3% CPU which is significantly less than what ZM uses without CUDA.
Unfortunately, I have not been able to get ZM working with CUDA. I changed PATH_FFMPEG option to my compiled version. Also, set DecoderHWAccelName to CUDA. However, still zmc is still using higher cpu.
Is there any way to find out whether ZM is using my ffmpeg instead of native one? ps -auxww does not show any ffmpeg. Wonder if ffmpeg is being used at all. The Camera source type is set to 'ffmpeg' with 'H264 passthrough'.
Code: Select all
./configure --enable-nonfree --enable-cuda-nvcc --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 --prefix=/opt/ffmpeg
Code: Select all
$ /opt/ffmpeg/bin/ffmpeg -hwaccels
ffmpeg version N-99932-g17a0dfebf5 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration: --enable-nonfree --enable-cuda-nvcc --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 --prefix=/opt/ffmpeg
libavutil 56. 60.100 / 56. 60.100
libavcodec 58.112.103 / 58.112.103
libavformat 58. 64.100 / 58. 64.100
libavdevice 58. 11.102 / 58. 11.102
libavfilter 7. 90.100 / 7. 90.100
libswscale 5. 8.100 / 5. 8.100
libswresample 3. 8.100 / 3. 8.100
Hardware acceleration methods:
cuda
Code: Select all
/opt/ffmpeg/bin/ffmpeg -hwaccel cuda -i "rtsp://admin:admin@192.168.1.1:554/cam/realmonitor?channel=1&subtype=0" -an -f rawvideo -y /dev/null
Is there any way to find out whether ZM is using my ffmpeg instead of native one? ps -auxww does not show any ffmpeg. Wonder if ffmpeg is being used at all. The Camera source type is set to 'ffmpeg' with 'H264 passthrough'.