Skip to content

🎥 Make videos programmatically with React

Restore VideoForDevelopment.tsx

Jonny Burgeracd9d4f99598
diff --git a/packages/core/src/video/VideoForDevelopment.tsx b/packages/core/src/video/VideoForDevelopment.tsx
index af2af53147..3e026c6166 100644
--- a/packages/core/src/video/VideoForDevelopment.tsx
+++ b/packages/core/src/video/VideoForDevelopment.tsx
@@ -35,11 +35,7 @@ export const VideoForDevelopment: React.FC<RemotionVideoProps> = (props) => {
// So frame = 0 in Remotion is like frame = 1 for the browser
return (currentFrame + 1) / videoConfig.fps;
}
-
- // 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;
- return (currentFrame * msPerFrame + msShift) / 1000;
+ return currentFrame / (1000 / videoConfig.fps);
})();
if (!playing || absoluteFrame === 0) {