TypeScript Types Reference
The following types are part of the stable API of @remotion/media-parser:
MediaParserDimensions
tsximporttype {MediaParserDimensions } from'@remotion/media-parser';
MediaParserAudioCodec
tsximporttype {MediaParserAudioCodec } from'@remotion/media-parser';
More values may be added in the future, this would not be considered a breaking change.
MediaParserVideoCodec
tsximporttype {MediaParserVideoCodec } from'@remotion/media-parser';
More values may be added in the future, this would not be considered a breaking change.
MediaParserContainer
tsximporttype {MediaParserContainer } from'@remotion/media-parser';
More values may be added in the future, this would not be considered a breaking change.
MediaParserLocation
tsximporttype {MediaParserLocation } from'@remotion/media-parser';
MediaParserEmbeddedImage
tsximporttype {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
tsximporttype {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
tsximporttype {MediaParserLogLevel } from'@remotion/media-parser';
MediaParserMetadataEntry
tsximporttype {MediaParserMetadataEntry } from'@remotion/media-parser';
MediaParserAudioSample
tsximporttype {MediaParserAudioSample } from'@remotion/media-parser';
MediaParserOnAudioSample
tsximporttype {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
tsximporttype {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
tsximporttype {MediaParserOnVideoSample } from'@remotion/media-parser';
MediaParserAudioTrack
tsximporttype {MediaParserAudioTrack } from'@remotion/media-parser';
MediaParserOnAudioTrackParams
tsximporttype {MediaParserOnAudioTrackParams } from'@remotion/media-parser';
MediaParserOnVideoTrackParams
tsximporttype {MediaParserOnVideoTrackParams } from'@remotion/media-parser';
MediaParserAdvancedColor
tsximporttype {MediaParserAdvancedColor } from'@remotion/media-parser';
MediaParserMatrixCoefficients
tsximporttype {MediaParserMatrixCoefficients } from'@remotion/media-parser';
More values may be added in the future, this would not be considered a breaking change.
MediaParserPrimaries
tsximporttype {MediaParserPrimaries } from'@remotion/media-parser';
More values may be added in the future, this would not be considered a breaking change.
MediaParserTransferCharacteristics
tsximporttype {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';exporttypeMediaParserVideoTrack = {// 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
tsximporttype {MediaParserAudioTrack } from'@remotion/media-parser';
MediaParserOtherTrack
tsximporttype {MediaParserOtherTrack } from'@remotion/media-parser';
MediaParserTrack
tsximporttype {MediaParserTrack } from'@remotion/media-parser';
MediaParserSampleAspectRatio
tsximporttype {MediaParserSampleAspectRatio } from'@remotion/media-parser';
MediaParserOnVideoTrack
tsximporttype {MediaParserOnVideoTrack } from'@remotion/media-parser';
MediaParserOnAudioTrack
tsximporttype {MediaParserOnAudioTrack } from'@remotion/media-parser';
MediaParserOnVideoTrackParams
tsximporttype {MediaParserOnVideoTrackParams } from'@remotion/media-parser';
MediaParserOnAudioTrackParams
tsximporttype {MediaParserOnAudioTrackParams } from'@remotion/media-parser';
ParseMediaSrc
tsximporttype {ParseMediaSrc } from'@remotion/media-parser';
M3uStream
tsximporttype {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
tsximporttype {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
tsximporttype {SeekResolution } from'@remotion/media-parser';