Skip to content

🎥 Make videos programmatically with React

document onvideoFrame

Jonny Burger7f1ce386392f
diff --git a/packages/docs/docs/offthreadvideo.mdx b/packages/docs/docs/offthreadvideo.mdx
index 155b07bb16..765a5ee2cd 100644
--- a/packages/docs/docs/offthreadvideo.mdx
+++ b/packages/docs/docs/offthreadvideo.mdx
@@ -261,6 +261,13 @@ If you don't pass a callback, the video will be muted and be retried once.
This prop is useful if you want to handle the error yourself, e.g. for pausing the Player.
Read more here about [autoplay restrictions](/docs/player/autoplay).
+### `onVideoFrame`<AvailableFrom v="4.0.190" />
+
+A callback function that gets called when a frame is extracted from the video.
+Useful for [video manipulation](/docs/video-manipulation).
+The callback is called with a [`CanvasImageSource`](https://developer.mozilla.org/en-US/docs/Web/API/CanvasImageSource) object.
+During preview, this is a `HTMLVideoElement` object, during rendering, it is an `HTMLImageElement`.
+
### ~~`imageFormat` <AvailableFrom v="3.0.22" />~~
_removed in v4.0.0_
diff --git a/packages/docs/docs/video.mdx b/packages/docs/docs/video.mdx
index f08bacd963..16edc294a4 100644
--- a/packages/docs/docs/video.mdx
+++ b/packages/docs/docs/video.mdx
@@ -248,6 +248,14 @@ If you don't pass a callback, the video will be muted and be retried once.
This prop is useful if you want to handle the error yourself, e.g. for pausing the Player.
Read more here about [autoplay restrictions](/docs/player/autoplay).
+### `onVideoFrame`<AvailableFrom v="4.0.190" />
+
+A callback function that gets called when a frame is extracted from the video.
+Useful for [video manipulation](/docs/video-manipulation).
+The callback is called with a [`CanvasImageSource`](https://developer.mozilla.org/en-US/docs/Web/API/CanvasImageSource) object.
+When you use the `<Video>` tag, it is always a `HTMLVideoElement` object.
+
+
## Speed up renders for video with silent audio
Remotion will download the whole video during render in order to mix its audio. If the video contains a silent audio track, you can add the muted property to signal to Remotion that it does not need to download the video and make the render more efficient.