This commit is contained in:
root
2026-05-18 06:48:30 +00:00
parent f1145e3a36
commit e638a4656c
14 changed files with 172 additions and 11 deletions

View File

@@ -269,8 +269,9 @@ def build_profile() -> dict:
def suggest_video_encoder(profile: dict) -> str:
"""在 Linux 上根据 ffmpeg 能力与探测结果给出可选硬件编码器名(供 douyin→YouTube 读取 LIVE_VIDEO_ENCODER)。
优先级:RKMPP(常见 ARM SoC)→ V4L2M2M(通用 ARM/部分板)→ VA-API(x86 核显)→ QSV(Intel x86)。
优先级:RKMPP(常见 ARM SoC)→ V4L2M2M(通用 ARM/部分板)→ VA-API(x86 核显)。
NVIDIA 由 douyin_youtube_ffplay 内单独检测 h264_nvenc,此处不重复写入。
QSV 在部分 Linux 发行版上需要额外的设备/滤镜链路,本项目默认不自动启用,以优先保证跨机兼容性。
"""
if platform.system().lower() != "linux":
return ""
@@ -291,8 +292,6 @@ def suggest_video_encoder(profile: dict) -> str:
return ""
if "h264_vaapi" in text and render_ok and "vaapi" in hwaccels:
return "h264_vaapi"
if machine in ("x86_64", "amd64") and "h264_qsv" in text:
return "h264_qsv"
return ""