Well I've tried everything. Ubuntu 20.04 with VAAPI enabled running the dev version of Zoneminder 1.37.0 but the same problem exists on 1.36.0.
VAAPI is working to decode the video from my monitors. I can see the GPU usage using intel-gpu-top. No problem on the decoding side.
I'm trying to use VAAPI to encode MP4s for my monitor events. Under the Storage options I select h264 and h264_vaapi but the resulting video produced has a very low bitrate and is extremely poor quality. The only good thing is the file size is very small, result of the bitrate. I've tried every option I can think of under Optional Encoder Parameters but nothing changes the output. I would expect "b:v=5M" should give me a 5Mb bitrate but it does nothing.
Using ffmpeg and VAAPI hwaccel from the command prompt and encoding an MP4 from my RTSP camera feeds works flawless. I get a nice high quality MP4.
Also, using libx264 under the Storage options instead or x264_vaapi works great as well.
Any ideas? Has anyone got this working?
Thanks
Encoding MP4 Storage use VAAPI - Poor Quality
Re: Encoding MP4 Storage use VAAPI - Poor Quality
I know this is very late for you and very likely not of use for you any more. But since I struggled with the same issue for the last 2 hours and finally found a solution, I hope it helps others with the same problem.
The issue (for me) here was, that the h265_vaapi encoder does not know of the CRF parameter yet. This is also documented in the ffmpeg documentation. However I was not able to find a substitute for it until now.
In the Camera -> Storage -> Optional Encoder Parameters field, I removed the default values and just have qp=25 (still have to play with the value) in it and the blocky, low resolution recording switched to a clear, fine looking picture now.
The issue (for me) here was, that the h265_vaapi encoder does not know of the CRF parameter yet. This is also documented in the ffmpeg documentation. However I was not able to find a substitute for it until now.
In the Camera -> Storage -> Optional Encoder Parameters field, I removed the default values and just have qp=25 (still have to play with the value) in it and the blocky, low resolution recording switched to a clear, fine looking picture now.