-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RangeError: Offset is outside the bounds of the DataView (sparse file live streaming) #360
Comments
Here is a sample |
i am trying to do exactly the same thing. Does this library supports progressive parsing? |
You can, but what you want todo is keep adding to the buffer till you get a valid type. We also could not use the built in functions for streamer etc. I eventually just wrote our own custom parser, as we only needed to find mp4 fragments (ftyp / moov -> moof / dat) |
how can i know when i get a valid type. i will probably need something else than mux.js for that pourpose? |
Basically this happens when you are trying to read live data, and the data is half there (your in the middle of a atom) and its not complete. When this error happens, its telling you, that your data is not complete. To make it complete. keep the chunk from the previous read , and add it to the next chunk. This should allow you to get your data. The problem that we had is , you dont know how much data was read from the previous chunk. So we opted to create our own parser that would rip out what has been read successfully. This allowed us to know how much has been read, and if we had half an atom we could recover. |
got it! Is that parser open sourced? |
Sorry its not, but hit me up at my email and im always willing to help. |
We have some code that throws an error when we are reading live data from memory using the inspect function:
I believe this occurs because we have have half a moov in the buffer and the other half of the moov won't be till next the next buffer. I'm a novice when it comes to video, let me know what other information may be helpful.
[UPDATE]:
I was able to fix the error by pausing the read , and re-reading the file at the file position again. which allowed me to get the data properly
The text was updated successfully, but these errors were encountered: