Exporting your video
Pick what the render writes: an MP4, a GIF, an image sequence, or an
alpha-capable overlay. Set Video.export to one of the four modes and Fluvie
encodes that container. Here are all four:
Export sharable() => const Export.mp4(quality: Quality.max); // H.264 MP4, CRF 14Export loopingThumb() => const Export.gif(fps: 12); // animated GIF at 12 fpsExport forCompositing() => const Export.imageSequence(); // one PNG per frameExport overlay() => const Export.transparent(); // WebM with an alpha channelWith no export, a render writes an MP4 at the default quality. The rest of
this page covers the four modes, the poster frame, and the command-line
renderer.
MP4 quality
Section titled “MP4 quality”Export.mp4(quality:) writes an H.264 MP4. The quality picks the encoder’s
constant-rate factor (CRF), where a lower CRF means a bigger file and less
compression:
Export.mp4(quality: Quality.low), // CRF 28, smallest file, visible compressionExport.mp4(quality: Quality.medium), // CRF 23, a rough-cut trade-offExport.mp4(quality: Quality.high), // CRF 18, the default for published videosExport.mp4(quality: Quality.max), // CRF 14, near-lossless, the largest fileQuality.high is the default, so const Export.mp4() writes a published-grade
file. Reach for Quality.low for quick draft renders and Quality.max for an
archival master.
Export.gif(fps:) writes an animated GIF. The fps samples the frames, since a
GIF rarely needs the full frame rate. A lower fps makes a smaller file:
Export.gif(fps: 15), // the default sample rateExport.gif(fps: 12), // a smaller, choppier loopThe encoder builds an optimized 256-color palette from your frames in one pass, then maps the frames onto it with dithering, so a GIF keeps its color and stays small. A GIF carries no audio.
Image sequence
Section titled “Image sequence”Export.imageSequence() writes one lossless PNG per frame, named
frame_000000.png, frame_000001.png, and so on. Reach for it when a
compositing pipeline downstream wants individual frames rather than a container:
const Export.imageSequence(); // one PNG per frame, into the output directoryThe sequence carries no audio. Each still is lossless, so the pipeline starts from the exact captured pixels.
Transparent overlay
Section titled “Transparent overlay”Export.transparent() writes a WebM with an alpha channel, so the video can
layer over other footage. The captured RGBA alpha is preserved end to end:
const Export.transparent(); // VP9 WebM with a yuva420p alpha planeReach for it when you render a lower-third, a logo sting, or a caption pass that
sits on top of a clip in another editor. An alpha-capable overlay carries no
audio. ProRes .mov with alpha is forthcoming; WebM ships today.
A poster frame
Section titled “A poster frame”Video.poster names a Time, and the render grabs that one frame as a still
thumbnail alongside the main output. Set it on the same Video as the export:
Video exportedReel() => Video( size: VideoSize.reels, export: const Export.mp4(quality: Quality.max), // near-lossless, CRF 14 poster: const Time.seconds(1.5), // the thumbnail frame scenes: [ Scene.centered( duration: const Time.seconds(3), background: Background.color(const Color(0xFF0E1116)), child: const Text('Exported', style: TextStyle(fontSize: 72, color: Color(0xFFE6EDF3))), ), ],);The poster is a second output from the same frames, so it costs one extra
encode of one frame. Pick a Time that lands on a representative moment, for
example 1.5 seconds into a 3 second card.
The command-line renderer
Section titled “The command-line renderer”fluvie render captures a registered composition and encodes it without opening
the example app. The minimal call names a composition key and an output file:
fluvie render 01_hello_video --out hello.mp4The flags map onto the export modes above:
fluvie render 01_hello_video --out reel.mp4 --aspect reels --quality highfluvie render 01_hello_video --out clip.gif --format giffluvie render 01_hello_video --out frames/ --format imageSequencefluvie render 01_hello_video --out overlay.webm --format transparentfluvie render 01_hello_video --out hero.mp4 --poster 1.5sThe flags:
--out <file>sets the output path. It is required.--aspect <name>picks the aspect:reels,square,landscape, orportrait45. With no--aspectthe composition renders at its declared size; pass an aspect to re-frame it.--quality <name>picks the MP4 quality:low,medium,high, ormax.--format <name>picks the export mode:mp4,gif,imageSequence, ortransparent. It defaults tomp4.--poster <time>writes a poster still from aTimestring, for example1.5s,30f, or500ms.
A bad enum value exits with code 64 and names the valid set, so a typo fails
fast rather than rendering the wrong thing. The other flags from earlier phases
stay: --frames N for a draft render, --project <dir>, --ffmpeg <path>,
--no-cache, --keep-temp, and --verbose.
To see every composition key you can render, run:
fluvie listIt prints one key per line.
Where to next
Section titled “Where to next”- Templates: render one definition per data row.
- Multi-aspect: one definition rendered to reels, square, landscape, and portrait.