w3c / webcodecs

WebCodecs is a flexible web API for encoding and decoding audio and video.
https://w3c.github.io/webcodecs/
Other
987 stars 136 forks source link

Add audio recording to capture to file sample. #670

Open samdrivertlol opened 1 year ago

samdrivertlol commented 1 year ago

I have seen in the "capture-to-file" sample how to encode and save the MediaStream from a Webcam, but is there a simple way to combine it with the recorded audio?

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

I am aware of MediaRecorder, but I cannot use it for certain reasons.

I would appreciate any suggestions or solutions. Thank you very much.

dalecurtis commented 1 year ago

Adding audio should just be adding a track alongside the video one. The muxer should support that, but I haven't looked at it closely.