I don't think anything beats Exiftool for command-line metadata power and versatility. Works in Linux, Windows**, Mac, etc (anything that can run Perl). Works for all kinds of image (very extensive output for digital camera images), video, audio, and other media files.
I was able to install it using the yum repositories but you can read and download it from the link below.
I would work on a script, but would rather finish cooking my wild rice vegetable soup.
As you can see from the output below, it gives you the duration if this is solely what you're basing your script on for deletion.
http://www.sno.phy.queensu.ca/~phil/exiftool/Here is sample output for OGG, MP3, and MPC
Code:
exiftool "Stone Sour-Stone Sour-Bother.mp3"
ExifTool Version Number : 6.93
File Name : Stone Sour-Stone Sour-Bother.mp3
Directory : .
File Size : 6 MB
File Modification Date/Time : 2006:05:15 19:09:52
File Type : MP3
MIME Type : audio/mpeg
MPEG Audio Version : 1
Audio Layer : 3
Audio Bitrate : 128000
Sample Rate : 44100
Channel Mode : Joint Stereo
MS Stereo : On
Intensity Stereo : Off
Copyright Flag : False
Original Media : True
Emphasis : None
Album : Stone Sour
Artist : Stone Sour
Comment : *** / Foobar2000: MPC->MP3
Genre : Rock
Title : Bother
Track : 08
Recording Time : 2002
User Defined Text : (sub-genre) Alt Metal
Year : 2002
Duration : 0:06:03.67 (approx)