Processing video with WebCodecs and @remotion/media-parser
parseMedia() is able to extract tracks and samples from audio and video in a format that is suitable for usage with WebCodecs APIs.
Minimal example
The following snippet is a basic, non-production ready example of how to use parseMedia() with WebCodecs.
Reading video framestsx// ⚠️ Simple, but non-production ready exampleimport {parseMedia ,MediaParserOnAudioTrack ,MediaParserOnVideoTrack } from '@remotion/media-parser';constresult = awaitparseMedia ({src : 'https://remotion.media/video.mp4',onVideoTrack : ({track }) => {constdecoder = newVideoDecoder ({output :console .log ,error :console .