H265 Hardware encoding with Intel 'Quick Sync Video'

Digital ATV - The latest generation, cutting edge ATV - Please discuss it all here.
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
Post Reply
g4eml
Posts: 686
Joined: Thu Apr 26, 2018 9:36 am

H265 Hardware encoding with Intel 'Quick Sync Video'

Post by g4eml » 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

g4eml
Posts: 686
Joined: Thu Apr 26, 2018 9:36 am

Re: H265 Hardware encoding with Intel 'Quick Sync Video'

Post by g4eml » Fri Feb 26, 2021 10:05 pm

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?

M0DTS
Posts: 656
Joined: Sun Feb 24, 2008 9:03 pm

Re: H265 Hardware encoding with Intel 'Quick Sync Video'

Post by M0DTS » Sat Feb 27, 2021 9:48 am

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

G4FKK
Posts: 135
Joined: Sun May 05, 2019 12:15 pm

Re: H265 Hardware encoding with Intel 'Quick Sync Video'

Post by G4FKK » Mon Mar 01, 2021 12:31 am

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

g4eml
Posts: 686
Joined: Thu Apr 26, 2018 9:36 am

Re: H265 Hardware encoding with Intel 'Quick Sync Video'

Post by g4eml » Mon Mar 01, 2021 10:37 am

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.

radiogareth
Posts: 1226
Joined: Wed Jan 06, 2016 9:46 am

Re: H265 Hardware encoding with Intel 'Quick Sync Video'

Post by radiogareth » Mon Mar 01, 2021 12:14 pm

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

G8KWR
Posts: 28
Joined: Tue Jun 16, 2020 3:41 pm

Re: H265 Hardware encoding with Intel 'Quick Sync Video'

Post by G8KWR » Mon Mar 01, 2021 12:40 pm

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.

g4eml
Posts: 686
Joined: Thu Apr 26, 2018 9:36 am

Re: H265 Hardware encoding with Intel 'Quick Sync Video'

Post by g4eml » Mon Mar 01, 2021 1:28 pm

Hi Gareth,

According to the intel specification the I7-7820HQ includes Quick Sync Video and so it should work.

Colin.

radiogareth
Posts: 1226
Joined: Wed Jan 06, 2016 9:46 am

Re: H265 Hardware encoding with Intel 'Quick Sync Video'

Post by radiogareth » Mon Mar 01, 2021 7:07 pm

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

Post Reply

Return to “DATV - Digital ATV”