What is the simplest way to determine the length (in seconds) of a given mp3 file, without using outside libraries? (python source highly appreciated)
For google followers' sake, here are a few more external libs:
mpg321 -t
ffmpeg -i
midentify (mplayer basically) see Using mplayer to determine length of audio/video file
mencoder (pass it invalid params, it will spit out an error message but also give you info on the file in question, ex $ mencoder inputfile.mp3 -o fake)
mediainfo program http://mediainfo.sourceforge.net/en
exiftool
the linux "file" command
mp3info
sox
refs: https://superuser.com/questions/36871/linux-command-line-utility-to-determine-mp3-bitrate
http://www.ruby-forum.com/topic/139468
mp3 length in milliseconds
(making this a wiki for others to add to).
and libs: .net: naudio, java: jlayer, c: libmad
Cheers!