JamesHeinrich / getID3

http://www.getid3.org/
Other
1.13k stars 245 forks source link

2GB Limit on 32bit Linux of a Synology NAS #408

Closed UweW60 closed 1 year ago

UweW60 commented 1 year ago

For me as German it's a problem to understand and write everything in English, so please excuse my bad English :( but it's not my main problem. My main problem is the following: I want to manage and watch my videos as mp4 in my home network with TV, Laptop, PC and a Synology NAS DS215j. I'm very happy that i made the first step. Now i want to setup an intranet with an apache webserver, MySQL and PHP to manage a "home media library". Webserver, PHP, MySQL is running and now i want to get the mp4 Info (solution, duration, ...) of a file and store it in the DB. Unfortunately the NAS runs 32bit Linux and most of the mp4 files are larger than 2GB. With operating system Linux 32bit (DSM 7.0.1-42218 Update 5), PHP v7.4.30 and getID3() v1.9.22-202207161647 i get a warning (see screenshot) and not the result i want to have :( On the Strato server in the data center it runs well (64bit Ubuntu). Do i solve the problem when i use getID3() v2.xx? Upgrading the operating system to 64bit seems not to be possible and i won't spend a lot of money for a new NAS. I would appreciate if someone has a tip :) best regards

Uwe

Screenshot

Screenshot2

JamesHeinrich commented 1 year ago

2GB file size limit is a limitation of PHP 32-bit. The only solution is to use 64-bit PHP, but if your Linux is 32-bit then that is not an option.

Many things will still work fine on 32-bit PHP, but it cannot read data past 2GB, so data at the end of large files (e.g. ID3v1) will not be read. Data at the beginning of files (e.g. ID3v2, and basic metadata for most file formats) should be read fine.

It will be .mp3 files most affected by not being able to read to the end of the file, but it's very rare to have a MP3 file larger than 2GB, so I assume most of your large files are video files. They will probably work mostly correctly, but it's possible that playtime or bitrate could be missing or incorrect.

getID3 v2.x won't make any difference, the only real fix is 64-bit PHP.

UweW60 commented 1 year ago

Thanks for your quick answer, James :) Yes, it should become a movie library with mp4 files (mostly > 2GB). Do you know if it is possible to prepare the mp4 files in that way, that i convert the ID3v1 tags into ID3v2 on another 64bit system (e.g. win10,win11) so that the basic metadata is at the beginning of the file? Best regards Uwe

JamesHeinrich commented 1 year ago

As I said, only .mp3 files are likely to have important data at the end of the file, and they're unlikely to be anywhere close to 2GB. Most video files should have all the needed data near the beginning of the file, and as long as getID3 can determine the correct filesize then the data is probably correct.

UweW60 commented 1 year ago

ok, thanks