Vanilagy / webm-muxer

WebM multiplexer in pure TypeScript with support for WebCodecs API, video & audio.
https://vanilagy.github.io/webm-muxer/demo
MIT License
197 stars 12 forks source link

webmmuxer throws Matroska cluster too big error even with 10 seconds keyframe interval. #30

Closed RavikumarTulugu closed 7 months ago

RavikumarTulugu commented 7 months ago

I have a media pipeline in which the encoder stage feeds the recording stage, the recording stage uses mp4/webmmuxer to write local media file. I was using mp4muxer and every thing works fine. But , when i switch to webmmuxer i get this below error and the recorder refuses to write the file. I am inserting keyframes every 10 milliseconds. I wonder whether some thing wrong with my usage. Are there any extra options we need to pass compared to mp4 muxer ?

Current Matroska cluster exceeded its maximum allowed length of 32768 milliseconds. In order to produce a correct WebM file, you must pass in a video key frame at least every 32768 milliseconds.

please advise. Thanks

Vanilagy commented 7 months ago

Are you inserting keyframes in 10-second or 10-millisecond intervals? (your title and body conflict) There is this section in the README: CleanShot 2023-11-23 at 10 10 25

Are you doing what it says?

RavikumarTulugu commented 7 months ago

sorry for the typo , it is 10 seconds and not 10 milliseconds. It is easily reproducible.

Vanilagy commented 7 months ago

Can you show me the code you use for muxing?

RavikumarTulugu commented 7 months ago

hi, the product i am working is a commercial closed source product. i will keep 32 seconds and see whether it helps. will update.

Vanilagy commented 7 months ago

That's fine, you can try to send only the parts that show how you use the muxer - not like that would be leaking any company secrets here :) It seems likely you're not passing { keyFrame: true } to the encoder every once in a while.

Vanilagy commented 7 months ago

What's the situation here?

RavikumarTulugu commented 7 months ago

I am closing it for now , as i am busy with other things.

Vanilagy commented 7 months ago

Sure, same 😂