bitmap2video icon indicating copy to clipboard operation
bitmap2video copied to clipboard

Buffer Underrun

Open dburckh opened this issue 4 years ago • 2 comments

https://github.com/israel-fl/bitmap2video/blob/f51c404aed29e5f7043144a2ddc738f51b589d21/library/src/main/java/com/homesoft/encoder/Muxer.kt#L82

So, I'm not sure how this is working. Generally you want to interleave audio and video together. It looks like you are dumping all the video and then dumping all the audio. So, you'll end up with a bunch of video frames, followed by a bunch of audio frames. This may work for MP4 because it bunches things up in the file. My assumption is at some point you'll underrun the player buffer and lose audio. It probably won't stream very well. I have 3 theories, 1) The files are so small it doesn't matter. 2) Android is covering you sins. 3) I'm not correct in how this works. :)

dburckh avatar Jul 20 '20 04:07 dburckh

Android is covering your sins

All praise be to thee Android gods 🙏

But in all seriousness, I'll read up more on how to mux both frames together.

israel-fl avatar Aug 11 '20 18:08 israel-fl

@israel-fl it even crashes when no audio is added

kochchy avatar Sep 11 '20 20:09 kochchy