Repository navigation
Done
Labels
enhancementNew feature or request
Description
Summary
Make an MP4 optimized for playing on the web:
- H.264 video and AAC audio, so it plays in every browser
faststart, so playback can begin before the whole file downloads- An optional maximum resolution and bitrate
This is the simple option for clients that don't need HLS (#139).
Part of Phase 1 of #247. Depends on Phase 0 (#257).
Setting
Turned on by the videoStreaming media setting (see #247):
"off": no processing beyond the poster."hls": HLS streams (HLS for video streaming #139)."mp4": this issue.
Like the other media settings, it's managed through the REST API, MCP tools, CLI and the dashboard, and changing it affects new uploads only.
Behavior
- When
videoStreamingis"mp4", a video upload queues an MP4 job. The upload response doesn't wait for it. - Remux, don't re-encode, when possible. If the upload is already H.264/AAC and within the size limits, only move the index to the front (
-c copy -movflags +faststart). That takes seconds and doesn't lose quality. Use the metadata from Read media metadata (duration, resolution, codecs) #267 to decide. - Otherwise, re-encode to H.264/AAC with
faststart. Never upscale. - The output is stored as the
mp4derivative (Store processing outputs as derivatives and track processing status #261). Clients playmedia.derivatives.mp4.url. - When the job finishes or fails, the media's processing status changes and a webhook fires (Webhooks when media processing finishes or fails #198).
- The original file is kept.
Open questions
- HLS and MP4 together. With a single
videoStreamingvalue, an app gets one or the other. Some clients may want both, e.g. HLS for playback and an MP4 for downloads or offline use. If that comes up, add a separate setting such asmp4Fallback: booleaninstead of morevideoStreamingvalues. - Size limit setting. Whether to add a setting for the maximum resolution (e.g.
mp4MaxResolution: "1080p"), or start with a fixed limit. - Replace or keep the original. WebP replaces the original image (Stream uploads straight to S3 instead of staging them on disk #250). For MP4, keeping the original costs storage, but a remux may be the same size. Decide whether
"mp4"keeps both. - Metering: re-encoding counts toward processing minutes, a remux probably shouldn't (Pipelines #247).
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request
Activity
s3rot0n1n commentedon Nov 28, 2026
Delivered in #291 (pipelines phase 1, step 4): an MP4 optimized for web playback, turned on with
videoStreaming: "mp4". Closing; the PR didn't use a closing keyword.