Skip to content

🎥 Make videos programmatically with React

document fields

Jonny Burger253ad65630ba
diff --git a/packages/docs/docs/media-parser/fast-and-slow.mdx b/packages/docs/docs/media-parser/fast-and-slow.mdx
index 12657b56eb..3eda86d9bd 100644
--- a/packages/docs/docs/media-parser/fast-and-slow.mdx
+++ b/packages/docs/docs/media-parser/fast-and-slow.mdx
@@ -22,7 +22,10 @@ Obviously, processing less of the file is faster and you should aim to read only
The following [`fields`](/docs/media-parser#fields) require the full file to be read:
- [`structure`](/docs/media-parser/parse-media#structure)
-- [`keyframes`](/docs/media-parser/parse-media#keyframes) - Except for ISO Base Media (`.mp4`, `.mov`) files.
+- [`slowKeyframes`](/docs/media-parser/parse-media#slowkeyframes)
+- [`slowFps`](/docs/media-parser/parse-media#slowfps)
+- [`slowDurationInSeconds`](/docs/media-parser/parse-media#slowdurationinseconds)
+- [`slowNumberOfFrames`](/docs/media-parser/parse-media#slownumberofframes)
Also, if an [`onVideoTrack`](/docs/media-parser/parse-media#onvideotrack) or [`onAudioTrack`](/docs/media-parser/parse-media#onvideotrack) handler is passed, and the handler function returns an callback function for each sample, full parsing is required.
diff --git a/packages/docs/docs/media-parser/parse-media.mdx b/packages/docs/docs/media-parser/parse-media.mdx
index 7555fba404..c777c40060 100644
--- a/packages/docs/docs/media-parser/parse-media.mdx
+++ b/packages/docs/docs/media-parser/parse-media.mdx
@@ -78,7 +78,15 @@ Use `unrotatedDimensions` to get the dimensions before rotation.
_number | null_
-The duration of the video in seconds.
+The duration of the video in seconds.
+Only returns a non-null value if the duration is stored in the metadata.
+
+#### `slowDurationInSeconds`
+
+_number_
+
+The duration of the video in seconds, but it is guaranteed to return a value.
+If needed, the entire video file is read to determine the duration.
#### `name`
@@ -113,7 +121,15 @@ The internal structure of the video. Unstable, internal data structure, refer to
_number | null_
-The frame rate of the video.
+The frame rate of the video.
+Only returns a non-null value if the frame rate is stored in the metadata.
+
+#### `slowFps`
+
+_number_
+
+The frame rate of the video, but it is guaranteed to return a value.
+If needed, the entire video file is read to determine the frame rate.
#### `videoCodec`
@@ -146,7 +162,7 @@ The location of the video was shot. Either `null` if not available or:
Returns an object of two two arrays `videoTracks` and `audioTracks`.
The data structure of them is not yet stable.
-#### `keyframes`
+#### `slowKeyframes`
An array of keyframes. Each keyframe has the following structure:
@@ -156,6 +172,13 @@ An array of keyframes. Each keyframe has the following structure:
- `sizeInBytes`: The size of the keyframe in bytes
- `trackId`: The ID of the track the frame belongs to
+#### `slowNumberOfFrames`
+
+_number_
+
+The number of video frames in the media.
+Will read the entire video file to determine the number of frames.
+
#### `unrotatedDimensions`
_`{width: number, height: number}`_