Convert time (hr:min:secs) into seconds
I wrote this snippet to convert ffmpeg’s information output time into seconds, i can then determine the 25, 50 and 75 percentages to create 3 different thumbnails of a movie (using ffmpeg also). Heres the snippet: function time2seconds($time=’00:00:00′){ list($hr,$m,$s) = explode(’:', $time); return ( (int)$hr*3600 ) + ( (int)$m*60 ) + (int)$s; } Hope you [...]
