convert the wma files through php script in linux

When we use the mobile download we always get the wma files as song file. If you want to convert wma files to mp3 file. For that I written the simple PHP sciprt for converting the wma files through php scirpt.

convert the wma files through php script in linux

Use the following scirpt.

<?php
// Script made for convertion of  .wma to .M3 Converter (media conversion) in Linux
//You need the  mplayer and lame installted in your linux OS

set_time_limit(0);
ReadDirs('/var/www/html/songs/wmamp3/');
function ReadDirs($dir){
if ($handle = opendir($dir)) {
while (false !== ($file = readdir($handle))) {
if ($file != "." &amp;&amp; $file != ".." &amp;&amp; $file != "Thumb.db") {
$info = pathinfo($file);
if($info['extension']=='wma') {
$mp3_file = str_replace('.wma','',$file);
$cmd = "mplayer -vo null -vc dummy -af resample=44100 -ao pcm:waveheader '".$dir.$file."';lame -m s -V 3 audiodump.wav;mv audiodump.wav.mp3 '".$dir."mp3/".$mp3_file.".mp3';rm -f audiodump.wav";
system($cmd);
}

}
}
closedir($handle);
}
}
?>

Above script will take wma files from folder and convert all files to mp3 files.

convert the wma files through php script in linux
convert the wma files through php script in linux

 

Install mp3 player and vlc player on Fedora

Play mp3 songs in fedora linux
I am using the Fedora 11 and on that I am going to install the Fluendo MP3 plugin

Install mp3 player and vlc player on Fedora

If you want to install the Fluendo MP3 plugin on Fedora 8, 9, 10 or 11
Use same steps;

Download fluendo-codecs-mp3-7-1.i386.rpm file from here:

fluendo-codecs-mp3

Use following command:
[root@localhost siwan]# rpm -i fluendo-codecs-mp3-7-1.i386.rpm

How to install the Vlc player on Fedora 8, 9, 10 or 11
root@localhost siwan]#  su
[root@localhost siwan]#  rpm -ivh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
[root@localhost siwan]# yum install vlc
[root@localhost siwan]# yum install mozilla-vlc (optionnal)