H264 hardware accelerated

Asking here even if am unsure if it is best place to start as the fear is that it is cross boundaries one.

WebRTC supports hardware acceleration as per i.e.:
http://webrtcbydralex.com/index.php/2020/04/03/h265-hevc-hardware-accelerated-in-webrtc-done-well-almost/

This is sort of two fold question/problem:

  • is it that request for hardware accelerated stream has to be made from browser/based on what i.e. Jitsi instructs browser to do or is it that hardware support is checked first just due to nature of how WebRTC is coded?
  • if webcam supports h264 stream on top of yuyv and mjpeg, will WebRTC/Jitsi select first the h264? Assuming that bridge is pushed to h264 or for p2p.

Motivation - looking for a simple and relatively cheap setup based on Pi 4 which theoretically has acceleration, but maybe something is missing.
For 1080p am getting at max 4-6 fps with CPU maxed out and having GPU at browser level enabled (https://lemariva.com/blog/2020/08/raspberry-pi-4-video-acceleration-decode-chromium).
95% of time the system will be not doing anything hence looking towards arm based one to limit power consumption/overall price.

Current webcam is Logitech C920 (which used to have h264, but not anymore - removed by Logitech back in 2018).

Options being considered:

  • get other webcam with h264 stream provided - there are some ~50EUR one available, but am afraid of picture quality or pay premium for Logitech with h264 (business line)
  • get other unit, i.e. Nvidia Jetson 2GB with GPU onboard - also risk is that hw h264 encoding won’t be picked up by browser and don’t want to throw another $$$ on just simple test.

Thanks in advance!

Hi, I am facing the exact same issue here. I am trying to get the GPU acceleration running on raspi 4 chromium, which works well for HD video streams from Youtube etc. (CPU load for HD video is low) but for Jitsi it sill brings huge stress on the CPU. This also causes the the resolution to drop to miserable levels. I also use a logitech 920 and also another one (papalook PA920). Allegedly both should support h264 but I have my doubts.
To make a long story short: If there is any solution out there please let me know.

The H264 decoder is needed in the Youtube case but it’s needed the H264 encoder too in Jitsi case. Probably chromium can’t use the hardware encoder

Yes you are absolutely right. I successfully activated the video decoding with hardware acceleration based on various tutorials. With this the decoding of the video to watch on the screen works on the GPU. I can see this from when the webcam video is displayed before the conference starts, and also when watching HD Youtube content. The CPU load is moderate (30%).
As soon as a second caller enters the call my video is being encoded and sent along to the other participant increasing the CPU load to 99%. So basically yes: The Encoding currently is not hardware accelerated in Chromium (h.264). I was looking for a couple of tutorials (this and this how to get this running but was not lucky yet. Still the CPU is maxed out and the resolution is max at 360p.

Reg. webcam with h.264 raw stream: Logitech has ditched the support couple of years ago. I tested even a Logitech Rally PTZ Camera (>1000 EURO) but did not get a better picture or reduced CPU load. So it is really back to the hardware acceleration on the encoding of the video. Can anyone suggest a workable solution on how to get this up and running?
It really is the last hurdle I have to take before deploying a really great, super simple to use and moderately priced conferencing solution for my family.