protonemedia / laravel-ffmpeg

This package provides an integration with FFmpeg for Laravel. Laravel's Filesystem handles the storage of the files.
https://protone.media/en/blog/how-to-use-ffmpeg-in-your-laravel-projects
MIT License
1.63k stars 194 forks source link

Use seconds as float format #429

Closed francoism90 closed 1 year ago

francoism90 commented 2 years ago

I'm probing media files using getDurationInSeconds(), however it doesn't return the correct timestamp.

Dashjs shows the correct timestamp 00:00:12, this package 00:00:11.

If a rounded number is really needed, I would use ceil instead of round, as this should correct the seconds number.

Thanks!

pascalbaljet commented 1 year ago

Hi, thanks for your PR! This could be a breaking change so I'm not going to change this. If need more precision, you can use the getDurationInMiliseconds method.