Chapter 709: canReencodeVideoTrack()
Core Idea
:::warning We are phasing out Remotion WebCodecs and are moving to Mediabunny!
Key Concepts
- Examples
- API
- track
- videoCodec
- resizeOperation
- rotate
- Return value
- See also
Code Examples
const {tracks} = await parseMedia({
src: 'https://remotion.media/BigBuckBunny.mp4',
fields: {
tracks: true,
},
});
const videoTracks = tracks.filter((t) => t.type === 'video');
for (const track of videoTracks) {
await canReencodeVideoTrack({
track,
videoCodec: 'vp8',
resizeOperation: null,
rotate: null,
});
}
- What it demonstrates: Usage pattern for canReencodeVideoTrack() from the official docs.
Key Takeaways
- Understand examples when working with canReencodeVideoTrack().
- Understand api when working with canReencodeVideoTrack().
- Understand track when working with canReencodeVideoTrack().
- Understand videocodec when working with canReencodeVideoTrack().
- Understand resizeoperation when working with canReencodeVideoTrack().
Connects To
- Buffer Writer: related page in the WebCodecs (@remotion/webcodecs) section.
- can Copy Audio Track: related page in the WebCodecs (@remotion/webcodecs) section.
- can Copy Video Track: related page in the WebCodecs (@remotion/webcodecs) section.