Correctly calculate ffmpeg version based on ffmpeg path (#16041)

* Correctly calculate ffmpeg version based on ffmpeg path

* Formatting
This commit is contained in:
Nicolas Mowen
2025-01-18 20:30:35 -06:00
committed by GitHub
parent 3947e79086
commit 0ee2e404da
5 changed files with 58 additions and 3 deletions
@@ -42,8 +42,14 @@ function migrate_db_path() {
fi
}
function set_libva_version() {
local ffmpeg_path=$(python3 docker/main/rootfs/usr/local/ffmpeg/get_ffmpeg_path.py)
export LIBAVFORMAT_VERSION_MAJOR=$($ffmpeg_path -version | grep -Po "libavformat\W+\K\d+")
}
echo "[INFO] Preparing Frigate..."
migrate_db_path
set_libva_version
echo "[INFO] Starting Frigate..."
cd /opt/frigate || echo "[ERROR] Failed to change working directory to /opt/frigate"