Skip to main content
react-native-media-transformerv0.1.0
API referenceMetadata

Metadata

getVideoMetadata(inputUri): Promise<VideoMetadata> describes a readable video without starting or cancelling compression.

Field

Meaning

width, height

Displayed dimensions after source rotation.

duration

Duration in seconds.

size

File size in bytes; 0 if an Android content provider cannot report it.

bitrate

Estimated bitrate; video-track bitrate on iOS, container bitrate on Android.

frameRate

Nominal frame rate when available, otherwise 0.

hasAudio

Whether the input contains audio.

rotation

Source rotation in degrees, normalized to 0–360.

The bitrate unit is bits per second. frameRate is nominal/metadata-derived, not a constant-frame-rate guarantee. size: 0 from an Android provider means unknown, not proof of an empty file. Metadata extraction succeeding does not guarantee that an encoder can later export the source.