Principle:0xsline OpenChatCut Server Side Video Rendering
Appearance
| Knowledge Sources | |
|---|---|
| Domains | Video_Rendering, Video_Export, Encoding |
| Last Updated | 2026-10-22 14:00 GMT |
Overview
Rendering principle that converts a timeline state into a production-ready video file by composing frames in a headless browser, encoding with hardware-accelerated H.264 (or ProRes/VP8), and applying optional frame-rate retiming.
Description
Server-Side Video Rendering is the core rendering stage of the export pipeline. It takes a materialized `ExportPlan` and produces a video file by:
- Composing frames in a headless Chromium browser via Remotion's `renderMedia`.
- Selecting the composition from the Remotion bundle with the materialized timeline as input props.
- Encoding with H.264 (hardware-accelerated via NVENC/VAAPI when available), VP8 (WebM), or ProRes 422 HQ (mezzanine).
- Frame-rate retiming — optionally re-encoding at a different FPS by dropping/duplicating frames while preserving duration.
- Progress reporting — streaming progress updates (phase, percentage, frame count) to the job lifecycle.
- Error recovery — detecting OOM, timeout, and cancellation, cleaning up partial outputs, and classifying failures for retry.
The renderer supports multiple codecs:
- H.264: Default video codec, with hardware acceleration selection and bitrate control.
- VP8: WebM container alternative.
- ProRes 422 HQ: Mezzanine master, server-only, no bitrate control.
- MP3/WAV: Audio-only export.
Usage
Use this principle when:
- Rendering a timeline to a video file without a visible browser window.
- Producing H.264, VP8, ProRes, or audio-only exports.
- Applying frame-rate retiming (e.g., 30fps → 24fps while preserving duration).
- Selecting the best available H.264 encoder (hardware vs. software fallback).
Theoretical Basis
The rendering pipeline:
- Bundle: Load the Remotion serve URL (pre-built composition bundle).
- Select composition: Resolve the composition with input props (timeline state, project).
- Render frames: Chromium renders each frame to an image buffer.
- Encode: FFmpeg encodes frames to the target codec (H.264/VP8/ProRes).
- Retime (optional): If `retimeFps` differs from source FPS, re-encode with frame drop/duplication.
- Output: Write the final file to `outputLocation`.
# Abstract algorithm (NOT real implementation)
def render_timeline(state, output_location, codec, scale, fps_retime):
serve_url = load_remotion_bundle()
composition = select_composition(serve_url, input_props={state})
encoder = select_h264_encoder() # hardware or software
rendered = render_media(
composition, codec=codec, scale=scale,
encoder_options=encoder,
on_progress=report_progress,
)
if fps_retime and fps_retime != state.fps:
rendered = retime_fps(rendered, state.fps, fps_retime)
write_file(rendered, output_location)
Related Pages
Implemented By
- Implementation:0xsline_OpenChatCut_RenderExportPlan
- Implementation:0xsline_OpenChatCut_RenderTimeline
Uses Heuristic
Page Connections
Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment