TypeScript Types Reference
The following types are part of the stable API of @remotion/media-parser:
MediaParserDimensions
tsxMediaParserDimensions } from '@remotion/media-parser';
MediaParserAudioCodec
tsxMediaParserAudioCodec } from '@remotion/media-parser';
More values may be added in the future, this would not be considered a breaking change.
MediaParserVideoCodec
tsxMediaParserVideoCodec } from '@remotion/media-parser';
More values may be added in the future, this would not be considered a breaking change.
MediaParserContainer
tsxMediaParserContainer } from '@remotion/media-parser';
More values may be added in the future, this would not be considered a breaking change.
MediaParserLocation
tsxMediaParserLocation } from '@remotion/media-parser';
MediaParserEmbeddedImage
tsxMediaParserEmbeddedImage } from '@remotion/media-parser';
- mimeType: The MIME type of the image, or- null
- description: A description of the image, or- null
- data: The image data as a- Uint8Array
MediaParserKeyframe
tsxMediaParserKeyframe } from '@remotion/media-parser';
- presentationTimeInSeconds: The time in seconds when the keyframe should be presented
- decodingTimeInSeconds: The time in seconds when the keyframe should be decoded
- positionInBytes: The position in bytes where the keyframe is located in the file
- sizeInBytes: The size of the keyframe in bytes
- trackId: The ID of the track the frame belongs to
MediaParserLogLevel
tsxMediaParserLogLevel } from '@remotion/media-parser';
MediaParserMetadataEntry
tsxMediaParserMetadataEntry } from '@remotion/media-parser';
MediaParserAudioSample
tsxMediaParserAudioSample } from '@remotion/media-parser';
MediaParserOnAudioSample
tsxMediaParserOnAudioSample } 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
tsxMediaParserVideoSample } 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
tsxMediaParserOnVideoSample } from '@remotion/media-parser';
MediaParserAudioTrack
tsxMediaParserAudioTrack } from '@remotion/media-parser';
MediaParserOnAudioTrackParams
tsxMediaParserOnAudioTrackParams } from '@remotion/media-parser';
MediaParserOnVideoTrackParams
tsxMediaParserOnVideoTrackParams } from '@remotion/media-parser';
MediaParserAdvancedColor
tsxMediaParserAdvancedColor } from '@remotion/media-parser';
MediaParserMatrixCoefficients
tsxMediaParserMatrixCoefficients } from '@remotion/media-parser';
More values may be added in the future, this would not be considered a breaking change.
MediaParserPrimaries
tsxMediaParserPrimaries } from '@remotion/media-parser';
More values may be added in the future, this would not be considered a breaking change.
MediaParserTransferCharacteristics
tsxMediaParserTransferCharacteristics } from '@remotion/media-parser';
More values may be added in the future, this would not be considered a breaking change.
MediaParserVideoTrack
tsxMediaParserVideoCodec ,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
tsxMediaParserAudioTrack } from '@remotion/media-parser';
MediaParserOtherTrack
tsxMediaParserOtherTrack } from '@remotion/media-parser';
MediaParserTrack
tsxMediaParserTrack } from '@remotion/media-parser';
MediaParserSampleAspectRatio
tsxMediaParserSampleAspectRatio } from '@remotion/media-parser';
MediaParserOnVideoTrack
tsxMediaParserOnVideoTrack } from '@remotion/media-parser';
MediaParserOnAudioTrack
tsxMediaParserOnAudioTrack } from '@remotion/media-parser';
MediaParserOnVideoTrackParams
tsxMediaParserOnVideoTrackParams } from '@remotion/media-parser';
MediaParserOnAudioTrackParams
tsxMediaParserOnAudioTrackParams } from '@remotion/media-parser';
ParseMediaSrc
tsxParseMediaSrc } from '@remotion/media-parser';
M3uStream
tsxM3uStream } from '@remotion/media-parser';
- bandwidthInBitsPerSec: The bandwidth of the stream. May be- null.
- averageBandwidthInBitsPerSec: The average bandwidth of the stream. May be- null.
- resolution: The resolution of the stream. May be- null.
- codecs: The codec strings of the stream as an array May be- null.
- src: The URL or file path of the stream
- id: A unique identifier that Remotion gives the stream
- associatedPlaylists: An array of- M3uAssociatedPlaylist- other (probably audio) tracks that are connected to this stream but live in a separate file.
M3uAssociatedPlaylist
tsxM3uAssociatedPlaylist } from '@remotion/media-parser';
- src: The URL or file path of the audio track
- autoselect: Corresponds to the- AUTOSELECTattribute in the HLS playlist
- default: Corresponds to the- DEFAULTattribute in the HLS playlist
- language: The language of the audio track
- name: The name of the audio track
- groupId: The group ID of the audio track
- channels: The number of audio channels in the audio track, or- null.
SeekResolutionv4.0.312
tsxSeekResolution } from '@remotion/media-parser';