Skip to content

🎥 Make videos programmatically with React

`@remotion/webcodecs`: It's okay if codedWidth is not the same as displayWidth

Jonny Burgere947b732d06d
diff --git a/packages/webcodecs/src/on-frame.ts b/packages/webcodecs/src/on-frame.ts
index 16cfc401d2..b52334c465 100644
--- a/packages/webcodecs/src/on-frame.ts
+++ b/packages/webcodecs/src/on-frame.ts
@@ -19,18 +19,6 @@ export const onFrame = async ({
}) => {
const newFrame = onVideoFrame ? await onVideoFrame({frame, track}) : frame;
- if (newFrame.codedHeight !== frame.displayHeight) {
- throw new Error(
- `Returned VideoFrame of track ${track.trackId} has different codedHeight (${newFrame.codedHeight}) than the input frame displayHeight (${frame.displayHeight})`,
- );
- }
-
- if (newFrame.codedWidth !== frame.displayWidth) {
- throw new Error(
- `Returned VideoFrame of track ${track.trackId} has different codedWidth (${newFrame.codedWidth}) than the input frame displayWidth (${frame.displayWidth})`,
- );
- }
-
if (newFrame.displayWidth !== frame.displayWidth) {
throw new Error(
`Returned VideoFrame of track ${track.trackId} has different displayWidth (${newFrame.displayWidth}) than the input frame (${newFrame.displayHeight})`,