Fix video duration calculation