thenickdude / webm-writer-js

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

Webcodecs Support? #43

Open tungs opened 2 years ago

tungs commented 2 years ago

Is there an interest in adding support for webcodecs? webm-writer-js already handles a lot of the data formatting and muxing for webm; it's pretty close to adding support for webcodecs.

If you didn't know, the w3c's webcodecs repository uses a modified version of webm-writer for one of its samples that can save a limited video. I ran into some flaws with that version, and ended up creating my own version here. It can add EncodedVideoChunks to a webm using a new addChunk function.

Let me know if you want me to do a PR, I'd be happy to. Thanks for all the great work on this library!

ericshuk commented 2 years ago

I'm also trying to find a working sample that supports adding audio channels using the webm-writer. @tungs did you happen to figured that one out?

tungs commented 2 years ago

@FullyFerret, I should have been clearer in my post; I'm talking about video only. You probably know much more about this than I, but it seems audio requires audio-specific EBML tags and probably a decent amount of work to integrate an audio source.

guest271314 commented 2 years ago

See https://github.com/davedoesdev/webm-muxer.js.

Vanilagy commented 1 year ago

Check out my library https://github.com/Vanilagy/webm-muxer which uses WebCodecs and supports both video and audio

rafael2k commented 1 year ago

Thanks @Vanilagy !