Skip to content
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

Failed parsing MP4 file recorded with xiaomi phone #354

Open
jozefchutka opened this issue Sep 14, 2023 · 2 comments
Open

Failed parsing MP4 file recorded with xiaomi phone #354

jozefchutka opened this issue Sep 14, 2023 · 2 comments

Comments

@jozefchutka
Copy link

jozefchutka commented Sep 14, 2023

The following video mp4box_issue354.mp4 was recorded with Xiaomi phone and can be played in every player I have tried (chrome, safari, quicktime player, xiaomi players on device) so I believe its a valid example of a common mp4 file. However, trying to parse the video with mp4box v0.5.2 is problematic. I have also tried more Xioami phones with the same result...

General
Format                                   : MPEG-4
Format profile                           : Base Media / Version 2
Codec ID                                 : mp42 (isom/mp42)
File size                                : 18.6 MiB
Duration                                 : 3 s 314 ms
Overall bit rate                         : 47.1 Mb/s
Frame rate                               : 30.000 FPS
Encoded date                             : 2023-09-15 06:28:50 UTC
Tagged date                              : 2023-09-15 06:28:50 UTC
xyz                                      : removed
com.android.version                      : 11
com.android.manufacturer                 : Xiaomi
com.android.model                        : Mi 9 SE

Observed issues:

  1. when calling mp4.appendBuffer() with chunk size 65536, the returned value (next offset to be requested) is the same as the fileStart. Which ends in infinite loop of "requesting" the very same data over and over.
<script src="mp4box.all.js"></script>
<script>
(async () => {
const size = 65536;

const blob = await (await fetch("mp4box_issue354.mp4")).blob();
const mp4 = MP4Box.createFile();
let offset = 0;

let buffer = await blob.slice(offset, offset + size).arrayBuffer();
buffer.fileStart = offset;
offset = mp4.appendBuffer(buffer); // returns 405294

buffer = await blob.slice(offset, offset + size).arrayBuffer();
buffer.fileStart = offset;
offset = mp4.appendBuffer(buffer); // returns 405294
})()
</script>
  1. when chunk size is increased to 1048576 (1024*1024), BoxParser logs error (in dev console), however there is no way to handle this error in code as its not being returned or thrown out of mp4box:
<script src="mp4box.all.js"></script>
<script>
(async () => {
const size = 1048576;

const blob = await (await fetch("mp4box_issue354.mp4")).blob();
const mp4 = MP4Box.createFile();
let offset = 0;

let buffer = await blob.slice(offset, offset + size).arrayBuffer();
buffer.fileStart = offset;
offset = mp4.appendBuffer(buffer);

buffer = await blob.slice(offset, offset + size).arrayBuffer();
buffer.fileStart = offset;
offset = mp4.appendBuffer(buffer);

buffer = await blob.slice(offset, offset + size).arrayBuffer();
buffer.fileStart = offset;
offset = mp4.appendBuffer(buffer);
// [0:00:00.230] [BoxParser] Box of type '\x00\x00\x00\x00' has a size 1751411826 greater than its container size 224
})()
</script>

This error seems to be related to #309 and #120 , however I believe there are more things to be resolved:

  1. parser fix for .mp4
  2. make sure appendBuffer() throws error or return different value than the provided buffer.fileStart
  3. make BoxParser error handleable (via mp4.onError() api)
@jozefchutka
Copy link
Author

