update FFmpeg for Rockchip (#11351)

This commit is contained in:
Marc Altmann
2024-05-13 14:52:11 +02:00
committed by GitHub
parent fbec08354c
commit 67bff1e79e
3 changed files with 33 additions and 45 deletions

View File

@@ -113,20 +113,6 @@ if int(os.environ["LIBAVFORMAT_VERSION_MAJOR"]) < 59:
"-fflags nobuffer -flags low_delay -stimeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_transport tcp -i {input}"
)
# add hardware acceleration presets for rockchip devices
# may be removed if frigate uses a go2rtc version that includes these presets
if go2rtc_config.get("ffmpeg") is None:
go2rtc_config["ffmpeg"] = {
"h264/rk": "-c:v h264_rkmpp_encoder -g 50 -bf 0",
"h265/rk": "-c:v hevc_rkmpp_encoder -g 50 -bf 0",
}
else:
if go2rtc_config["ffmpeg"].get("h264/rk") is None:
go2rtc_config["ffmpeg"]["h264/rk"] = "-c:v h264_rkmpp_encoder -g 50 -bf 0"
if go2rtc_config["ffmpeg"].get("h265/rk") is None:
go2rtc_config["ffmpeg"]["h265/rk"] = "-c:v hevc_rkmpp_encoder -g 50 -bf 0"
for name in go2rtc_config.get("streams", {}):
stream = go2rtc_config["streams"][name]