Skip to content

feat: demo post-processing — webm→H.264 mp4 (+faststart) and trim (v1.2.0)#6

Merged
heznpc merged 1 commit into
mainfrom
feat/video-mp4
Jun 10, 2026
Merged

feat: demo post-processing — webm→H.264 mp4 (+faststart) and trim (v1.2.0)#6
heznpc merged 1 commit into
mainfrom
feat/video-mp4

Conversation

@heznpc

@heznpc heznpc commented Jun 10, 2026

Copy link
Copy Markdown
Member

Closes the roadmap's video-editing item (mp4 + trim; captions stay planned):

  • src/video.jsfindFfmpeg (SHOTKIT_FFMPEG → PATH; Playwright's bundled ffmpeg is vp8-only, verified empirically), pure buildFfmpegArgs, postProcessDemo (mp4 w/ optional frame-accurate trim; trim-only = in-place stream-copy).
  • CLI --mp4; config demo.mp4: true|{crf}, demo.trim: {start, duration}. Requested-but-missing ffmpeg fails loudly with an install hint (GH ubuntu runners ship ffmpeg → the capture-in-CI path emits mp4 out of the box).
  • Verified end-to-end with real ffmpeg: h264 1280×800, moov-before-mdat (+faststart), silent track, 5.48s→2.000s trim. Unit tests for args/discovery; lint green.

….2.0)

SNS uploaders want mp4, not Playwright's vp8 webm. New src/video.js: findFfmpeg (SHOTKIT_FFMPEG → PATH; Playwright's bundled ffmpeg is vp8-only — verified empirically, no libx264), buildFfmpegArgs (pure, unit-tested), postProcessDemo (mp4 with optional frame-accurate trim; trim-only = in-place stream-copy). Wired into capture() after saveAs; CLI --mp4; config demo.mp4 (true|{crf}) + demo.trim {start,duration}. Fails loudly with an install hint if requested without ffmpeg — never silently skips. Verified end-to-end with real ffmpeg: h264 1280x800, moov-before-mdat (faststart), 5.48s→2.000s trim. 35 unit tests green.
@heznpc heznpc merged commit 5071da9 into main Jun 10, 2026
@heznpc heznpc deleted the feat/video-mp4 branch June 10, 2026 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant