Chapter 694: Extract samples
Core Idea
:::warning We are phasing out Media Parser and are moving to Mediabunny!
Key Concepts
- Getting tracks
- Getting samples
- Check if a sample was the last one<AvailableFrom v="4.0.307"/>
- Seeking in callbacks
Code Examples
const samples = await parseMedia({
src: 'https://remotion.media/video.mp4',
onVideoTrack: ({track, container}) => {
console.log(track.codecEnum);
// ^?
return null;
},
});
- What it demonstrates: Usage pattern for Extract samples from the official docs.
Key Takeaways
- Understand getting tracks when working with Extract samples.
- Understand getting samples when working with Extract samples.
- Understand check if a sample was the last one<availablefrom v="4.0.307"/> when working with Extract samples.
- Understand seeking in callbacks when working with Extract samples.
Connects To
- Download and Parse: related page in the Media Parser (@remotion/media-parser) section.
- Download and Parse Media: related page in the Media Parser (@remotion/media-parser) section.
- Fast and Slow: related page in the Media Parser (@remotion/media-parser) section.