Chapter 708: canReencodeAudioTrack()
Core Idea
:::warning We are phasing out Remotion WebCodecs and are moving to Mediabunny!
Key Concepts
- Examples
- API
- track
- audioCodec
- bitrate
- sampleRate
- Return value
- See also
Code Examples
const {tracks} = await parseMedia({
src: 'https://remotion.media/BigBuckBunny.mp4',
fields: {
tracks: true,
},
});
const audioTracks = tracks.filter((t) => t.type === 'audio');
for (const track of audioTracks) {
await canReencodeAudioTrack({
track,
audioCodec: 'opus',
bitrate: 128000,
sampleRate: null,
});
}
- What it demonstrates: Usage pattern for canReencodeAudioTrack() from the official docs.
Key Takeaways
- Understand examples when working with canReencodeAudioTrack().
- Understand api when working with canReencodeAudioTrack().
- Understand track when working with canReencodeAudioTrack().
- Understand audiocodec when working with canReencodeAudioTrack().
- Understand bitrate when working with canReencodeAudioTrack().
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.