H265 Hardware encoding with Intel 'Quick Sync Video'
Posted: Fri Feb 26, 2021 6:00 pm
After seeing the good results achieved by G4KLB using Dominique's FFMPEG script last night on the QO-100 net I was disappointed that I could not add an Nvidia card to my Intel NUC computer which I use for DATV. That only has the built in Embedded Intel graphics and no room to fit any extra cards.
However after a bit of searching it appears that many of the newer Intel processors do in fact include hardware video encoding for H265. I don't recall ever seeing this mentioned on the forum. This is part of the intel 'Quick Sync Video' support which appears to be included with the newer 'Lake' series of processors. Intel's numbering and naming scheme for processors is extremely confusing but it appeared that my Core i5 7260U processor did in fact support H265.
Looking at the ffmpeg documentation it does have hardware encoding support for quick sync video. The relevant encoders are named h264_qsv and hevc_qsv which seem to do the same job as the Nvidia h264_nvenc and hevc_nvenc encoders.
So I modified Dominique's script to use these two encoders and to my surprise it worked straight away!. It successfully generated H264 and H265 video which when sent to my Pluto was received OK on my Ryde receiver.
On closer inspection of the ffmpeg output there were a couple of warning messages.
One saying that 'yuv420p' pixel format was not supported and nv12 would be used instead.
The second error said that the -rc option was not being used by any encoder and had been ignored.
The documentation on the qsv encoders state that yuv420p is not supported and there is no mention of -rc, so I further modified the script to change the pixel format to nv12 and removed the -rc option. The warnings are now gone and the resulting signal still seems to be received OK.
In summary the necessary changes to Dominique's script are:-
Replace 'h264_nvenc' with 'h264_qsv'
Replace 'hevc_nvenc' with 'hevc_qsv'
Replace 'yuv420p' with 'nv12'
Remove '-rc cbr_hq'
I will do some more testing over the next few days but the initial results look encouraging. The Intel NUC computers seem to use the same chipsets as used in laptops so this may enable H265 to be used by more people without needing extra hardware.
Colin G4EML
However after a bit of searching it appears that many of the newer Intel processors do in fact include hardware video encoding for H265. I don't recall ever seeing this mentioned on the forum. This is part of the intel 'Quick Sync Video' support which appears to be included with the newer 'Lake' series of processors. Intel's numbering and naming scheme for processors is extremely confusing but it appeared that my Core i5 7260U processor did in fact support H265.
Looking at the ffmpeg documentation it does have hardware encoding support for quick sync video. The relevant encoders are named h264_qsv and hevc_qsv which seem to do the same job as the Nvidia h264_nvenc and hevc_nvenc encoders.
So I modified Dominique's script to use these two encoders and to my surprise it worked straight away!. It successfully generated H264 and H265 video which when sent to my Pluto was received OK on my Ryde receiver.
On closer inspection of the ffmpeg output there were a couple of warning messages.
One saying that 'yuv420p' pixel format was not supported and nv12 would be used instead.
The second error said that the -rc option was not being used by any encoder and had been ignored.
The documentation on the qsv encoders state that yuv420p is not supported and there is no mention of -rc, so I further modified the script to change the pixel format to nv12 and removed the -rc option. The warnings are now gone and the resulting signal still seems to be received OK.
In summary the necessary changes to Dominique's script are:-
Replace 'h264_nvenc' with 'h264_qsv'
Replace 'hevc_nvenc' with 'hevc_qsv'
Replace 'yuv420p' with 'nv12'
Remove '-rc cbr_hq'
I will do some more testing over the next few days but the initial results look encouraging. The Intel NUC computers seem to use the same chipsets as used in laptops so this may enable H265 to be used by more people without needing extra hardware.
Colin G4EML