Friday, May 23, 2014

Script to convert any file format to mp3 in Linux

Here is my script that will convert any file format to mp3

like

mp4 to mp3

avi to mp3

3gp to mp3

webm to mp3

any thing to mp3

open your terminal type :

sudo apt-get install ffmpeg libavcodec-extra-53

now type : gedit convert 

and past the following script   :

#!/bin/bash
# This script will convert files to mp3 format
#Writer Anuj Borah (anujborah3@gmail.com)
echo "please enter the directory of the targeted file "
read d
cd $d
echo "now enter the name of file you want to convert to mp3 "
read d1
ffmpeg -i $d1 anuj.mp3
echo "OK we are done!  your file is converted to $d/anuj.mp3 "
exit 0




type : sudo chmod +x convert


then type:   ./convert



see simple output :


No comments:

Post a Comment