WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
255869
[WebCodecs] Poor video frame rate exporting from Construct Animate
https://bugs.webkit.org/show_bug.cgi?id=255869
Summary
[WebCodecs] Poor video frame rate exporting from Construct Animate
Ashley Gullen
Reported
2023-04-24 07:15:42 PDT
Our animation software Construct Animate (
https://animate.construct.net
) uses WebCodecs to export animations to videos. It does this faster than realtime by rendering each frame to a canvas as fast as possible, and encoding each frame on the canvas with WebCodecs. Then it uses a library like mp4box.js to mux the resulting video to a playable media file which the user can preview or download. This works fine in Chrome but in Safari 16.4 the resulting video has a poor framerate. It's inconsistent but seems to be around 1 frame per second, which is not enough to be useful. I also observed a tab crash in Safari following these steps once or twice but was not able to reliably reproduce that. Steps to reproduce: 1. Open
https://animate.construct.net/#open=make-animations-with-construct
2. Choose Menu > Project > Export... 3. Double-click "Video" 4. Click OK with default settings (should specify MP4 format with H.264 codec) 5. Approve any popup prompt (it is easier to allow popups for the site in advance) 6. The video export process should complete after a moment and show the result in a dialog. There the video can be previewed or downloaded. Observed result: In Safari the resulting video has a poor frame rate. Expected result: A smooth 30 FPS frame rate, as Chrome is able to produce.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2023-04-24 10:09:50 PDT
<
rdar://problem/108459224
>
youenn fablet
Comment 2
2023-05-09 05:48:13 PDT
Looking at the provided test, the encoding part seems fine, it encodes around 150 video frames. Looking at WebCodecs input, it seems most VideoFrames have the same content as the previous ones. The issue might be in the generation of the VideoFrames from canvas, or maybe the canvas drawing. @Ashley, I have difficulties debugging your canvas -> VideoFrame code. It might help if you could you take a look at your canvas -> VideoFrame code path, maybe isolate what you are doing in a separate page that I could play with.
Ashley Gullen
Comment 3
2023-05-22 06:42:49 PDT
I tried making a minimal reproduction but it worked fine and did not demonstrate the problem. So I'm afraid I'm not sure what it is about what Construct Animate is doing specifically that is resulting in this problem with Safari only.
Kimmo Kinnunen
Comment 4
2023-10-23 05:50:24 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/19413
EWS
Comment 5
2023-10-25 03:02:48 PDT
Committed
269757@main
(3cf847f4c0b4): <
https://commits.webkit.org/269757@main
> Reviewed commits have been landed. Closing PR #19413 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug