Linux - SoftwareThis 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.
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.
Believe it or not, I compress some of my audio files to below 4Khz, I like to compress things to save as much space as possible because sometimes it's just a couple sinewaves at low frequencies. It won't play files sampled to 3999Hz or below, but will play anything above 4Khz. So for some of these I use the default xplayer that came with my linux mint installation, but that only plays down to 2Khz. I know this is extremely niche, but is there any way to set a lower samplerate?
I think aplay plays down to 2khz. You could try lower, but I think it's wisdom to avoid low frequencies in speakers. What you do with aplay I imagine can be done with arecord.
EDIT: Before you ask, I wouldn't like to listen to any of those sound files .
Last edited by business_kid; 08-24-2020 at 09:45 AM.
I prefer to use "samples/second" for sample rate and "kHz" for the audio signal, to avoid any confusion.
4000 samples/second can give sounds up to about 2000 Hz (with some distorsion, of course). 2000 Hz is perhaps enough for sinus waveforms with no or few harmonics, so in theory it isn't strange. I think that low sample rate is rather too low for usual music sounds and music content.
How do you compress the signal? do you use any mp3-like code? I think lame (Lame Aint an MP3 Encoder) doesn't go lower than 8000 samples/second and 8 kbps of bitrate. It is true that one can use non standard values through the command line, at least for bitrates higher than 320 kbps but I don't know for low values.
Last edited by masterclassic; 08-24-2020 at 10:34 AM.
If it's about saving space wouldn't extreme compression be better? I.e. convert to something like 16kbps vorbis/opus/aac?
If that's not enough, downsample to 4kHz as well.
Although, I can't imagine anything I'd like to listen to that is so reduced.
If it's about saving space wouldn't extreme compression be better? I.e. convert to something like 16kbps vorbis/opus/aac?
If that's not enough, downsample to 4kHz as well.
Although, I can't imagine anything I'd like to listen to that is so reduced.
Not obvious it is any regular audio signal.
I remember (35-40 years ago) in a university laboratory, people used to take physical mesure results and store them. They used analogue tape recorders (open reel Revox tape recorders). Because the frequencies to store were very low (from a fraction of Hz to 50-100 Hz max) they used frequency modulation to translate the spectrum to the bandwith the recorder could write to the magnetic tape. Listening to that recording would give something like the modem or fax sounds.
Now, this translation could be perhaps avoided using newer data formats.
I tried once to encode regular music to some very low bitrate mp3 using a mp3 encoding software (I don't remember if it was lame or perhaps cdex). At 8 or 12 kbps, the sound was like a very old bad telephone line!
It seemed however than for low bitrates aac+ format was somehow better than mp3 (I used it for web radio casting around 2010, with edcast). It gave better sound for the same bitrate.
It seemed however than for low bitrates aac+ format was somehow better than mp3 (I used it for web radio casting around 2010, with edcast). It gave better sound for the same bitrate.
Yes, and I think even ogg/vorbis is much better than mp3 for low bitrates.
And opus is supposed to be even better, at least for human voice.
Given the hard-coded value it seems unlikely there's an option to override it.
Tracing the change back shows the check was originally added in 2008, but the commit message just gives the unhelpful non-explanation of "Check against too low sample rate" without stating why 4000 is considered too low.
Does it have something to do with the audio buffer size of the playback loop? If the samplerate is too low doesn't it fill up too slowly? Also thanks for going to the trouble of checking the code like that!
Last edited by bobIsHere244; 09-04-2020 at 05:58 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.