gpac / mp4box.js

JavaScript version of GPAC's MP4Box tool
https://gpac.github.io/mp4box.js/
BSD 3-Clause "New" or "Revised" License
1.95k stars 330 forks source link

Expose method to return seekInfo metadata (whilst not seeking) #364

Open Secretmapper opened 1 year ago

Secretmapper commented 1 year ago

Usecase: Imagine if a dev wanted to download and play the first 10 seconds of an mp4. They can parse the moov box, seek(0) and seek(10) to get the byte range, and append the buffers from that info.

However, there's a couple of problems with this:

Proposed Solution: Have a method, say offsetForSecond, which would return the byteOffset for a specific timestamp in the file.