H265 Hardware encoding with Intel 'Quick Sync Video'
Forum rules
This forum is run by the BATC (British Amateur Television Club), it is service made freely available to all interested parties, please do not abuse this privilege.
Thank you
This forum is run by the BATC (British Amateur Television Club), it is service made freely available to all interested parties, please do not abuse this privilege.
Thank you
H265 Hardware encoding with Intel 'Quick Sync Video'
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
Re: H265 Hardware encoding with Intel 'Quick Sync Video'
I am sending the output of ffmpeg to my pluto and this is working well. However I still need to access the Pluto web interface to set the modulator parameters to match the UDP stream. So changing transmission mode needs multiple actions. It would be nice to be able to do this from the script.
Using RTMP I can send the Pluto modulator parameters as part of the stream URL. Is there any way to do this when using UDP? Alternatively is there any other way to set the modulator remotely without using the web interface?
Using RTMP I can send the Pluto modulator parameters as part of the stream URL. Is there any way to do this when using UDP? Alternatively is there any other way to set the modulator remotely without using the web interface?
Re: H265 Hardware encoding with Intel 'Quick Sync Video'
No easy way of scripted control yet Colin as far as i'm aware.
Evariste is currently working with MQTT on the pluto, all the parameters will soon be published via MQTT over network.
Hopefully we can make a script which monitors these settings and adjusts ffmpeg parameters accordingly.
Rob
Evariste is currently working with MQTT on the pluto, all the parameters will soon be published via MQTT over network.
Hopefully we can make a script which monitors these settings and adjusts ffmpeg parameters accordingly.
Rob
Re: H265 Hardware encoding with Intel 'Quick Sync Video'
Hi Colin,
Many thanks for your research. It turns out my ancient PC with its i5-4570 supports h264_qsv. It doesn't appear to have the H265 capability but it does mean I can use OBS through the Portsdown. Hitherto this was more or less impossible when trying to make the PC do software encoding. Dominique's script works very well with the slight mods required.
73, Martin - G4FKK
Many thanks for your research. It turns out my ancient PC with its i5-4570 supports h264_qsv. It doesn't appear to have the H265 capability but it does mean I can use OBS through the Portsdown. Hitherto this was more or less impossible when trying to make the PC do software encoding. Dominique's script works very well with the slight mods required.
73, Martin - G4FKK
Re: H265 Hardware encoding with Intel 'Quick Sync Video'
Hi Martin,
I am glad it was useful. I suspect many people may already have hardware encoding available without realising it. I certainly did.
From what I understand H265 encoding was first available in the 6xxx or 6th generation of processors, also called SkyLake, released in 2015.
73
Colin.
I am glad it was useful. I suspect many people may already have hardware encoding available without realising it. I certainly did.
From what I understand H265 encoding was first available in the 6xxx or 6th generation of processors, also called SkyLake, released in 2015.
73
Colin.
-
- Posts: 1234
- Joined: Wed Jan 06, 2016 9:46 am
Re: H265 Hardware encoding with Intel 'Quick Sync Video'
For us 'PC illiterates' is there a way to find this sort of info about our PC/laptops etc out?
Using Task manager my recent 2nd hand laptop reports I7-7820HQ@2.9GHz (with a nice fast SSD too) and also shows a Nvidea GeForce930.
I can but HOPE it might have, but unsure how to check. My Older desktop says I7-4770K @ 3.5GHz and is has a recently fitted Nvidea GEforce GT710.
Thanks
Gareth
Using Task manager my recent 2nd hand laptop reports I7-7820HQ@2.9GHz (with a nice fast SSD too) and also shows a Nvidea GeForce930.
I can but HOPE it might have, but unsure how to check. My Older desktop says I7-4770K @ 3.5GHz and is has a recently fitted Nvidea GEforce GT710.
Thanks
Gareth
Re: H265 Hardware encoding with Intel 'Quick Sync Video'
Go into the search button on the task bar at the bottom of your screen, and search for "System Information"; in the results it should shows "System Information" under Apps. Click on that.
Once you have that open, you can click on the "Components" menu, and then "Display". Should have the information you want.
Hope that helps.
Once you have that open, you can click on the "Components" menu, and then "Display". Should have the information you want.
Hope that helps.
Re: H265 Hardware encoding with Intel 'Quick Sync Video'
Hi Gareth,
According to the intel specification the I7-7820HQ includes Quick Sync Video and so it should work.
Colin.
According to the intel specification the I7-7820HQ includes Quick Sync Video and so it should work.
Colin.
-
- Posts: 1234
- Joined: Wed Jan 06, 2016 9:46 am
Re: H265 Hardware encoding with Intel 'Quick Sync Video'
Thanks for the pointers, I have that page and the only bit that makes much sense is "Intel(r) HD Graphics 630".
No mention of 'Quick Sync Video'. Searching for the term didn't throw anything up either.
But it 'sounds promising' once I get my head around using scripts....
Gareth
No mention of 'Quick Sync Video'. Searching for the term didn't throw anything up either.
But it 'sounds promising' once I get my head around using scripts....
Gareth