feat: write VP8 WebM recordings by default - #23
Merged
Conversation
Chromium screencast still yields JPEG frames. Mux those into GIF so Discord, Slack, Linear, and GitHub can play the clip inline. Keep MJPEG AVI when the output path ends in .avi. Co-authored-by: Jared Lunde <jared.lunde@gmail.com>
MCP and CLI write .webm by default. .gif stays an explicit image attachment; .avi stays the MJPEG dump. browser_record_video has no format parameter. Co-authored-by: Jared Lunde <jared.lunde@gmail.com>
HTML5 players leave video.duration as NaN without Info/Duration, so the clip looks broken in chat UIs. Chromium screencast also emits odd sizes (e.g. 780x441) that VP8 4:2:0 and many decoders reject. Co-authored-by: Jared Lunde <jared.lunde@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Page recording still journals Chromium
Page.startScreencastJPEGs. The output path selects the container:.webm(the MCP/CLI default, including extensionless paths) encodes those frames as VP8 all-intra and muxes WebM.gifwrites a GIF image attachment.avikeeps the existing MJPEG AVI dumpbrowser_record_videostays start/stop only. There is no format parameter.WebM mux writes
Info/DurationandTrack/DefaultDuration, and even-pads odd screencast sizes (VP8 4:2:0). Without Duration, HTML5 players reportNaNand many UIs refuse to start playback.Why
AVI is not playable in Discord/Slack/Linear/GitHub. GIF is playable as an image everywhere, but it is 256 colors and about 10× the file size.
VP8 WebM is the all-Rust, statically linked video file that Discord (and browsers) actually play. Slack/Linear still prefer H.264 MP4; that encoder is not in this crate (C++
openh264, or rusty H.264 at ~90 MB RSS). VP9 was measured on the same harness and is not shipping: ~90× slower all-intra, ~3× RSS, 0.0.xoxideav-vp9plus requiredoxideav-core, and the same WebM attachment class as VP8.GIF remains an explicit
.gifpath so humans can still drop an image where WebM will not inline. It is not a runtime fallback.Testing
cargo test --locked --lib video::(WebM mux, GIF mux, AVI mux, odd-size pad, reject.mp4)mcp/tests/fixtures/tools-list.jsonand assertedcatalog_matches_archived_bytesplus the 11 KiB catalog budgetcargo check --lockedpage_screencast_records_webm