internal/ffmpeg/hardware/README.md
You DON'T need hardware acceleration if:
#video=copy for the FFmpeg source#audio=... (any audio) transcoding for the FFmpeg sourceYou NEED hardware acceleration if you're using #video=h264, #video=h265, #video=mjpeg (video) transcoding.
streams:
# auto select hardware encoder
camera1_hw: ffmpeg:rtsp://rtsp:[email protected]/av_stream/ch0#video=h264#hardware
# manual select hardware encoder (vaapi, cuda, v4l2m2m, dxva2, videotoolbox)
camera1_vaapi: ffmpeg:rtsp://rtsp:[email protected]/av_stream/ch0#video=h264#hardware=vaapi
There are two versions of the Docker container and Hass Add-on:
Supported on: Windows binary, Linux binary, Docker, Hass Addon.
If you have an Intel Sandy Bridge (2011) CPU with graphics, you already have hardware decoding/encoding support for AVC/H.264.
If you have an Intel Skylake (2015) CPU with graphics, you already have hardware decoding/encoding support for AVC/H.264, HEVC/H.265 and MJPEG.
Linux and Docker:
/dev/dri/ folder on your host.Docker users should add the --privileged option to the container for access to the hardware.
PS. Supported via VAAPI engine on Linux and DXVA2+QSV engine on Windows.
I don't have the hardware to test this!!!
Supported on: Linux binary, Docker, Hass Addon.
Docker users should install: alexxit/go2rtc:master-hardware. Docker users should add the --privileged option to the container for access to the hardware.
Hass Addon users should install go2rtc master hardware version.
PS. Supported via VAAPI engine.
Supported on: Windows binary, Linux binary, Docker.
Docker users should install: alexxit/go2rtc:master-hardware.
PS. Supported via CUDA engine.
Supported on: Linux binary, Docker, Hass Addon.
I don't recommend using transcoding on the Raspberry Pi 3. It's extremely slow, even with hardware acceleration. Also, it may fail when transcoding a 2K+ stream.
I don't have the hardware to test this!!!
Supported on: Linux binary, Docker, Hass Addon.
PS. Supported via v4l2m2m engine.
In my tests, transcoding is faster on the M1 CPU than on the M1 GPU. Transcoding time on the M1 CPU is better than any Intel iGPU and comparable to an NVIDIA RTX 2070.
PS. Supported via videotoolbox engine.
Tested