Quantcast
Viewing all articles
Browse latest Browse all 3

Answer by user1786283 for python ringtone maker : how to split files

If you want to use a higher-level language like c++ to implement a custom MP3 decoder, take a look a this question, time length of an mp3 file.

Otherwise, there are other libraries that do just what you need:

PyMad -

import madmf = mad.MadFile("foo.mp3")track_length_in_milliseconds = mf.total_time()

audioread -

audio = audioread.audio_open('/path/to/mp3')print f.channels, f.samplerate, f.duration

Mutagen -

from mutagen.mp3 import MP3audio = MP3("example.mp3")print audio.info.length

There are many more, but for now you can start with these.


Viewing all articles
Browse latest Browse all 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>