Skip to main content

Comparison of video tags

We offer three components for embedding videos into your Remotion composition:

This page offers a comparison to help you decide which tag to use.

<OffthreadVideo /><Video />
<Audio />
(remotion)
<Video />
<Audio /> (@remotion/media)
Based onRust + FFmpeg binaryHTML5 <video> tagMediabunny, WebCodecs
Frame-perfect❌ Not guaranteed
Partial download of assetOnly with muted prop
PreviewHTML5 <video>HTML5 <video>HTML5 <video>
Soon: WebCodecs
Render SpeedFastMedium Fastest
Supported containers.aac, .avi, .caf, .flac, .flv, .m4a, .mkv, .mp3, .mp4, .ogg, .wav, .webm.aac, .flac, .m4a, .mkv, .mp3, .mp4, .ogg, .wav, .webm.aac, .flac, .mkv, .mov, .mp3, .mp4, .ogg, .wav, .webm
Supported codecsAAC, AC3, AV1, FLAC, H.264, H.265, M4A, MP3, Opus, PCM, ProRes, VP8, VP9, VorbisAAC, FLAC, H.264, MP3, Opus, VP8, VP9, VorbisAAC, FLAC, H.264, MP3, Opus, VP8, VP9, Vorbis

Fallback to <OffthreadVideo> for unsupported codecs
HLS SupportNoOnly during previewPlanned
CORS requiredNoNoYes
Loopable
playbackRate
(Speed Change)
Planned
toneFrequency
(Pitch Change)
Only during renderingOnly during renderingPlanned

Using a different tag in preview and rendering

Use the useRemotionEnvironment() hook to render a different component in preview and rendering.

OffthreadVideo during preview, @remotion/media during rendering
tsx
import {useRemotionEnvironment, OffthreadVideo, RemotionOffthreadVideoProps} from 'remotion';
import {experimental_Video as Video, VideoProps} from '@remotion/media';
 
const OffthreadWhileRenderingRefForwardingFunction: React.FC<{
offthreadVideoProps: RemotionOffthreadVideoProps;
videoProps: VideoProps;
}> = ({offthreadVideoProps, videoProps}) => {
const env = useRemotionEnvironment();
 
if (!env.isRendering) {
return <OffthreadVideo {...offthreadVideoProps} />;
}
 
return <Video {...videoProps} />;
};