Skip to content
Advertisement

getId3 to get video duration in seconds

How do i get getId3’s playtime_string duration in seconds? Is there away to get directly in seconds? Without using other php functions to look at the string and pull it out of the value?

JavaScript

Advertisement

Answer

in this situation use $file['playtime_seconds'] it will give you the seconds directly with a decimal point. Which you can format using php’s round() or floor() functions depending on how you want it to display.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement