Skip to content

🎥 Make videos programmatically with React

Restore VideoForRendering.tsx

Jonny Burger22d94844d480
diff --git a/packages/core/src/video/VideoForRendering.tsx b/packages/core/src/video/VideoForRendering.tsx
index a1e1d0c126..182cac9582 100644
--- a/packages/core/src/video/VideoForRendering.tsx
+++ b/packages/core/src/video/VideoForRendering.tsx
@@ -20,12 +20,7 @@ export const VideoForRendering: React.FC<RemotionVideoProps> = ({
if (!videoRef.current) {
return;
}
-
- // target middle of frame to reduce risk of rounding errors (which can cause the wrong frame to be shown)
- const msPerFrame = 1000 / videoConfig.fps;
- const msShift = msPerFrame / 2;
- const frameInSeconds = (frame * msPerFrame + msShift) / 1000;
-
+ const frameInSeconds = frame / videoConfig.fps;
const handle = delayRender();
if (videoRef.current.currentTime === frameInSeconds) {
if (videoRef.current.readyState >= 2) {