Use GetID3. It has features that allow you to look for the length of the video. I’m currently at work so I can’t give any demo samples. Unless someone can provide something before I do.
Update: I found it took a noticeable time to get the play time for just 5 vids, delaying the page load, so I decided to implement it using AJAX. Works a treat.