Closed arkanoid87 closed 5 months ago
Which build of frigate are you using?
docker image: ghcr.io/blakeblackshear/frigate:stable
cat version.py
VERSION = "0.13.2-6476f8a"
this build uses a specific build targeted at the rpi that ensures hwaccel works, the standard ffmpeg build has broken hwacel for the rpi numerous times
https://github.com/blakeblackshear/frigate/issues/2030 https://github.com/blakeblackshear/frigate/issues/3780
I don't foresee the build changing as that has led to a lot of work on our side in the past and this is working well for decoding. Frigate supports using a custom build of ffmpeg so that's likely the route that you'll want to take. https://docs.frigate.video/configuration/advanced#custom-ffmpeg-build
thanks for the answer
I see another possible route: exec gstreamer pipeline instead of ffmpeg gstreamer let you set custom v4l2 device settings on the encoder device, avoiding copy just as m2m. It should be possible to publish to go2rtc rtsp server
@arkanoid87 I made a patch to ffmpeg similar to the one you linked, this fixes the missing headers. Confirmed working on my Raspberry Pi 4B.
Describe what you are trying to accomplish and why in non technical terms transcode from mjpeg to h264 using hardware acceleration (v4l2m2m) on rpi4 via go2rtc
Describe the solution you'd like generated h264 stream is created but cannot be decoded due to missing h264 headers
encoder params are not properly set in ffmpeg v4l2m2m https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/v4l2_m2m_enc.c
Describe alternatives you've considered patching ffmpeg https://lists.ffmpeg.org/pipermail/ffmpeg-user/2020-December/051067.html