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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-28-2004, 02:12 PM
|
#1
|
Member
Registered: Oct 2003
Location: WA--USA
Distribution: Red Hat 9, Suse 10.2
Posts: 144
Rep:
|
What is the minimum MP3 encoding rate?
I need to maintain a a backlog of a radio station's audio for a period of 90 days. Previously, I have been using RealProducer on a Windows machine. I got tired of the Windows machine crashing so I have upgraded the system to Red Hat 9 and am using SOX and LAME to encoder audio in real time to MP3. The encoding is working but I want to be able to use the highest compression rate available since quality is not that important.
I have tried encoding at a bit rate of 8k but when I play back the file, it plays very quickly. I have tried using several MP3 players but they all play the files too quickly. Here is the command I am using to do the encoding:
sox -r 8000 -t ossdsp -w -s /dev/dsp -t raw -c 2 - | lame -s 44.1 -x -b 8 -m m - sound.mp3
What do I need to do to record the smallest possible MP3 file?
Thank you!
|
|
|
01-28-2004, 03:10 PM
|
#2
|
Member
Registered: Dec 2003
Distribution: Gentoo
Posts: 66
Rep:
|
I'm not sure here but could it be that you are setting the audio samplerate to 8000 (instead of eg 44100 for cdquality) instead of the lame compression mp3 bitrate?
If you play a file with a samplerate of 8000Hz at the speed of a 44100Hz one it will play (more than 5 times) too fast.
Looking at the commandline you're using you are converting the input to a 8000Hz stream and recording it to a 44100Hz 8000bit/s mp3.
Last edited by delta9; 01-28-2004 at 03:13 PM.
|
|
|
01-28-2004, 03:30 PM
|
#3
|
Member
Registered: Oct 2003
Location: WA--USA
Distribution: Red Hat 9, Suse 10.2
Posts: 144
Original Poster
Rep:
|
I switched the command line to this:
sox -r 8000 -t ossdsp -w -s /dev/dsp -t raw -c 1 - | lame -s 8 -x -b 8 -m m - music.mp3&
Now the file plays at the correct rate but is completely unintelligible. I also get this error from mpg123:
mpg123: Can't rewind stream by 35 bits!
Any other ideas?
|
|
|
01-28-2004, 05:11 PM
|
#4
|
Member
Registered: Dec 2003
Distribution: Gentoo
Posts: 66
Rep:
|
Try a higher samplerate (11025, 22050) and/or bitrate (16kbit/s, 32kbit/s), and experiment with them, I think you can't go infinitely low with them and still have have something that sounds good.
|
|
|
01-28-2004, 05:22 PM
|
#5
|
Member
Registered: Oct 2003
Location: WA--USA
Distribution: Red Hat 9, Suse 10.2
Posts: 144
Original Poster
Rep:
|
I did a lot of experimenting and this seems to work OK:
sox -r 44100 -t ossdsp -w -s /dev/dsp -t raw -c 1 - | lame -s 44.1 -x -b 8 -m m --lowpass 5 -q 0 - music.mp3&
I really can't encode at a bit rate greater than 8 k because I would run out of space. With the settings above, the size of file is comparable to a RealAudio file at 8k but the RealAudio files sounds better IMHO. Do you have any experience with OGG files? I wonder if they would be better for audio archival purposes.
|
|
|
All times are GMT -5. The time now is 03:19 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|