Replies: 2 comments 1 reply
-
|
I'm not sure I understand the issue. Why don't you simply provide the CanvasSource with a canvas that has even dimensions? Alternatively, you can create a VideoFrame from the canvas instead and use the Then, create a VideoSample from that VideoFrame and use VideoSampleSource instead. |
Beta Was this translation helpful? Give feedback.
-
|
Well, seems another solution is to change the codec from "avc" to "vp9" if the canvas dimensions are odd. Right? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a canvas that could be resized by users. That means that sometimes it happens to have odd dimensions. I capture a movie from it using this code:
Ending with the obvious error:
The dimensions 1433x1008 are not supported for codec 'avc'; both width and height must be even numbers. Make sure to round your dimensions to the nearest even number.Thank you, but I cannot block resizing to any dimension.Is there a way to say to CanvasSource to consider one bit less if the dimension is odd?
Tried to change the canvas dimensions programmatically, but without success.
Beta Was this translation helpful? Give feedback.
All reactions