Remotion Codec Compatibility: Why Your Video Won't Play
A source video that plays fine everywhere else can still fail inside a Remotion composition — the renderer's playback engine is more particular than a general media player.
Remotion renders using a headless browser under the hood, which means video playback inside a composition is subject to that browser's supported codecs — narrower than a dedicated media player like VLC, which bundles many more decoders.
The safe target: H.264 + AAC in an MP4 container
This combination is universally supported across every environment Remotion runs in. If a source clip uses a less common codec — certain HEVC variants, older or unusual formats from specific camera models or screen recorders — re-encode it before importing:
ffmpeg -i source.mov -c:v libx264 -crf 18 -c:a aac -b:a 192k clean.mp4-crf 18 keeps quality close to visually lossless, so this re-encode step doesn't introduce a noticeable quality loss even though it's a full re-encode rather than a stream copy.
Symptoms this specifically explains
- The video plays in Remotion Studio preview but the render fails, or vice versa — different playback pipelines can handle the same file inconsistently.
- A "could not play video/audio with src" error referencing a specific file.
- A render that completes but with a black frame or no audio where that specific clip appears.
Checking a file's actual codec before you re-encode
ffprobe -v error -select_streams v:0 -show_entries stream=codec_name -of default=noprint_wrappers=1 input.movThis prints the exact video codec in use — if it's already h264, the compatibility issue is elsewhere (often the audio codec, or a container-level quirk); if it's something else, re-encoding to H.264 is the direct fix.
Codec compatibility is exactly the kind of invisible failure mode a tested template has already been hardened against — one less unknown when you're just trying to get a video out the door.
See the templates