TypeScript Types Reference
The following types are part of the stable API of @remotion/media-parser
:
MediaParserDimensions
tsx
import type {MediaParserDimensions } from '@remotion/media-parser';
MediaParserAudioCodec
tsx
import type {MediaParserAudioCodec } from '@remotion/media-parser';
More values may be added in the future, this would not be considered a breaking change.
MediaParserVideoCodec
tsx
import type {MediaParserVideoCodec } from '@remotion/media-parser';
More values may be added in the future, this would not be considered a breaking change.
MediaParserContainer
tsx
import type {MediaParserContainer } from '@remotion/media-parser';
More values may be added in the future, this would not be considered a breaking change.
MediaParserLocation
tsx
import type {MediaParserLocation } from '@remotion/media-parser';
MediaParserEmbeddedImage
tsx
import type {MediaParserEmbeddedImage } from '@remotion/media-parser';
mimeType
: The MIME type of the image, ornull
description
: A description of the image, ornull
data
: The image data as aUint8Array
MediaParserKeyframe
tsx
import 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
tsx
import type {MediaParserLogLevel } from '@remotion/media-parser';
MediaParserMetadataEntry
tsx
import type {MediaParserMetadataEntry } from '@remotion/media-parser';
MediaParserAudioSample
tsx
import type {MediaParserAudioSample } from '@remotion/media-parser';
MediaParserOnAudioSample
tsx
import 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
tsx
import 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
tsx
import type {MediaParserOnVideoSample } from '@remotion/media-parser';
MediaParserAudioTrack
tsx
import type {MediaParserAudioTrack } from '@remotion/media-parser';
MediaParserOnAudioTrackParams
tsx
import type {MediaParserOnAudioTrackParams } from '@remotion/media-parser';
MediaParserOnVideoTrackParams
tsx
import type {MediaParserOnVideoTrackParams } from '@remotion/media-parser';
MediaParserAdvancedColor
tsx
import type {MediaParserAdvancedColor } from '@remotion/media-parser';
MediaParserMatrixCoefficients
tsx
import type {MediaParserMatrixCoefficients } from '@remotion/media-parser';
More values may be added in the future, this would not be considered a breaking change.
MediaParserPrimaries
tsx
import type {MediaParserPrimaries } from '@remotion/media-parser';
More values may be added in the future, this would not be considered a breaking change.
MediaParserTransferCharacteristics
tsx
import type {MediaParserTransferCharacteristics } from '@remotion/media-parser';
More values may be added in the future, this would not be considered a breaking change.
MediaParserVideoTrack
tsx
import {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
tsx
import type {MediaParserAudioTrack } from '@remotion/media-parser';
MediaParserOtherTrack
tsx
import type {MediaParserOtherTrack } from '@remotion/media-parser';
MediaParserTrack
tsx
import type {MediaParserTrack } from '@remotion/media-parser';
MediaParserSampleAspectRatio
tsx
import type {MediaParserSampleAspectRatio } from '@remotion/media-parser';
MediaParserOnVideoTrack
tsx
import type {MediaParserOnVideoTrack } from '@remotion/media-parser';
MediaParserOnAudioTrack
tsx
import type {MediaParserOnAudioTrack } from '@remotion/media-parser';
MediaParserOnVideoTrackParams
tsx
import type {MediaParserOnVideoTrackParams } from '@remotion/media-parser';
MediaParserOnAudioTrackParams
tsx
import type {MediaParserOnAudioTrackParams } from '@remotion/media-parser';
ParseMediaSrc
tsx
import type {ParseMediaSrc } from '@remotion/media-parser';
M3uStream
tsx
import 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
tsx
import type {M3uAssociatedPlaylist } from '@remotion/media-parser';
src
: The URL or file path of the audio trackautoselect
: Corresponds to theAUTOSELECT
attribute in the HLS playlistdefault
: Corresponds to theDEFAULT
attribute 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
.