thenickdude / webm-writer-js

JavaScript-based WebM video encoder for Google Chrome
277 stars 43 forks source link

use webm-writer with mediarecorder #26

Open millzee01 opened 3 years ago

millzee01 commented 3 years ago

Hi,

Can webm-writer be used to create the final webm output from a mediarecorder blob?

the reason i ask is because chromium browsers don't seem to write the final segment size as its used to stream (hens no final size)

Which causes a playback problem on standard players.

I believe web-writer resolves this issue, but wonder if I can use it like this?

guest271314 commented 3 years ago

You can utilize ts-ebml, e.g., see https://github.com/guest271314/MediaFragmentRecorder/issues/8#issuecomment-520281126.

bevand10 commented 3 years ago

https://w3c.github.io/webcodecs/samples/capture-to-file/capture-to-file.html

guest271314 commented 3 years ago

@bevand10 The resulting .webm files has issues: No frames appear to be written. Are you sure WebCodecs implementation of VP8 and VP9 are consistent with what is expected per Matroska specification?

The WebCodecs 'opus' implementation is not consistent with Opus implementation of MediaRecorder. AFAICT there is no way to playback the 'opus' encoded frames without using WebCodecs implementation to decode. Even then there are issues with regard to integration with MediaStreamTrackGenerator, see