MP4Box.js crashes with uncompressed audio.
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 40/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, typescript
- Domain
- audio-video-rtc
Research direction
The over-allocation happens in buildTrakSampleLists, which creates a JavaScript object per audio sample. Start by loading the linked PCM .mp4 through the test page test/filereader.html and tracing how the audio track's sample table is built versus a compressed track; the stsd sample-entry format marks uncompressed audio. Done means that track loads without the tab crashing while clients can still read sample data, ideally with a regression test.
Written by the indexing model from the issue text.
Description
MP4Box attempts to create a javascript per audio sample when it references uncompressed PCM sample data. This is also quite common with Quicktime .mov files.
To reproduce the problem:
- Download this file: https://www.dropbox.com/scl/fi/2n9ewhxeo4r1h813abn59/500x500_30FPS_600s_HEVC_PCM.mp4?rlkey=9vyzx3s80ydsiwvbypgzrk0i6&dl=0
- Using the test page, https://gpac.github.io/mp4box.js/test/filereader.html hit the "Choose File" button, select the downloaded file, and when uploading finishes, select the "Load" button.
- If it doesn't crash the tab, just hit "Load" again and again.
Result: In Chrome: "Aw Snap!" Error code 5.
This is due to the buildTrakSampleLists creating a javascript object for each audio sample! MP4Box.js should detect uncompressed audio formats and allow the client to access those samples, without allocating excessive javascript memory.
- Dominant language
- TypeScript
- Stars
- 2.5k
- Forks
- 390
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 8
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from gpac/mp4box.js
-
mp4box.js — 20-byte `sgpd` box with large `entry_count` causes unbounded loop and heap OOM abortOpen
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 32/100
gpac/mp4box.js#551 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
gpac/mp4box.js#528 · 2 comments ·
Maintainers usually reply within 1 day
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 40/100
Maintainers usually reply within 1 day
Similar issues
-
Add: ESP 2 ROOpenapproved check:passed streams:add
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
ipaas: Configure form shows "Deploy to apply." and "Overrides selected Link" when they don't applyOpen
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
wso2/integration-control-plane#1118 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
UTDNebula/utd-notebook#311 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day