Log from https://gpac.github.io/mp4box.js/test/filereader.html

Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'interest-cohort'.
filereader.html:129     GET https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png 403 (Forbidden)
mp4box.all.js:34 [0:00:06.271] [Downloader] Starting file download
mp4box.all.js:34 [0:00:06.272] [Downloader] Resuming file download
mp4box.all.js:34 [0:00:06.272] [Downloader] Fetching https://github.com/wide-video/cdn/raw/e50df004a5b8fdf6ffb4396f37e28ef3dbadd854/asset/0.0.0/mp4box_issue354.mp4 with range: bytes=0-1048575
mp4box.all.js:34 [0:00:06.584] [Downloader] Received data range: bytes 0-1048575/19496854
mp4box.all.js:34 [0:00:06.587] [ISOFile] Processing buffer (fileStart: 0)
2mp4box.all.js:34 [0:00:06.589] [BoxParser] 'free' box writing not yet implemented, keeping unparsed data in memory for later write
mp4box.all.js:39 [0:00:06.590] [ISOFile] Duplicate Box of type: free, overriding previous occurrence
warn @ mp4box.all.js:39
ISOFile.parse @ mp4box.all.js:6629
ISOFile.appendBuffer @ mp4box.all.js:6677
(anonymous) @ ui-helper.js:188
xhr.onreadystatechange @ downloader.js:117
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
Downloader.resume @ downloader.js:153
Downloader.start @ downloader.js:143
httpload @ ui-helper.js:208
loadHandler @ ui-helper.js:216
mp4box.all.js:34 [0:00:06.590] [BoxParser] Not enough data in stream to parse the entire 'mdat' box
mp4box.all.js:34 [0:00:06.591] [ISOFile] Done processing buffer (fileStart: 0) - next buffer to fetch should have a fileStart position of 18729373
mp4box.all.js:34 [0:00:06.591] [MultiBufferStream] No more buffer in memory
mp4box.all.js:34 [0:00:06.591] [ISOFile] Sample data size in memory: 0
mp4box.all.js:34 [0:00:06.591] [Downloader] Next download scheduled in 10 ms.
mp4box.all.js:34 [0:00:06.604] [Downloader] Fetching https://github.com/wide-video/cdn/raw/e50df004a5b8fdf6ffb4396f37e28ef3dbadd854/asset/0.0.0/mp4box_issue354.mp4 with range: bytes=1048576-2097151
mp4box.all.js:34 [0:00:07.785] [Downloader] Received data range: bytes 1048576-2097151/19496854
mp4box.all.js:34 [0:00:07.787] [ISOFile] Processing buffer (fileStart: 1048576)
mp4box.all.js:34 [0:00:07.788] [ISOFile] Done processing buffer (fileStart: 1048576) - next buffer to fetch should have a fileStart position of 18729373
mp4box.all.js:34 [0:00:07.788] [MultiBufferStream] No more buffer in memory
mp4box.all.js:34 [0:00:07.788] [ISOFile] Sample data size in memory: 0
mp4box.all.js:34 [0:00:07.788] [Downloader] Next download scheduled in 10 ms.
mp4box.all.js:34 [0:00:07.799] [Downloader] Fetching https://github.com/wide-video/cdn/raw/e50df004a5b8fdf6ffb4396f37e28ef3dbadd854/asset/0.0.0/mp4box_issue354.mp4 with range: bytes=2097152-3145727
mp4box.all.js:34 [0:00:08.513] [Downloader] Received data range: bytes 2097152-3145727/19496854
mp4box.all.js:34 [0:00:08.515] [ISOFile] Processing buffer (fileStart: 2097152)
mp4box.all.js:34 [0:00:08.515] [ISOFile] Done processing buffer (fileStart: 2097152) - next buffer to fetch should have a fileStart position of 18729373
mp4box.all.js:34 [0:00:08.515] [MultiBufferStream] No more buffer in memory
mp4box.all.js:34 [0:00:08.516] [ISOFile] Sample data size in memory: 0
mp4box.all.js:34 [0:00:08.516] [Downloader] Next download scheduled in 10 ms.
mp4box.all.js:34 [0:00:08.528] [Downloader] Fetching https://github.com/wide-video/cdn/raw/e50df004a5b8fdf6ffb4396f37e28ef3dbadd854/asset/0.0.0/mp4box_issue354.mp4 with range: bytes=3145728-4194303
mp4box.all.js:34 [0:00:09.077] [Downloader] Received data range: bytes 3145728-4194303/19496854
mp4box.all.js:34 [0:00:09.079] [ISOFile] Processing buffer (fileStart: 3145728)
mp4box.all.js:34 [0:00:09.080] [ISOFile] Done processing buffer (fileStart: 3145728) - next buffer to fetch should have a fileStart position of 18729373
mp4box.all.js:34 [0:00:09.080] [MultiBufferStream] No more buffer in memory
mp4box.all.js:34 [0:00:09.080] [ISOFile] Sample data size in memory: 0
mp4box.all.js:34 [0:00:09.080] [Downloader] Next download scheduled in 10 ms.
mp4box.all.js:34 [0:00:09.091] [Downloader] Fetching https://github.com/wide-video/cdn/raw/e50df004a5b8fdf6ffb4396f37e28ef3dbadd854/asset/0.0.0/mp4box_issue354.mp4 with range: bytes=4194304-5242879
mp4box.all.js:34 [0:00:09.551] [Downloader] Received data range: bytes 4194304-5242879/19496854
mp4box.all.js:34 [0:00:09.553] [ISOFile] Processing buffer (fileStart: 4194304)
mp4box.all.js:34 [0:00:09.553] [ISOFile] Done processing buffer (fileStart: 4194304) - next buffer to fetch should have a fileStart position of 18729373
mp4box.all.js:34 [0:00:09.554] [MultiBufferStream] No more buffer in memory
mp4box.all.js:34 [0:00:09.554] [ISOFile] Sample data size in memory: 0
mp4box.all.js:34 [0:00:09.554] [Downloader] Next download scheduled in 10 ms.
mp4box.all.js:34 [0:00:09.566] [Downloader] Fetching https://github.com/wide-video/cdn/raw/e50df004a5b8fdf6ffb4396f37e28ef3dbadd854/asset/0.0.0/mp4box_issue354.mp4 with range: bytes=5242880-6291455
mp4box.all.js:34 [0:00:10.023] [Downloader] Received data range: bytes 5242880-6291455/19496854
mp4box.all.js:34 [0:00:10.025] [ISOFile] Processing buffer (fileStart: 5242880)
mp4box.all.js:34 [0:00:10.025] [ISOFile] Done processing buffer (fileStart: 5242880) - next buffer to fetch should have a fileStart position of 18729373
mp4box.all.js:34 [0:00:10.026] [MultiBufferStream] No more buffer in memory
mp4box.all.js:34 [0:00:10.026] [ISOFile] Sample data size in memory: 0
mp4box.all.js:34 [0:00:10.026] [Downloader] Next download scheduled in 10 ms.
mp4box.all.js:34 [0:00:10.036] [Downloader] Fetching https://github.com/wide-video/cdn/raw/e50df004a5b8fdf6ffb4396f37e28ef3dbadd854/asset/0.0.0/mp4box_issue354.mp4 with range: bytes=6291456-7340031
mp4box.all.js:34 [0:00:10.591] [Downloader] Received data range: bytes 6291456-7340031/19496854
mp4box.all.js:34 [0:00:10.592] [ISOFile] Processing buffer (fileStart: 6291456)
mp4box.all.js:34 [0:00:10.593] [ISOFile] Done processing buffer (fileStart: 6291456) - next buffer to fetch should have a fileStart position of 18729373
mp4box.all.js:34 [0:00:10.593] [MultiBufferStream] No more buffer in memory
mp4box.all.js:34 [0:00:10.593] [ISOFile] Sample data size in memory: 0
mp4box.all.js:34 [0:00:10.593] [Downloader] Next download scheduled in 10 ms.
mp4box.all.js:34 [0:00:10.605] [Downloader] Fetching https://github.com/wide-video/cdn/raw/e50df004a5b8fdf6ffb4396f37e28ef3dbadd854/asset/0.0.0/mp4box_issue354.mp4 with range: bytes=7340032-8388607
mp4box.all.js:34 [0:00:11.152] [Downloader] Received data range: bytes 7340032-8388607/19496854
mp4box.all.js:34 [0:00:11.153] [ISOFile] Processing buffer (fileStart: 7340032)
mp4box.all.js:34 [0:00:11.154] [ISOFile] Done processing buffer (fileStart: 7340032) - next buffer to fetch should have a fileStart position of 18729373
mp4box.all.js:34 [0:00:11.154] [MultiBufferStream] No more buffer in memory
mp4box.all.js:34 [0:00:11.154] [ISOFile] Sample data size in memory: 0
mp4box.all.js:34 [0:00:11.154] [Downloader] Next download scheduled in 10 ms.
mp4box.all.js:34 [0:00:11.166] [Downloader] Fetching https://github.com/wide-video/cdn/raw/e50df004a5b8fdf6ffb4396f37e28ef3dbadd854/asset/0.0.0/mp4box_issue354.mp4 with range: bytes=8388608-9437183
mp4box.all.js:34 [0:00:11.704] [Downloader] Received data range: bytes 8388608-9437183/19496854
mp4box.all.js:34 [0:00:11.706] [ISOFile] Processing buffer (fileStart: 8388608)
mp4box.all.js:34 [0:00:11.706] [ISOFile] Done processing buffer (fileStart: 8388608) - next buffer to fetch should have a fileStart position of 18729373
mp4box.all.js:34 [0:00:11.707] [MultiBufferStream] No more buffer in memory
mp4box.all.js:34 [0:00:11.707] [ISOFile] Sample data size in memory: 0
mp4box.all.js:34 [0:00:11.707] [Downloader] Next download scheduled in 10 ms.
mp4box.all.js:34 [0:00:11.719] [Downloader] Fetching https://github.com/wide-video/cdn/raw/e50df004a5b8fdf6ffb4396f37e28ef3dbadd854/asset/0.0.0/mp4box_issue354.mp4 with range: bytes=9437184-10485759
mp4box.all.js:34 [0:00:12.340] [Downloader] Received data range: bytes 9437184-10485759/19496854
mp4box.all.js:34 [0:00:12.342] [ISOFile] Processing buffer (fileStart: 9437184)
mp4box.all.js:34 [0:00:12.342] [ISOFile] Done processing buffer (fileStart: 9437184) - next buffer to fetch should have a fileStart position of 18729373
mp4box.all.js:34 [0:00:12.343] [MultiBufferStream] No more buffer in memory
mp4box.all.js:34 [0:00:12.343] [ISOFile] Sample data size in memory: 0
mp4box.all.js:34 [0:00:12.343] [Downloader] Next download scheduled in 10 ms.
mp4box.all.js:34 [0:00:12.354] [Downloader] Fetching https://github.com/wide-video/cdn/raw/e50df004a5b8fdf6ffb4396f37e28ef3dbadd854/asset/0.0.0/mp4box_issue354.mp4 with range: bytes=10485760-11534335
mp4box.all.js:34 [0:00:12.975] [Downloader] Received data range: bytes 10485760-11534335/19496854
mp4box.all.js:34 [0:00:12.977] [ISOFile] Processing buffer (fileStart: 10485760)
mp4box.all.js:34 [0:00:12.977] [ISOFile] Done processing buffer (fileStart: 10485760) - next buffer to fetch should have a fileStart position of 18729373
mp4box.all.js:34 [0:00:12.978] [MultiBufferStream] No more buffer in memory
mp4box.all.js:34 [0:00:12.978] [ISOFile] Sample data size in memory: 0
mp4box.all.js:34 [0:00:12.978] [Downloader] Next download scheduled in 10 ms.
mp4box.all.js:34 [0:00:12.988] [Downloader] Fetching https://github.com/wide-video/cdn/raw/e50df004a5b8fdf6ffb4396f37e28ef3dbadd854/asset/0.0.0/mp4box_issue354.mp4 with range: bytes=11534336-12582911
mp4box.all.js:34 [0:00:13.454] [Downloader] Received data range: bytes 11534336-12582911/19496854
mp4box.all.js:34 [0:00:13.456] [ISOFile] Processing buffer (fileStart: 11534336)
mp4box.all.js:34 [0:00:13.457] [ISOFile] Done processing buffer (fileStart: 11534336) - next buffer to fetch should have a fileStart position of 18729373
mp4box.all.js:34 [0:00:13.457] [MultiBufferStream] No more buffer in memory
mp4box.all.js:34 [0:00:13.457] [ISOFile] Sample data size in memory: 0
mp4box.all.js:34 [0:00:13.457] [Downloader] Next download scheduled in 10 ms.
mp4box.all.js:34 [0:00:13.469] [Downloader] Fetching https://github.com/wide-video/cdn/raw/e50df004a5b8fdf6ffb4396f37e28ef3dbadd854/asset/0.0.0/mp4box_issue354.mp4 with range: bytes=12582912-13631487
mp4box.all.js:34 [0:00:14.056] [Downloader] Received data range: bytes 12582912-13631487/19496854
mp4box.all.js:34 [0:00:14.057] [ISOFile] Processing buffer (fileStart: 12582912)
mp4box.all.js:34 [0:00:14.058] [ISOFile] Done processing buffer (fileStart: 12582912) - next buffer to fetch should have a fileStart position of 18729373
mp4box.all.js:34 [0:00:14.058] [MultiBufferStream] No more buffer in memory
mp4box.all.js:34 [0:00:14.058] [ISOFile] Sample data size in memory: 0
mp4box.all.js:34 [0:00:14.058] [Downloader] Next download scheduled in 10 ms.
mp4box.all.js:34 [0:00:14.069] [Downloader] Fetching https://github.com/wide-video/cdn/raw/e50df004a5b8fdf6ffb4396f37e28ef3dbadd854/asset/0.0.0/mp4box_issue354.mp4 with range: bytes=13631488-14680063
mp4box.all.js:34 [0:00:14.505] [Downloader] Received data range: bytes 13631488-14680063/19496854
mp4box.all.js:34 [0:00:14.507] [ISOFile] Processing buffer (fileStart: 13631488)
mp4box.all.js:34 [0:00:14.507] [ISOFile] Done processing buffer (fileStart: 13631488) - next buffer to fetch should have a fileStart position of 18729373
mp4box.all.js:34 [0:00:14.507] [MultiBufferStream] No more buffer in memory
mp4box.all.js:34 [0:00:14.507] [ISOFile] Sample data size in memory: 0
mp4box.all.js:34 [0:00:14.507] [Downloader] Next download scheduled in 10 ms.
mp4box.all.js:34 [0:00:14.520] [Downloader] Fetching https://github.com/wide-video/cdn/raw/e50df004a5b8fdf6ffb4396f37e28ef3dbadd854/asset/0.0.0/mp4box_issue354.mp4 with range: bytes=14680064-15728639
mp4box.all.js:34 [0:00:14.970] [Downloader] Received data range: bytes 14680064-15728639/19496854
mp4box.all.js:34 [0:00:14.972] [ISOFile] Processing buffer (fileStart: 14680064)
mp4box.all.js:34 [0:00:14.973] [ISOFile] Done processing buffer (fileStart: 14680064) - next buffer to fetch should have a fileStart position of 18729373
mp4box.all.js:34 [0:00:14.973] [MultiBufferStream] No more buffer in memory
mp4box.all.js:34 [0:00:14.973] [ISOFile] Sample data size in memory: 0
mp4box.all.js:34 [0:00:14.973] [Downloader] Next download scheduled in 10 ms.
mp4box.all.js:34 [0:00:14.985] [Downloader] Fetching https://github.com/wide-video/cdn/raw/e50df004a5b8fdf6ffb4396f37e28ef3dbadd854/asset/0.0.0/mp4box_issue354.mp4 with range: bytes=15728640-16777215
mp4box.all.js:34 [0:00:15.456] [Downloader] Received data range: bytes 15728640-16777215/19496854
mp4box.all.js:34 [0:00:15.458] [ISOFile] Processing buffer (fileStart: 15728640)
mp4box.all.js:34 [0:00:15.459] [ISOFile] Done processing buffer (fileStart: 15728640) - next buffer to fetch should have a fileStart position of 18729373
mp4box.all.js:34 [0:00:15.459] [MultiBufferStream] No more buffer in memory
mp4box.all.js:34 [0:00:15.460] [ISOFile] Sample data size in memory: 0
mp4box.all.js:34 [0:00:15.460] [Downloader] Next download scheduled in 10 ms.
mp4box.all.js:34 [0:00:15.471] [Downloader] Fetching https://github.com/wide-video/cdn/raw/e50df004a5b8fdf6ffb4396f37e28ef3dbadd854/asset/0.0.0/mp4box_issue354.mp4 with range: bytes=16777216-17825791
mp4box.all.js:34 [0:00:15.929] [Downloader] Received data range: bytes 16777216-17825791/19496854
mp4box.all.js:34 [0:00:15.931] [ISOFile] Processing buffer (fileStart: 16777216)
mp4box.all.js:34 [0:00:15.931] [ISOFile] Done processing buffer (fileStart: 16777216) - next buffer to fetch should have a fileStart position of 18729373
mp4box.all.js:34 [0:00:15.931] [MultiBufferStream] No more buffer in memory
mp4box.all.js:34 [0:00:15.931] [ISOFile] Sample data size in memory: 0
mp4box.all.js:34 [0:00:15.932] [Downloader] Next download scheduled in 10 ms.
mp4box.all.js:34 [0:00:15.943] [Downloader] Fetching https://github.com/wide-video/cdn/raw/e50df004a5b8fdf6ffb4396f37e28ef3dbadd854/asset/0.0.0/mp4box_issue354.mp4 with range: bytes=17825792-18874367
mp4box.all.js:34 [0:00:16.373] [Downloader] Received data range: bytes 17825792-18874367/19496854
mp4box.all.js:34 [0:00:16.375] [ISOFile] Processing buffer (fileStart: 17825792)
mp4box.all.js:34 [0:00:16.376] [BoxParser] Not enough data in stream to parse the entire 'moov' box
mp4box.all.js:34 [0:00:16.376] [ISOFile] Done processing buffer (fileStart: 17825792) - next buffer to fetch should have a fileStart position of 18874368
mp4box.all.js:34 [0:00:16.376] [MultiBufferStream] 1 stored buffer(s) (903581/1048576 bytes), continuous ranges: [17825792-18874367]
mp4box.all.js:34 [0:00:16.376] [ISOFile] Sample data size in memory: 0
mp4box.all.js:34 [0:00:16.376] [Downloader] Next download scheduled in 10 ms.
mp4box.all.js:34 [0:00:16.387] [Downloader] Fetching https://github.com/wide-video/cdn/raw/e50df004a5b8fdf6ffb4396f37e28ef3dbadd854/asset/0.0.0/mp4box_issue354.mp4 with range: bytes=18874368-19922943
mp4box.all.js:34 [0:00:16.407] [Downloader] Received data range: bytes 18874368-19496853/19496854
mp4box.all.js:34 [0:00:16.407] [ISOFile] Processing buffer (fileStart: 18874368)
mp4box.all.js:34 [0:00:16.408] [BoxParser] Not enough data in stream to parse the entire 'moov' box
mp4box.all.js:39 [0:00:16.410] [BoxParser] Unknown box type: '©xyz'
warn @ mp4box.all.js:39
BoxParser.parseOneBox @ mp4box.all.js:2498
BoxParser.ContainerBox.parse @ mp4box.all.js:2576
BoxParser.parseOneBox @ mp4box.all.js:2520
BoxParser.ContainerBox.parse @ mp4box.all.js:2576
BoxParser.parseOneBox @ mp4box.all.js:2520
ISOFile.parse @ mp4box.all.js:6594
ISOFile.appendBuffer @ mp4box.all.js:6677
(anonymous) @ ui-helper.js:188
xhr.onreadystatechange @ downloader.js:117
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
mp4box.all.js:34 [0:00:16.410] [BoxParser] '©xyz' box writing not yet implemented, keeping unparsed data in memory for later write
mp4box.all.js:39 [0:00:16.410] [BoxParser] Unknown box type: 'mcvr'
warn @ mp4box.all.js:39
BoxParser.parseOneBox @ mp4box.all.js:2498
BoxParser.ContainerBox.parse @ mp4box.all.js:2576
BoxParser.parseOneBox @ mp4box.all.js:2520
BoxParser.ContainerBox.parse @ mp4box.all.js:2576
BoxParser.parseOneBox @ mp4box.all.js:2520
ISOFile.parse @ mp4box.all.js:6594
ISOFile.appendBuffer @ mp4box.all.js:6677
(anonymous) @ ui-helper.js:188
xhr.onreadystatechange @ downloader.js:117
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
mp4box.all.js:34 [0:00:16.410] [BoxParser] 'mcvr' box writing not yet implemented, keeping unparsed data in memory for later write
mp4box.all.js:34 [0:00:16.411] [BoxParser] 'meta' box writing not yet implemented, keeping unparsed data in memory for later write
mp4box.all.js:44 [0:00:16.411] [BoxParser] Box of type '����' has a size 1751411826 greater than its container size 224
error @ mp4box.all.js:44
BoxParser.parseOneBox @ mp4box.all.js:2483
BoxParser.ContainerBox.parse @ mp4box.all.js:2576
(anonymous) @ mp4box.all.js:3675
BoxParser.<computed>.parse @ mp4box.all.js:2270
BoxParser.parseOneBox @ mp4box.all.js:2520
BoxParser.ContainerBox.parse @ mp4box.all.js:2576
BoxParser.parseOneBox @ mp4box.all.js:2520
ISOFile.parse @ mp4box.all.js:6594
ISOFile.appendBuffer @ mp4box.all.js:6677
(anonymous) @ ui-helper.js:188
xhr.onreadystatechange @ downloader.js:117
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
mp4box.all.js:39 [0:00:16.411] [BoxParser] Parsing of box 'meta' did not read the entire indicated box data size (missing 216 bytes), seeking forward
warn @ mp4box.all.js:39
BoxParser.parseOneBox @ mp4box.all.js:2523
BoxParser.ContainerBox.parse @ mp4box.all.js:2576
BoxParser.parseOneBox @ mp4box.all.js:2520
ISOFile.parse @ mp4box.all.js:6594
ISOFile.appendBuffer @ mp4box.all.js:6677
(anonymous) @ ui-helper.js:188
xhr.onreadystatechange @ downloader.js:117
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
XMLHttpRequest.send (async)
Downloader.getFile @ downloader.js:136
setTimeout (async)
xhr.onreadystatechange @ downloader.js:127
mp4box.all.js:34 [0:00:16.413] [BoxParser] 'pasp' box writing not yet implemented, keeping unparsed data in memory for later write
mp4box.all.js:34 [0:00:16.415] [BoxParser] 'esds' box writing not yet implemented, keeping unparsed data in memory for later write
mp4box.all.js:34 [0:00:16.417] [ISOFile] Done processing buffer (fileStart: 18874368) - next buffer to fetch should have a fileStart position of 19496854
mp4box.all.js:34 [0:00:16.417] [MultiBufferStream] No more buffer in memory
mp4box.all.js:34 [0:00:16.417] [ISOFile] Sample data size in memory: 0
ui-helper.js:193 Done reading file (19496854 bytes) in 10147 ms
mp4box.all.js:34 [0:00:16.417] [ISOFile] Flushing remaining samples
mp4box.all.js:34 [0:00:16.417] [MultiBufferStream] No more buffer in memory

@jozefchutka
Copy link
Author

jozefchutka commented Sep 25, 2023

The workaround for my file is as following:

  1. use const size = 524288; or greater
  2. once onReady and onSamples is invoked, offset for appendBuffer() to be calculated from the most recent received sample offset = samples[0].offset + samples[0].size

samples can be red now, however BoxParser would still throw the reported error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant