In this video we’ll get the song duration and the total song length for our MP3 songs in our MP3 playlist!

Pygame makes getting the current position of a song (it’s duration) pretty easy, but it doesn’t have any mechanism to find out an mp3 files total length.

So we’ll install something called Mutagen to get our MP3 song lengths, then we’ll output both the song duration and length onto a status bar at the bottom of our mp3 player that updates as the song plays.

John Elder

John is the CEO of Codemy.com where he teaches over 100,000 students how to code! He founded one of the Internet's earliest advertising networks and sold it to a publicly company at the height of the first dot com boom. After that he developed the award-winning Submission-Spider search engine submission software that's been used by over 3 million individuals, businesses, and governments in over 42 countries. He's written several Amazon #1 best selling books on coding, and runs a popular Youtube coding channel.

View all posts

Add comment

Your email address will not be published. Required fields are marked *

John Elder

John is the CEO of Codemy.com where he teaches over 100,000 students how to code! He founded one of the Internet's earliest advertising networks and sold it to a publicly company at the height of...