video2slides: 重构为纯客户端 app(浏览器抽帧 + IndexedDB),后端归零
deploy articulate / build-and-deploy (push) Successful in 1m1s
deploy cube / build-and-deploy (push) Successful in 1m22s
deploy karaoke / build-and-deploy (push) Successful in 55s
deploy llm-proxy / build-and-deploy (push) Successful in 1m44s
deploy music / build-and-deploy (push) Successful in 2m14s
deploy notes / build-and-deploy (push) Successful in 1m40s
deploy simpleasm / build-and-deploy (push) Successful in 1m17s
deploy video2slides / build-and-deploy (push) Successful in 39s
deploy werewolf / build-and-deploy (push) Successful in 1m7s
deploy webgl / build-and-deploy (push) Successful in 1m17s
deploy write / build-and-deploy (push) Successful in 1m13s

- 不再上传视频:<video>+canvas 原生解码按时间戳 seek 抽帧,逐帧 256px 灰度
  MAE 算差异,缩略图(320)+大图(1280) 随抽随写 IndexedDB,带进度条+ETA
- 阈值/手动 保留弃用/缩放偏好 持久化到 IndexedDB,刷新仍在
- PDF 导出回到客户端 jsPDF,保留帧逐张 base64 嵌入、单帧处理防 OOM
- 后端删光业务逻辑(core.rs/handlers.rs),main.rs 缩成 cube_core::base 静态服务
- 不再需要 ffmpeg → Dockerfile 回归 FROM scratch;k8s 去掉 hostPath 卷、降资源
- 真浏览器(Playwright)验证:抽帧/差异/阈值/持久化/导出 全通过
This commit is contained in:
Fam Zheng
2026-06-14 22:25:20 +01:00
parent ef29561b28
commit a0253e118f
10 changed files with 648 additions and 1709 deletions
+3 -7
View File
@@ -1,12 +1,8 @@
# video2slides — video2slides.famzheng.me
# 跟其它 cube app 不同:依赖 ffmpeg/ffprobe,所以不能 FROM scratch
# 用 debian-slim 装 ffmpeg,再拷静态 musl binary(静态链接,跑在 debian 上没问题)。
FROM debian:bookworm-slim
RUN apt-get update \
&& apt-get install -y --no-install-recommends ffmpeg ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# 纯客户端 app,后端只发静态文件 → 回归 cube 惯例:FROM scratch + 静态 musl binary
FROM scratch
COPY target/x86_64-unknown-linux-musl/release/video2slides /video2slides
COPY apps/video2slides/frontend /dist
EXPOSE 8080
ENV VIDEO2SLIDES_DIST_DIR=/dist VIDEO2SLIDES_DATA_DIR=/data
ENV VIDEO2SLIDES_DIST_DIR=/dist
ENTRYPOINT ["/video2slides"]