node-id3 icon indicating copy to clipboard operation
node-id3 copied to clipboard

Support large files

Open kentcdodds opened this issue 2 years ago • 2 comments

I have a very large mp3 file (over 4 GB) and I'm getting this error:

RangeError [ERR_FS_FILE_TOO_LARGE]: File size (4280247303) is greater than 2 GiB
    at new NodeError (node:internal/errors:393:5)
    at tryCreateBuffer (node:fs:434:13)
    at Object.readFileSync (node:fs:479:14)
    at t.readFileSync (node:electron/js2c/asar_bundle:2:9165)
    at writeSync (/Users/kentcdodds/.kenv/node_modules/node-id3/index.js:68:29)
    at Object.write (/Users/kentcdodds/.kenv/node_modules/node-id3/index.js:93:12)

Is it possible to support writing the headers without reading the entire file?

kentcdodds avatar Apr 03 '23 18:04 kentcdodds

As you found out large files are currently not supported. Out of interested what kind of data are you trying to process that it is that large? Usually ID3 is more oriented for music files and music files are not that large. We will try to add support for large files for read/write functions (probably not update), but that requires a bit of work if want to do it cleanly. We also are currently cleaning up the code, which will help supporting large files, but we need to finish some refactor before. So we can't really give any ETA for now.

pbricout avatar Apr 04 '23 18:04 pbricout

My use case is audiobooks (some are 38+ hours long). This one in particular has some music and other sound effects in the background so it's nice to have a higher bitrate.

kentcdodds avatar Apr 04 '23 19:04 kentcdodds