Video Pipeline
The video editor runs on the same engine as photo editing. A project never changes your files: every frame you see or export is rendered again from the original clips plus the project, which says where each clip sits on the timeline, how it is graded and what effects it has. A clip's look is a normal set of RapidRAW adjustments, so each frame goes through the same GPU pipeline as a photo.
This page explains how that works, for people who want to know what happens under the hood. To learn the editor itself, start with Video Editing. The tools that compare frames (optical flow, stabilization, tracking) are covered in Motion, Tracking & Stabilization.
The code is in src-tauri/src/video/ in the RapidRAW source: decoding and encoding in libav/, frame rendering in engine/, and the GPU work in the shaders video.wgsl and video_compose.wgsl.
From file to frame
Because frames go from the engine to the viewer without leaving the GPU, video editing needs WGPU Direct Rendering (see Settings), which on Linux needs a Wayland session.
Decoding
RapidRAW ships its own copy of FFmpeg's libraries (FFmpeg 9.0.2) and loads them at startup. It is a small LGPL build that only contains what RapidRAW uses: decoders for common camera and delivery formats (listed in File Formats), a set of encoders for export, and the filters for scaling, timing and audio. Everything about a file (size, frame rate, color tags, rotation, audio streams, variable frame rate) comes from FFmpeg's probe and is cached per file.
Hardware decoding. RapidRAW asks the graphics card to decode when it can: D3D11VA, DXVA2 or CUDA on Windows, VideoToolbox on macOS (also for AV1 on Macs that decode it in hardware), and VA-API, CUDA or VDPAU on Linux. If the hardware decoder can't open a file, or fails in the middle of one, RapidRAW logs "Hardware video decoding failed, continuing in software" and continues from the same frame with software decoding.
Streams. Each clip gets its own decode stream that runs a few frames ahead on a background thread and keeps the last few frames, because temporal noise reduction, shutter blur and frame interpolation need the neighbours of the current frame. A jump seeks to the keyframe before the wanted frame and decodes forward from there. Fast clips and speed ramps don't show every frame of the source, so RapidRAW works out which frames a clip will show and lets FFmpeg skip the others where it can.
Decode size. A frame is only decoded as large as it is drawn on the canvas. A 4K clip in a 1080p project is decoded at 1080p, and in a small viewer at the viewer's size. A clip that is scaled up by its transform, a track or stabilization (which can crop in up to 1.25 ×) is decoded larger, up to its full size.
Scaling on the GPU
When a frame is needed smaller than the file, RapidRAW shrinks it on the graphics card while it is still in the decoder's memory, and only the small frame is copied to the CPU. Previews, proxies and the analysis for stabilization and tracking all use this. It saves copying a full 4K frame for every frame shown. Each decoder has its own scaler: scale_cuda on NVIDIA, scale_vaapi on Linux, VideoToolbox on macOS, and scale_d3d11 for D3D11VA on Windows with AMD or Intel graphics.
The scale_d3d11 filter as it comes with FFmpeg can't be used for this as it is, so RapidRAW's Windows build of FFmpeg carries a small patch for it.
If a GPU scaler can't start, or fails on a frame in the middle of a clip, RapidRAW logs "Scaling video on the CPU instead of the GPU" and carries on with the next frame. The full frame is then copied and shrunk by the conversion shader or by FFmpeg's scaler on the CPU. The picture looks the same; only the speed differs.
Color conversion
FFmpeg delivers frames as YUV planes. RapidRAW writes them into a GPU buffer and converts them in one shader pass:
- YUV to RGB with the file's matrix (BT.709, BT.601 or BT.2020), limited or full range, 8 to 16 bits, with the chroma position the file declares. Rotated phone footage is turned upright here too.
- Linear light. Standard video is read with the sRGB curve. HDR video in PQ or HLG becomes linear light where 1.0 is reference white (203 nits), so its highlights stay above 1.0. Log footage and camera LUTs are covered below.
- Working space. The colors are converted to linear Rec.2020, the working space of the photo pipeline.
The result is a 16-bit float texture in the same form as a JPEG or HEIC photo after loading, so the look treats a video frame like any non-RAW photo. A frame too large for the GPU's buffers is converted on the CPU instead.
Camera log
Log footage stores many more stops above middle grey than standard video, so it looks flat until it is converted. Pick the camera's curve under Camera Log in the clip's settings and RapidRAW decodes it during the conversion above. The log curve is inverted with the formula the camera maker publishes, and the colors are converted from the camera's gamut (S-Gamut3.Cine, V-Gamut, ARRI Wide Gamut and so on) to Rec.2020. The result is scene-linear light with middle grey at 0.18, the same as a decoded RAW file.

