mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-09-26 19:41:29 +08:00
Improve ffmpeg versions handling (#16712)
* Improve ffmpeg versions handling * Remove fallback from LIBAVFORMAT_VERSION_MAJOR, it should always be set * Mention ffprobe in custom ffmpeg docs * Fix ffmpeg extraction * Fix go2rtc example formatting * Add fallback back to LIBAVFORMAT_VERSION_MAJOR * Fix linter
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import json
|
||||
import os
|
||||
import shutil
|
||||
import sys
|
||||
|
||||
from ruamel.yaml import YAML
|
||||
@@ -35,10 +34,7 @@ except FileNotFoundError:
|
||||
|
||||
path = config.get("ffmpeg", {}).get("path", "default")
|
||||
if path == "default":
|
||||
if shutil.which("ffmpeg") is None:
|
||||
print(f"/usr/lib/ffmpeg/{DEFAULT_FFMPEG_VERSION}/bin/ffmpeg")
|
||||
else:
|
||||
print("ffmpeg")
|
||||
print(f"/usr/lib/ffmpeg/{DEFAULT_FFMPEG_VERSION}/bin/ffmpeg")
|
||||
elif path in INCLUDED_FFMPEG_VERSIONS:
|
||||
print(f"/usr/lib/ffmpeg/{path}/bin/ffmpeg")
|
||||
else:
|
||||
|
Reference in New Issue
Block a user