Out of memory exception when opening a Full HD IDR frame
ramshankerji opened this issue · 5 comments
Hello there, Thanks for this analyzer. I was trying to analyzed a video and clicking the IDR frame NALU was not doing anything. Upon looking up in the browser console, I saw the following exception.
h264bitstream.js:1
Cannot enlarge memory arrays to size 19537920 bytes (OOM). Either (1) compile with -s INITIAL_MEMORY=X with X higher than the current value 16777216, (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0
That is just 20 MB of memory. So some limits seems to be set too low. The video frame I generated had entire Full HD IDR frame in a single NALU. I tried looking for something in the spec, which put an upper limit on size of NALU. So it seems a valid bit stream.
I can share the file if required. Apparently github does not allow attaching .h264 file.
Thank you. Most likely it's the memory limit that is set when compiling WebAssembly code. I'll take a look. The file would be great, maybe it it'll work if it's archived.
Never mind about the file, I found some random high-quality video and managed to reproduce the bug. Working on a fix.
Should be fixed now - I removed the memory limit, hope it does not backfire :) Make sure to hard-refresh the page.
Thanks. Indeed the problem is resolved now.