# What Video Codecs Are Available in Remotion? A Complete Developer Guide

> Explore the eight video codecs Remotion supports including h264 vp9 and prores Learn how container format and rendering method affect codec availability for developers

- Repository: [Remotion/remotion](https://github.com/remotion-dev/remotion)
- Tags: deep-dive
- Published: 2026-02-16

---

**Remotion supports eight video codecs—`h264`, `h265`, `vp8`, `vp9`, `prores`, `h264-mkv`, `h264-ts`, and `gif`—with specific availability determined by container format and whether you render locally or via the cloud.**

When programmatically generating videos with Remotion, selecting the right codec impacts playback compatibility, file size, and rendering performance. The remotion-dev/remotion repository defines codec support across multiple layers, from core constants in [`packages/core/src/codec.ts`](https://github.com/remotion-dev/remotion/blob/main/packages/core/src/codec.ts) to container-specific mappings and cloud rendering constraints.

## Core Video Codecs Supported in Remotion

### The `validCodecs` Constant

The definitive list of video codecs available in Remotion is enumerated in the `validCodecs` constant located in **[packages/core/src/codec.ts]**. This array defines every codec that Remotion can output, including specialized variants for specific containers.

The video codecs included in the core list are:

- **`h264`** – Standard H.264/AVC encoding for MP4 containers
- **`h265`** – H.265/HEVC for higher compression efficiency in MP4
- **`vp8`** – Open video codec for WebM containers
- **`vp9`** – Successor to VP8 with better compression for WebM
- **`prores`** – Apple ProRes codec for professional editing workflows
- **`h264-mkv`** – H.264 variant for Matroska (MKV) containers
- **`h264-ts`** – H.264 for MPEG-TS containers
- **`gif`** – Animated GIF output format

The core list also includes audio-only codecs (`aac`, `mp3`, `wav`, `opus`, `pcm`), though these are excluded when working with video compositions.

## Container-Specific Video Codec Availability

Not all codecs work with every container format. The **[packages/webcodecs/src/get-available-video-codecs.ts]** file provides the `getAvailableVideoCodecs` function, which returns the subset of codecs compatible with a specific container.

### MP4 Container Codecs

When exporting to MP4 format, Remotion supports:

- `h264` (default)
- `h265`

These codecs provide broad browser compatibility (H.264) or improved compression for high-resolution content (H.265).

### WebM Container Codecs

For WebM containers, Remotion utilizes open codecs optimized for web delivery:

- `vp8` (default)
- `vp9`

VP9 offers superior compression compared to VP8, though encoding requires more processing time.

### Specialized Containers

The `h264-mkv` and `h264-ts` codecs enable H.264 encoding within Matroska and MPEG-Transport Stream containers, respectively. The `prores` codec generates professional-grade output suitable for video editing software, while `gif` produces animated images without audio.

## Querying Video Codecs Programmatically

Remotion exposes several utilities to inspect codec availability at runtime, enabling dynamic configuration based on container selection or rendering environment.

### Using `getAvailableVideoCodecs`

The `getAvailableVideoCodecs` function in **[packages/webcodecs/src/get-available-video-codecs.ts]** returns an array of supported video codecs for a given container:

```typescript
import {getAvailableVideoCodecs} from '@remotion/webcodecs';

const mp4Codecs = getAvailableVideoCodecs({container: 'mp4'});
// → ['h264', 'h265']

const webmCodecs = getAvailableVideoCodecs({container: 'webm'});
// → ['vp8', 'vp9']

const wavCodecs = getAvailableVideoCodecs({container: 'wav'});
// → []

```

This function filters the core `validCodecs` list to return only those compatible with the specified container format.

### Retrieving Default Codecs

When you need a sensible default for a container without explicit configuration, use `getDefaultVideoCodec` from **[packages/webcodecs/src/get-default-video-codec.ts]**:

```typescript
import {getDefaultVideoCodec} from '@remotion/webcodecs';

const defaultForMp4 = getDefaultVideoCodec({container: 'mp4'});
// → 'h264'

const defaultForWebm = getDefaultVideoCodec({container: 'webm'});
// → 'vp8'

const defaultForWav = getDefaultVideoCodec({container: 'wav'});
// → null

```

This utility ensures consistent defaults across your application: H.264 for MP4, VP8 for WebM, and no video codec for audio-only WAV containers.

## Cloud Rendering and Encodable Codecs

When rendering via Remotion's cloud infrastructure (Mediabunny), not all theoretically supported codecs may be available for every bitrate or quality configuration. The **[packages/web-renderer/src/get-encodable-codecs.ts]** file provides `getEncodableVideoCodecs`, which queries the Mediabunny service to determine which codecs can actually be encoded given specific constraints.

```typescript
import {getEncodableVideoCodecs} from '@remotion/web-renderer';

async function listEncodable() {
  const codecs = await getEncodableVideoCodecs('mp4', {videoBitrate: 'high'});
  console.log('Encodable MP4 codecs:', codecs);
  // Example output: ['h264', 'h265'] (depends on Mediabunny capabilities)
}

listEncodable();

```

This function filters the core codec list against the cloud service's current capabilities, ensuring you don't attempt to render with a codec that doesn't support your requested bitrate or quality settings.

## Summary

- Remotion supports eight video codecs: `h264`, `h265`, `vp8`, `vp9`, `prores`, `h264-mkv`, `h264-ts`, and `gif`, defined in **[packages/core/src/codec.ts]**.
- Container compatibility varies: MP4 supports `h264` and `h265`; WebM supports `vp8` and `vp9`; WAV supports none.
- Use `getAvailableVideoCodecs` from **[packages/webcodecs/src/get-available-video-codecs.ts]** to query supported codecs for specific containers.
- Default codecs are `h264` for MP4 and `vp8` for WebM, retrievable via `getDefaultVideoCodec`.
- Cloud rendering via Mediabunny may restrict available codecs based on bitrate settings; verify with `getEncodableVideoCodecs` from **[packages/web-renderer/src/get-encodable-codecs.ts]**.

## Frequently Asked Questions

### What is the default video codec for MP4 exports in Remotion?

The default video codec for MP4 containers is **`h264`**. You can retrieve this programmatically using the `getDefaultVideoCodec` function from `@remotion/webcodecs`, which returns `'h264'` when passed `{container: 'mp4'}`.

### Can I use ProRes codecs with Remotion?

Yes, Remotion includes **`prores`** in its core codec list defined in **[packages/core/src/codec.ts]**. ProRes is available for high-quality professional workflows, though you should verify container compatibility and whether your rendering environment (local vs. cloud via Mediabunny) supports it for your specific bitrate requirements.

### How do I check if a specific codec is supported before rendering?

Import the `validCodecs` array from `@remotion/core/codec` to validate against the master list of supported codecs. For container-specific validation, use `getAvailableVideoCodecs` from `@remotion/webcodecs` to ensure the codec works with your target container format.

### Does Remotion support AV1 video codec?

Based on the current source code in **[packages/core/src/codec.ts]**, AV1 is not included in the `validCodecs` constant. The supported modern codecs include `h265` (HEVC) and `vp9`, which offer comparable compression efficiency to AV1 for most web and professional use cases.