The supported curves are Sony S-Log3 (with S-Gamut3.Cine or S-Gamut3) and S-Log2, Panasonic V-Log, Canon Log 3, ARRI LogC3 and LogC4, Fujifilm F-Log2, Nikon N-Log, Apple Log, and DJI D-Log and D-Log M. For Sony and DJI files, RapidRAW reads the curve from the file's metadata (the capture gamma and primaries in Sony's XML, the metadata track in DJI's files) and shows it as "(Detected)". For other cameras you pick it yourself.
Instead of a curve you can choose a camera LUT under Camera Log: a LUT from your LUT library whose name marks it as a log conversion (for example a camera maker's "S-Log3 to Rec709" LUT). It is applied with tetrahedral interpolation during the conversion, and its output is then read like standard video.
Decoded log footage keeps its highlights above 1.0, so the tone mapper decides how they roll off. On an SDR screen they are compressed smoothly into white, the same as for HDR photos. In an HDR preview or an HDR export they stay above white. How to grade log footage is explained in Grading & Effects.
Grading each frame
For each frame, RapidRAW prepares the clip's look for that moment and then runs the photo pipeline on the frame, which never leaves the GPU:
- Keyframes. Every animated slider gets its value at the frame's time.
- Tracked masks and patches. Masks and clone or heal spots that follow a track are moved to where the track is in this frame (see Tracking).
- Photo pipeline. Geometry (lens correction, transform, crop), depth effects, the adjustments shader and the output transform run exactly as for a photo, as described in the Rendering Pipeline. Depth effects (Relight, Fog, Lens Blur) read a depth and normal map for each frame, made in the background (see Key frames and in-between frames).
A few things work differently for footage, so that frames stay consistent from one to the next:
- Color and luminance masks are evaluated on the GPU for every frame, because they depend on the pixels. Drawn masks are rasterized once and reused as long as they don't move.
- No automatic measurements that could flicker. The photo pipeline measures each image's highlights to set a white point. For footage that point is fixed, so highlights don't pump from frame to frame.
- Film grain moves. The grain pattern is shifted on every frame, like real grain.
- Noise reduction shares the work. When temporal noise reduction has already averaged neighbouring frames, the normal Noise Reduction is weakened to match (see Temporal noise reduction).
- Centered effects follow the visible frame. Under stabilization or in a layout cell, the vignette and other effects that depend on the image center are measured from the part of the frame you see.
Photos on the timeline are decoded once, the same way as in the photo editor (RAW files included), and their look then runs on them like on a frame. PNG and other files with transparency keep it.
The graded layer is kept in a GPU cache (an eighth of the graphics memory, between 128 MB and 1 GB). Its key covers everything that changes it: the source frame, the look, the output space and the effects. So stepping back to a frame you just saw, or editing only a title on top, doesn't grade the clip again.
The look ends with the output transform, which depends on where the frame goes. The preview uses your screen's color space, with HDR headroom on an HDR screen. An SDR export is rendered in sRGB and tagged as standard BT.709 video. An HDR export renders in Rec.2020 with up to 1000 nits of highlights before it is encoded as HLG or PQ.
Compositing
The canvas starts filled with the project's background color. Then the tracks are drawn from the main track upward, so a clip on a higher track covers the tracks below. Each item on a track becomes a layer:
- Clips are graded frames. They are fitted to the canvas with Fit, Fill or Blur (Blur draws a blurred, darkened, enlarged copy of the clip behind it).
- Titles are pictures of text (see below), and colors are solid fills.
- Adjustment layers grade everything below them. The canvas so far is converted back to the working space, the layer's look runs on it like on a frame, and the result is mixed in by the layer's opacity.
Every layer is placed by its transform (position, scale, rotation, opacity, rounded corners, flips), by a track it is attached to, or pinned to a tracked surface in perspective. Stabilization moves the frame here too. In and out animations (fade, slide, zoom, pop, blur, wipe, spin) change the placement and opacity over time.
Show how blending, mattes, cutouts and transitions work
- Blend modes (Normal, Multiply, Screen, Overlay, Soft Light, Add, Difference, Darken, Lighten) are applied with premultiplied alpha, so soft edges and transparent titles blend cleanly.
- Layer motion blur. A layer with a Shutter angle is blurred along its own movement: its placement at the moment the virtual shutter opens and closes is turned into a shift, a zoom and a turn, and the layer is streaked along that path. See Shutter blur.
- Track mattes. A layer with a Track Matte uses the layers on the track directly above it as its matte, either their alpha or their luminance. Those matte layers aren't drawn themselves.
- Cutouts. Masks marked as cutouts, and a color key (hue, tolerance, softness and spill removal), make parts of a clip transparent after it is graded.
- Transitions happen on the main track. While two clips overlap, each is drawn on its own transparent canvas, and the transition shader mixes the two (Dissolve, Dip to Black, Flash, Wipe, Push, Zoom Blur, Spin, Shake, Glitch or Luma Fade).
- Nested sequences are rendered by the same engine, up to 8 levels deep, and then graded and placed like a clip.
Layers are blended after their looks, in the output color space, so a layer at 50% opacity looks like a 50% mix of the two pictures you see.
Titles and captions
Titles are typeset by the app's interface with your system's fonts, at the height of the canvas, so the text looks exactly like in the editor. The finished pictures are sent to the engine, kept compressed in memory and uploaded to the GPU when a frame needs them. For the Typewriter and Word by Word animations, a second picture marks which character or word every pixel belongs to, so the engine can reveal the text one unit at a time without typesetting it again.
Captions are drawn last, on top of everything. With Highlight Spoken Word on, each caption has a second picture with the highlighted style, and the engine shows it for the word being spoken.
Playback
Playback runs on its own thread with a clock. For every frame it renders the timeline, waits until the frame is due and shows it. If a frame is late, the next ones are skipped so the picture stays in time with the sound. About one second ahead, the decoders for clips that start at an upcoming cut are opened and seeked, so the cut doesn't stall.
Playback Quality sets the size frames are rendered at. Full, Half and Quarter are fixed fractions of the project size. Auto starts at the viewer's size, capped at about the work of 1080p at 120 fps, so 4K at 30 fps plays at full size. It steps down when frames are dropped and back up when there is time to spare, and remembers the size it settles on until you quit.
A paused frame is rendered at the viewer's size (or at the fixed Playback Quality), without the Auto cap. With Use Proxies on, it is shown from the proxy first and rendered again from the original a quarter of a second later.
The sound is mixed by the engine in short chunks, with the same filter graph as the export, and played by the app. Playback starts when the first frame and the sound are both ready.
Proxies and prepared copies
Long-GOP files (H.264, HEVC, AV1, VP9) only store a full picture now and then, and every other frame has to be rebuilt from the frames before it. That makes them slow to scrub, especially in 4K or 10-bit. A proxy is a lighter copy for editing:
- ProRes 422 Proxy, 10-bit 4:2:2, 1920 pixels on the long side, in a
.movfile. - Offered for clips larger than 1920 pixels, and for long-GOP clips that are HDR or at least 1080 pixels on the short side. Other clips play smoothly without one.
- Made when you choose Create Proxies (and automatically for videos from Immich). The source is decoded in hardware and shrunk on the GPU, then encoded with Apple's hardware ProRes encoder on a Mac or FFmpeg's ProRes encoder elsewhere.
- Used for playback and scrubbing while Use Proxies is on. Exports always read the originals.
A few other things are prepared once and kept in the same Video Cache:
| Cache | What it holds |
|---|---|
| Video Proxies | The proxies above. |
| Reversed Clips | A ProRes 422 copy of a reversed clip, with its frames in reverse order, and its sound reversed as a WAV file. Long-GOP video can't be decoded backwards quickly, so a reversed clip plays from this copy. |
| Timelapses | Photo sequences developed into ProRes 4444 XQ video, with the deflicker measured. |
| Video Analysis | Stabilization motion, depth and normal maps for depth effects, Auto Reframe analysis, speech and beat detection, filmstrips, nested sequence audio and stretched audio for speed ramps. |
Cache files are tied to a fingerprint of the source file, so a changed file is prepared again. When the cache grows over its limit in Settings → Data Management, the least recently used files are removed, but never files the open project uses.
Audio
All sound is mixed at 48 kHz in stereo by an FFmpeg filter graph that RapidRAW builds from the timeline. Every clip with sound becomes one chain in that graph:
- Timing. Trim to the part on the timeline, then change the speed with FFmpeg's
atempo, which keeps the pitch. Speed ramps and reversed clips use prepared audio instead (see Speed ramps). - Effects. The EQ (Low Cut, Bass, Mids, Treble, High Cut), Reduce Noise (FFmpeg's spectral denoiser) and Even Out Volume (a compressor).
- Ducking with Duck Under Dialogue (below).
- Level. Volume keyframes and fades, then Pan. Crossfades between two clips use equal-power curves, so the level doesn't dip in the middle.
The chains are added together without normalizing, then the Master volume is applied. Keyframed effect settings are sent to the filters as timed commands every 20 ms, so they change smoothly while the sound plays.
Ducking
Duck Under Dialogue lowers a clip (usually music) while someone speaks in any clip that isn't ducked itself. RapidRAW first finds the speech in each of those files: stretches that stand out from their own background in the speech frequencies, are voiced and rise and fall in level like speech does. Steady sounds such as hum or an engine don't count. The result is cached per file.

The music then follows an envelope: it starts dipping 0.1 s before the speech, reaches the full Duck Amount after 0.15 s and returns over 0.5 s.
Loudness
The export can bring the whole mix to a loudness target: −14 LUFS (streaming), −16 LUFS (podcasts) or −23 LUFS (EBU R128 broadcast). Before encoding, RapidRAW plays the entire mix once and measures its integrated loudness as ITU-R BS.1770 defines it (the measurement EBU R128 uses too). The difference to the target becomes a gain, and a limiter keeps the true peaks below −1 dBTP. The mixer's meter shows the loudness since playback started, so you can see how far the mix is from the target. Using these controls is explained in Audio & Captions.
Captions from speech
Generate from Audio uses NVIDIA's Parakeet TDT 0.6B v3 speech model, which understands 25 European languages. It runs offline on the CPU through ONNX Runtime and is downloaded the first time (about 670 MB).
Since every caption keeps its word timings, Highlight Spoken Word knows which word to highlight, and Remove Filler Words can be switched without transcribing again.
Beats
Show Beats and Cut to Beat use a beat tracker on the music clip. It finds the moments where the sound suddenly gets louder (drum hits, note starts), works out the tempo from how that pattern repeats (between 60 and 200 BPM), and places the beats on a steady grid that lands on the strongest of those moments. Every fourth beat is marked as a bar start. The result is cached per file.
Export
An export renders every frame at the project's size from the original files, with hardware decoding on. It waits for anything the project needs that isn't ready yet, such as stabilization analysis, timelapses, reversed clips, or the depth maps of a frame it is about to render.
Encoders. The first time the encoder list is needed, RapidRAW tests each encoder it knows for each codec by encoding three small frames, once in 8-bit and once in 10-bit, and keeps the ones that work until you quit. It prefers a hardware encoder (NVIDIA NVENC, Intel Quick Sync, AMD AMF, VA-API on Linux, VideoToolbox on macOS, Media Foundation on Windows on ARM), and the export panel then shows GPU encoding. Otherwise it uses a software encoder from the bundled FFmpeg; which ones exist depends on the platform (Windows has none for HEVC, for example), see Exporting Video. If the hardware encoder fails to start, the export falls back to a software encoder for the same codec.
Frames. The finished frame is converted to the encoder's YUV format on the GPU (8-bit 4:2:0 for SDR, 10-bit for HDR and ProRes), and only those bytes are read back. The encoder runs on its own thread. The file gets the right color tags, and MP4 files start playing before they are fully downloaded.
HDR. An HDR export renders in Rec.2020 in floating point and keeps highlights up to 1000 nits (about 2.3 stops above the 203-nit reference white). They are then encoded with the HLG or PQ curve.
Audio. AAC at 192 kb/s for H.264, HEVC and AV1 (Apple's AAC encoder on a Mac), Opus at 160 kb/s for VP9, and 16-bit PCM for ProRes, unless you choose otherwise.
Saving. The file is written under a temporary name (starting with a dot and ending in .part) in the destination folder and renamed when it's complete, so a crash never leaves half a video under the real name. If the old file can't be replaced (for example because a player has it open), the export is saved as name_1.mp4 instead. RapidRAW won't export over a file the project uses, and removes leftover temporary files after a day.
The export settings are explained in Exporting Video.
See also
- Motion, Tracking & Stabilization for optical flow, frame interpolation, stabilization and tracking.
- Rendering Pipeline for the photo stages every frame goes through.
- Grading & Effects and Audio & Captions to use these tools.
RapidRAW