get the duration of media files in seconds