修复线上视频导出失败 + 配音预览音画同步
- Dockerfile: 补装 ffmpeg 与中文字体 fonts-noto-cjk,修线上导出报 "No such file or directory: 'ffmpeg'" 及字幕中文方块;换阿里云 apt 源防构建超时 - export.py: 字幕字体加载加 Noto CJK glob 兜底,适配不同版本 fonts-noto-cjk - pipeline.tsx: 配音预览改 Web Audio 精确排程(借鉴 WebAV)——预解码 + source.start(when,offset) + 增量重排,正在发声的句绝不掐断,消除字幕音错位与卡顿 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,15 @@ ENV PYTHONUNBUFFERED=1 \
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# 视频导出(stage5 拼接)靠 ffmpeg 二进制;字幕用 Pillow 渲染 PNG 需中文字体(fonts-noto-cjk),
|
||||
# 否则线上导出报 "No such file or directory: 'ffmpeg'" / 中文字幕变方块。slim 镜像默认两者都无。
|
||||
# 换阿里云 apt 源避免国内构建超时(兼容 bookworm 的 deb822 与旧 sources.list 两种格式)。
|
||||
RUN (sed -i 's|deb.debian.org|mirrors.aliyun.com|g; s|security.debian.org|mirrors.aliyun.com|g' /etc/apt/sources.list.d/debian.sources 2>/dev/null \
|
||||
|| sed -i 's|deb.debian.org|mirrors.aliyun.com|g; s|security.debian.org|mirrors.aliyun.com|g' /etc/apt/sources.list 2>/dev/null || true) \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends ffmpeg fonts-noto-cjk \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# PyMySQL is pure-python (install_as_MySQLdb), boto3/gunicorn need no C deps,
|
||||
# so the slim image is enough — no build-essential required.
|
||||
COPY requirements.txt .
|
||||
|
||||
Reference in New Issue
Block a user