LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-24-2005, 11:11 AM   #1
lumpfish
Member
 
Registered: Sep 2002
Location: Halifax Nova Scotia, Canada
Distribution: Arch Linux 0.7
Posts: 38

Rep: Reputation: 15
Reduce MP3 bitrate


I have a bunch of mp3's that I would reduce the bitrate of. Wondering of a tool to use to accomplish this? I would like to retain them as mp3's just bring down the size from 512 to 128.
 
Old 06-25-2005, 05:24 AM   #2
mmmm
Member
 
Registered: Oct 2004
Location: Poland
Distribution: Slack 10.1, Mandrake 10.1
Posts: 118

Rep: Reputation: 15
You need lame - mp3 coder. You can download it on http://lame.sourceforge.net/ . Then to every file you need :
1. Uncompress to wave - lame --decode <file>
2. Compress to mp3 with bitrate 128 - lame -b 128 <wav file>
Then put this in for (or foreach) in bash script
 
Old 06-25-2005, 06:02 AM   #3
mmmm
Member
 
Registered: Oct 2004
Location: Poland
Distribution: Slack 10.1, Mandrake 10.1
Posts: 118

Rep: Reputation: 15
Ok : Put all mp3 files in one directory. Cd to this directory . Put in bash script :

#!/bin/bash

for file in `ls`
do
file=`echo $file | sed s/\ /_/g`
echo $file
lame --decode $file
lame -b 128 $file.wav
rm $file
rm $file.wav
mv $file.wav.mp3 $file
done

It will recode EVERY file in this directory, So here should be only mp3's. WARNING : It doesn't work when names of files contains " " (space) !!
 
Old 10-26-2009, 04:49 AM   #4
shaakunthala
LQ Newbie
 
Registered: Dec 2008
Location: Ambalangoda, Sri Lanka
Distribution: Fedora, Ubuntu
Posts: 11

Rep: Reputation: 0
Lightbulb Better Sccript

The following script would do a favour:

http://www.4shared.com/file/14371378...c9/mp3enc.html
 
Old 10-26-2009, 04:59 AM   #5
shaakunthala
LQ Newbie
 
Registered: Dec 2008
Location: Ambalangoda, Sri Lanka
Distribution: Fedora, Ubuntu
Posts: 11

Rep: Reputation: 0
Thumbs up

Quote:
Originally Posted by shaakunthala View Post
The following script would do a favour:

http://www.4shared.com/file/14371378...c9/mp3enc.html
Sorry, I forgot to put the usage,

$ ./mp3enc.sh <directory where your mp3 files are> <bitrate in kbps>

You'll get the processed output inside <directory where your mp3 files are>/output
This script does not recurse into subdirectories.
 
Old 10-26-2009, 05:17 AM   #6
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
I recommend the "-V2" option, but some old or crappy mp3 players don't support variable bitrate.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I find out the bitrate of an mp3? redhatman Linux - Newbie 4 11-22-2013 05:30 PM
Enconding MP3 to lower bitrate Gonto Linux - Software 2 07-20-2005 04:50 AM
Changing bitrate on XAudioCreator mark.johnson Linux - Software 5 03-29-2005 04:44 PM
abcde Ogg Bitrate voodoothunder Linux - Software 0 07-11-2003 10:18 AM
Covert Bitrate of MP3's DiZASTiX Linux - Software 5 05-19-2003 06:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration