Commit Graph

1 Commits

Author SHA1 Message Date
valknar 1f24ee8276 feat: compress MP4 videos at Docker build time via FFmpeg
Hugo has no video processing, so FFmpeg runs in the builder stage
before hugo builds, compressing every content/**/*.mp4 in-place.

scripts/compress-videos.sh:
  - H.264 CRF 28 + preset slow (good web compression)
  - faststart for progressive streaming
  - AAC 64k audio
  - Only replaces source if output is actually smaller, so
    already-lean videos are skipped

Dockerfile:
  - apk adds ffmpeg alongside hugo in the builder stage
  - RUN compress-videos.sh runs after COPY . . before pnpm build
    (compressed files land in public/ via Hugo's copy of page bundles)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-11 18:42:57 +02:00