Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FlvFixer.php script doesn't handle files larger than 2GB #92

Open
monsterru opened this issue Nov 19, 2016 · 0 comments
Open

FlvFixer.php script doesn't handle files larger than 2GB #92

monsterru opened this issue Nov 19, 2016 · 0 comments

Comments

@monsterru
Copy link

monsterru commented Nov 19, 2016

filesize function only works for files <2GB without a workaround as per

http://stackoverflow.com/questions/9346104/php-filesize-on-files-2-gb

http://us.php.net/manual/en/function.filesize.php#102135 gives a complete and correct means for finding the size of a file larger than 2GB in PHP, without relying on OS-specific interfaces.

The gist of it is that you first use filesize to get the "low" bits, then open+seek the file to determine how many multiples of 2GB it contains (the "high" bits).

For those that want a quick fix I have created a copy of script with custom file size function that works ok for large files. Please see attached.

Thanks for your great work!

FlvFixerLarge.zip

Dimitri

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant