Vanilagy / mp4-muxer

MP4 multiplexer in pure TypeScript with support for WebCodecs API, video & audio.
https://vanilagy.github.io/mp4-muxer/demo
MIT License
419 stars 32 forks source link

Video quality on Safari #15

Closed pkl closed 7 months ago

pkl commented 1 year ago

H!

I have a hard time getting good quality MP4 videos created on desktop Safari.

This config gives me perfect results in Chrome (frames are encoded from canvas):

videoEncoder.configure({
 codec: "avc1.640028",
 width: 720,
 height: 720,
 bitrate: 10_000_000,
 framerate: 30,
 latencyMode: "quality",
});

But no matter how I tweak the config Safari creates MP4 videos with ~110 kb/s.

Can anyone share a config that works in Safari?

TheForsakenSpirit commented 1 year ago

@pkl iOS safari or macOS safari? I saw this bug on webkit bug tracker. Seems related https://bugs.webkit.org/show_bug.cgi?id=258060 Also I have revers issue on iOS, files too big independent of configuration.

pkl commented 1 year ago

@TheForsakenSpirit

Safari on macOS. Bug is AFAIK present in Safari 16.6 and Safari Technology Preview - Release 179.

Yes, the bug you found seems to be related!

So, this is most likely not a bug in mp4-muxer, but maybe keep it open anyway?

Vanilagy commented 7 months ago

Sadly, not too much I can do here. I'll close this issue as it's not directly related to something in mp4-muxer. Feel free to still drop updates if you found a fix for the video quality in Safari.