Skip to content

Conversation

@stepancar
Copy link
Contributor

@stepancar stepancar commented Oct 25, 2024

Libavjs webcodecs draft

Here I'm trying to replace beamocoder with libavjs+webcodecs, without any logic modification.

Decoding and drawing 10 seconds of frames with html video element
https://stepancar.github.io/articles/articles/html-video-element-seeking/
video: https://github.com/Lumen5/framefusion/blob/main/test/samples/bbb10m.mp4

{
"totalFramesGenerated": 301,
"totalTime": 19838.19999998808,
"seekingTimePerFrame": 65.90764119597368,
"seekingFPS": 15.172747527506573,
}

Same video with libavjs + webcodecs is 20 times faster
Decoded videos segment with duration: 10.033333333333308
test.html:48 Decoded frames count: 300.99999999999926
test.html:49 Rendering time: 481
test.html:50 FPS: 625.7796257796242
test.html:51 Average frame decoding time: 1.5980066445182763
Its faster than original framefusion on my machine

right now it's not 100% compatible. here we use another seeking method, because I'm waiting release of this PR
Yahweasel/libav.js#68

@stepancar stepancar marked this pull request as draft October 25, 2024 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant