samirkumardas / jmuxer

jMuxer - a simple javascript mp4 muxer that works in both browser and node environment.
Other
559 stars 114 forks source link

InvalidBufferState fixes and fps read #89

Closed aa-telali closed 2 years ago

aa-telali commented 2 years ago

Added option to read FPS from SPS NALu (from https://github.com/mlask/jmuxer) but with an override flag in options (readFpsFromTrack). Fixes Issue #62 Added instant (fetchingTime = 0) muxing fixes (https://github.com/janeluck/jmuxer) without the extractNALu changes. Incorrect aspect_ratio_idc fix (https://github.com/mlask/jmuxer). Fixed for InvalidStateError error loop by clearing/recreating buffer - the error seems to occur when the buffer has been deleted in the background.

aa-telali commented 2 years ago

@samirkumardas, thank you for this project. Will you be looking to merge these changes? I could create an npm package from my fork but if this project is being maintained then I'd rather not?

samirkumardas commented 2 years ago

@aa-telali Thank you for your time and afford. Sorry I have been busy these days. I will look into PR this weekend. Thank you.

samirkumardas commented 2 years ago

@aa-telali Well, I have not got any good solution for InvalidStateError. The only solution is to reset the player. That's why we trigger an error so someone can take action accordingly from their end.

For example, I've attached a sample h264 file that one developer gave me. You can try playing it by running server h264.js and h264.html

Sample h264 file

samirkumardas commented 2 years ago

@aa-telali Apart from the InvalidStateError section, other sections look good, Thank you for your afford again. I will marge it and will update the buffer part a little bit. Thank you again