TypeScript Types Reference
The following types are part of the stable API of @remotion/media-parser:
MediaParserDimensions
tsximport type {MediaParserDimensions } from '@remotion/media-parser';
MediaParserAudioCodec
tsximport type {MediaParserAudioCodec } from '@remotion/media-parser';
More values may be added in the future, this would not be considered a breaking change.
MediaParserVideoCodec
tsximport type {MediaParserVideoCodec } from '@remotion/media-parser';
More values may be added in the future, this would not be considered a breaking change.
MediaParserContainer
tsximport type {MediaParserContainer } from '@remotion/media-parser';
More values may be added in the future, this would not be considered a breaking change.
MediaParserLocation
tsximport type {MediaParserLocation } from '@remotion/media-parser';
MediaParserEmbeddedImage
tsximport type {MediaParserEmbeddedImage } from '@remotion/media-parser';
mimeType: The MIME type of the image, ornulldescription: A description of the image, ornulldata: The image data as aUint8Array
MediaParserKeyframe
tsximport type {MediaParserKeyframe } from '@remotion/media-parser';
presentationTimeInSeconds: The time in seconds when the keyframe should be presenteddecodingTimeInSeconds: The time in seconds when the keyframe should be decodedpositionInBytes: The position in bytes where the keyframe is located in the filesizeInBytes: The size of the keyframe in bytestrackId: The ID of the track the frame belongs to
MediaParserLogLevel
tsximport type {MediaParserLogLevel } from '@remotion/media-parser';
MediaParserMetadataEntry
tsximport type {MediaParserMetadataEntry } from '@remotion/media-parser';
MediaParserAudioSample
tsximport type {MediaParserAudioSample } from '@remotion/media-parser';
MediaParserOnAudioSample
tsximport type {MediaParserOnAudioSample } from '@remotion/media-parser';
The data, timestamp, duration, type fields are in a format so that this type can be passed into the EncodedAudioChunk constructor.
The other fields are for informative purposes.
MediaParserVideoSample
tsximport type {MediaParserVideoSample } from '@remotion/media-parser';
Note: timestamp is the presentation timestamp of the sample. decodingTimestamp is the timestamp of the sample when it will be decoded.
The data, timestamp, duration, type fields are in a format so that this type can be passed into the EncodedVideoChunk constructor.
The other fields are for informative purposes.
MediaParserOnVideoSample
tsximport type {MediaParserOnVideoSample } from '@remotion/media-parser';
MediaParserAudioTrack
tsximport type {MediaParserAudioTrack } from '@remotion/media-parser';
MediaParserOnAudioTrackParams
tsximport type {MediaParserOnAudioTrackParams } from '@remotion/media-parser';
MediaParserOnVideoTrackParams
tsximport type {MediaParserOnVideoTrackParams } from '@remotion/media-parser';
MediaParserAdvancedColor
tsximport type {MediaParserAdvancedColor } from '@remotion/media-parser';
MediaParserMatrixCoefficients
tsximport type {MediaParserMatrixCoefficients } from '@remotion/media-parser';
More values may be added in the future, this would not be considered a breaking change.
MediaParserPrimaries
tsximport type {MediaParserPrimaries } from '@remotion/media-parser';
More values may be added in the future, this would not be considered a breaking change.
MediaParserTransferCharacteristics
tsximport type {MediaParserTransferCharacteristics } from '@remotion/media-parser';
More values may be added in the future, this would not be considered a breaking change.
MediaParserVideoTrack
tsximport {MediaParserVideoCodec ,MediaParserCodecData ,MediaParserSampleAspectRatio ,MediaParserAdvancedColor } from '@remotion/media-parser';export typeMediaParserVideoTrack = {// WebCodecscodec : string;description :Uint8Array | undefined;colorSpace :VideoColorSpaceInit ;codedWidth : number;codedHeight : number;displayAspectWidth : number;displayAspectHeight : number;// Non-WebCodecstype : 'video';trackId : number;codecEnum :MediaParserVideoCodec ;codecData :MediaParserCodecData | null;sampleAspectRatio :MediaParserSampleAspectRatio ;width : number;height : number;rotation : number;fps : number | null;timescale : number;advancedColor :MediaParserAdvancedColor ;m3uStreamFormat : 'ts' | 'mp4' | null;// When the track starts in seconds - can be non-zero for MP4 containers.// You don't need to account for it, as the samples will already be offset by this amount.startInSeconds : number;};
See: VideoColorSpaceInit WebCodecs definition
MediaParserAudioTrack
tsximport type {MediaParserAudioTrack } from '@remotion/media-parser';
MediaParserOtherTrack
tsximport type {MediaParserOtherTrack } from '@remotion/media-parser';
MediaParserTrack
tsximport type {MediaParserTrack } from '@remotion/media-parser';
MediaParserSampleAspectRatio
tsximport type {MediaParserSampleAspectRatio } from '@remotion/media-parser';
MediaParserOnVideoTrack
tsximport type {MediaParserOnVideoTrack } from '@remotion/media-parser';
MediaParserOnAudioTrack
tsximport type {MediaParserOnAudioTrack } from '@remotion/media-parser';
MediaParserOnVideoTrackParams
tsximport type {MediaParserOnVideoTrackParams } from '@remotion/media-parser';
MediaParserOnAudioTrackParams
tsximport type {MediaParserOnAudioTrackParams } from '@remotion/media-parser';
ParseMediaSrc
tsximport type {ParseMediaSrc } from '@remotion/media-parser';
M3uStream
tsximport type {M3uStream } from '@remotion/media-parser';
bandwidthInBitsPerSec: The bandwidth of the stream. May benull.averageBandwidthInBitsPerSec: The average bandwidth of the stream. May benull.resolution: The resolution of the stream. May benull.codecs: The codec strings of the stream as an array May benull.src: The URL or file path of the streamid: A unique identifier that Remotion gives the streamassociatedPlaylists: An array ofM3uAssociatedPlaylist- other (probably audio) tracks that are connected to this stream but live in a separate file.
M3uAssociatedPlaylist
tsximport type {M3uAssociatedPlaylist } from '@remotion/media-parser';
src: The URL or file path of the audio trackautoselect: Corresponds to theAUTOSELECTattribute in the HLS playlistdefault: Corresponds to theDEFAULTattribute in the HLS playlistlanguage: The language of the audio trackname: The name of the audio trackgroupId: The group ID of the audio trackchannels: The number of audio channels in the audio track, ornull.
SeekResolutionv4.0.312
tsximport type {SeekResolution } from '@remotion/media-parser';