You can use this library to fetch idv3 information from music files getID3()
Something like this:
<?
require_once('../getid3/getid3.php');
// Initialize getID3 engine
$getID3 = new getID3;
// Analyze file and store returned data in $ThisFileInfo
$ThisFileInfo = $getID3->analyze($filename);
/*
Optional: copies data from all subarrays of [tags] into [comments] so
metadata is all available in one location for all tag formats
metainformation is always available under [tags] even if this is not called
*/
getid3_lib::CopyTagsToComments($ThisFileInfo);
echo $ThisFileInfo['comments_html']['artist'][0]; // artist from any/all available tag formats
echo $ThisFileInfo['tags']['id3v2']['title'][0]; // title from ID3v2
echo $ThisFileInfo['audio']['bitrate']; // audio bitrate
echo $ThisFileInfo['playtime_string']; // playtime in minutes:seconds, formatted string
/*
if you want to see ALL the output, uncomment this line:
*/
echo '<pre>'.htmlentities(print_r($ThisFileInfo, true)).'</pre>';
?>
If you want to resample/recode your music files, you can do that with LAME.
Fixed bit rate 128kbps encoding:
lame sample.wav sample.mp3
Fixed bit rate jstereo 128kbps encoding, high quality (recommended):
lame -h sample.wav sample.mp3
Average bit rate 112kbps encoding:
lame --abr 112 sample.wav sample.mp3
Fast encode, low quality (no psycho-acoustics):
lame -f sample.wav sample.mp3
Variable bitrate (use -V n to adjust quality/filesize):
lame -h -V 6 sample.wav sample.mp3