Chapter 707: canCopyVideoTrack()
Core Idea
:::warning We are phasing out Remotion WebCodecs and are moving to Mediabunny!
Key Concepts
- Examples
- API
- inputTrack
- rotationToApply
- inputContainer
- outputContainer
- resizeOperation
- outputVideoCodec
Code Examples
const {tracks, container} = await parseMedia({
src: 'https://remotion.media/BigBuckBunny.webm',
fields: {
tracks: true,
container: true,
},
});
const videoTracks = tracks.filter((t) => t.type === 'video');
for (const track of videoTracks) {
canCopyVideoTrack({
outputContainer: 'webm',
inputTrack: track,
inputContainer: container,
rotationToApply: 0,
resizeOperation: null,
outputVideoCodec: null,
}); // boolean
}
- What it demonstrates: Usage pattern for canCopyVideoTrack() from the official docs.
Key Takeaways
- Understand examples when working with canCopyVideoTrack().
- Understand api when working with canCopyVideoTrack().
- Understand inputtrack when working with canCopyVideoTrack().
- Understand rotationtoapply when working with canCopyVideoTrack().
- Understand inputcontainer when working with canCopyVideoTrack().
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 Reencode Audio Track: related page in the WebCodecs (@remotion/webcodecs) section.