Repository navigation
Conversation
file.export writes .mp4/.mov: each slide's transition, then the slide held for its "advance after" time (else secondsPerSlide), at a chosen height (480p to 4K) and frame rate, hidden slides left out unless asked. Frames come from the slide and transition renderers and are encoded by a new Constrained Baseline H.264 encoder in deckcraft-h264 (CAVLC, Intra 16x16 with V/H/DC prediction, unchanged macroblocks skipped, deblocking off), checked bit-exact against our decoder, and muxed with deckcraft-isobmff (faststart). A key frame starts every slide and transition and at least every 2 s. No external tool is needed. Co-authored-by: Cursor <cursoragent@cursor.com>
Exported video now plays each slide's in-slide animations on the slide-show timeline (a secondsPerClick pause before each click step; with/after-previous and timed effects play as in the show) and carries a sound track: embedded audio (autoplay and Media effects, trim, fades, volume, loop, play across slides), narration clips and transition sounds, mixed to 48 kHz stereo. Sound is AAC-LC by default via deckcraft-aac, a pure-Rust encoder ported from FilmCraft (layer 1, no new third-party deps), or 16-bit PCM in .mov (audio: pcm); audio: none drops it. Video clips still show their poster frame. Co-authored-by: Cursor <cursoragent@cursor.com>
A video clip that plays (autoplay or a Media effect) now shows its pictures in the exported video instead of its poster frame. Pictures come from deckcraft-media's VideoDecoder (the slide show's own decoder), decoded in order as the export's clock reaches them, with trim, loop and rewind honoured; after the end the last picture stays unless the clip rewinds. A still or held slide is rendered per frame only while a clip on it plays. RenderOpts gains video_frames (straight RGBA per media shape), which the renderer draws over the clip's frame in place of the poster. Clips that can't be decoded keep the poster and are listed in the export's warnings. Co-authored-by: Cursor <cursoragent@cursor.com>
91717be to
98e4221
Compare
FredApps
left a comment
There was a problem hiding this comment.
ReviewerA — source-read COMMENT (not an approval)
I read the head of the diff: embedded video clips play in MP4 and MOV export. The lock hunk is the same deckcraft-aac addition as in deckcraft#616, #608 and the others of the series by this author, so this is a later PR of one stack (H.264 encoder, AAC and sound, video clips, Create a Video page, Export dialog entry, letterboxing) and the stack should merge in order or be sent as one PR. Playing an embedded clip in an export means decoding the user's video, which needs a decoder for arbitrary codecs; the PR should say which codecs it decodes and with what (a dependency or the platform). The patent question on encoders (H.264, AAC) is the maintainers' to decide. I read the lock hunk. I have not run it, and no exact-head CI result exists for this head. Nothing was run.
I ran nothing and have no exact-head CI result for this PR, so this is not an approval. Where a diff was long I read its code hunks rather than every generated or documentation line.
Status: waiting_author.
Stacked on #616 (which is itself stacked on #608). Review only the last commit. No issue: this covers the "video clips show their poster frame" part of the docs/gaps.md video export entry.
Summary
deckcraft_media::VideoDecoder, the same one the slide show uses (H.264/HEVC/VP9/AV1, pure Rust). No new dependencies.deckcraft_render::RenderOptsgainsvideo_frames: &[(ShapeId, VideoFrame)](straight RGBA). The renderer stretches that picture over the media shape's frame in place of the poster, so crop, rotation and animation state are all handled by the normal rendering.warnings.Test plan
cargo xtask ci(fmt, clippy, test, assets, layers, wasm)video_clips_play_their_pictures: a red-then-blue H.264 clip, built with the in-repo encoder, autoplays. The export is decoded back and checked frame by frame: red for the first second, blue after that, and the last picture held.testsrc2clip autoplays on the sample deck (540p25). The frames step through the pattern, and the clip's own timestamp in the picture matches the export clock: 1.88 s into the clip at 2.6 s of video, after the slide's ~0.7 s transition. The last picture holds after the clip's 4 s.Parity checklist: docs/file-format-parity.md MP4/MOV row and docs/gaps.md updated.