getID3 icon indicating copy to clipboard operation
getID3 copied to clipboard

special char in filename gives filesize error in big file

Open tissatussa opened this issue 6 years ago • 2 comments

I encounter an error when a file is big AND ALSO its filename has some special character : its filesize can not be determined by getID3. I conclude this after precise testing with several (video) files and filenames.

Eg. a video file named "Côte d’Ivoire.mp4" gives the following error : Notice: Undefined index: filesize in /var/www/projects/chess/show.php on line [..]

So, when the filename is "Côte d’Ivoire.mp4" and its filesize is small (eg. 20 Mb) the filesize CAN be determined, there's no error. When the filename is normal, like "Cote d'Ivoire.mp4", and its filesize is big (i tested with more than 3 Gb) the filesize ALSO CAN be determined, there's no error.


Array ( [GETID3_VERSION] => 1.9.18-201907240906 [filepath] => /mnt/data/vids [filename] => 2019 Côte d’Ivoire Rapid & Blitz - Rapid Rounds 4-6.mp4 [filenamepath] => /mnt/data/vids/2019 Côte d’Ivoire Rapid & Blitz - Rapid Rounds 4-6.mp4 [encoding] => UTF-8 [error] => Array ( [0] => Unable to determine actual filesize. File is most likely larger than 2GB and is not supported by PHP. ) )


Array ( [GETID3_VERSION] => 1.9.18-201907240906 [filesize] => 3176759057 [filepath] => /mnt/data/vids [filename] => 2019 Cote d'Ivoire Rapid & Blitz - Rapid Rounds 4-6.mp4 [filenamepath] => /mnt/data/vids/2019 Cote d'Ivoire Rapid & Blitz - Rapid Rounds 4-6.mp4 [avdataoffset] => 0 [avdataend] => -1118208239 [fileformat] => quicktime [warning] => Array ( [0] => File is larger than 2GB (filesystem reports it as 2.959GB) and is not properly supported by PHP. [1] => Unable to check for ID3v1 because file is larger than 2GB [2] => Unable to check for APEtags because file is larger than 2GB [3] => Unable to check for Lyrics3 because file is larger than 2GB ) [encoding] => UTF-8 [mime_type] => video/quicktime [quicktime] => Array ( [hinting] => [controller] => standard [encoding] => UTF-8 ) )


I'm an experienced (web)programmer. I use the latest getID3 release v1.9.18-201907240906.

tissatussa avatar Oct 10 '19 12:10 tissatussa

Solution: upgrade your PHP installation to 64-bit.

Assuming you're unable to do that, the fallback filesize-determining function is likely failing due to UTF-8 encoding issues. Perhaps you can do some debugging on the system call line and figure out how it's being called incorrectly: https://github.com/JamesHeinrich/getID3/blob/master/getid3/getid3.lib.php#L1736

JamesHeinrich avatar Oct 27 '19 08:10 JamesHeinrich

No response from original poster for 5 months, marking issue as closed.

JamesHeinrich avatar Apr 03 '20 21:04 JamesHeinrich