Calculating total playback time

  • Nobody/Anonymous


    I wonder how to obtain the total playback time of a mp3 file.

    Reading all the mp3 headers within the frames and adding the duration? Therefore you have to read the whole mp3 file.

    Calculating the payback time by using mp3 filesize, bitrate per frame.

    filesize/Bitrate*26ms per frame = playback time

    Ciao, Michael

    • Nobody/Anonymous

      Refer to the file madtime.c in the source code of madplay. Your systems should support mmap in order to use that algorithm.



Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks