Resampling lower cuts the audio in half

Help for Audacity on Windows.
Forum rules
ImageThis forum is for Audacity on Windows.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".


Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
edwinn
Posts: 269
Joined: Fri Feb 27, 2015 12:46 am
Operating System: Windows 7

Re: Resampling lower cuts the audio in half

Post by edwinn » Sat Aug 15, 2015 1:19 pm

Gale Andrews wrote:Re-encoding at a higher sample rate never adds frequencies that were not there in the first place - it only provides the possibility that higher frequencies could be added.
Ok thanks.

So we don't get too far OT, and since I'm working with ALL lossless FLAC now (except to upload or attach clips to email), will pick this thread up again when the issue happens next... that is losing the 2nd half of the audio when exporting (re-sampling) at 11 kHz.


-Ed

edwinn
Posts: 269
Joined: Fri Feb 27, 2015 12:46 am
Operating System: Windows 7

Re: Resampling lower cuts the audio in half

Post by edwinn » Sun Aug 16, 2015 2:02 pm

The issue happened aGaiN last night while exporting a 22 kHz FLAC to an 11 kHz MP3.

Exporting to 16 kHz MP3 yields the desired results, but when exporting to 11 kHz, Winamp was displaying all playtimes as 1/2 of actual. It displays entire file as 1/2 the number of min:sec, and I believe any other time mid-file as 1/2 the actual time. (hope that is clear)


Investigation

Here are FOUR files displayed in Audacity with a `fit vertically´ layout.

The FLAC file on top is on top, then 22k MP3 export, the 16k MP3, and 11k MP3 at bottom.

Image
Notice minor clipping in MP3's


So I'd say there's a bug in either Winamp, or the file metadata? the header?


What could cause the 'client' to display the time wrong? if file data is correct?


-Ed

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Resampling lower cuts the audio in half

Post by Gale Andrews » Sun Aug 16, 2015 4:49 pm

edwinn wrote:The issue happened aGaiN last night while exporting a 22 kHz FLAC to an 11 kHz MP3.
Once again, those rates are non-standard. For maximum compatibility export as 11025 Hz by selecting that rate, not by typing in 11000 Hz (if you are doing that). By contrast, 16000 Hz is a standard rate.
edwinn wrote:Here are FOUR files displayed in Audacity with a `fit vertically´ layout.

The FLAC file on top is on top, then 22k MP3 export, the 16k MP3, and 11k MP3 at bottom.
Do you mean those are the files that you exported, then re-imported into Audacity? If so the bug does not seem to be in Audacity.
edwinn wrote:Notice minor clipping in MP3's
MP3's are lossy. They adjust encoded volume slightly according to what is thrown away and what retained. If you use the highest MP3 export bitrate (320 kbps CBR) the volume adjustment is less likely to happen. Audacity would have to intervene somehow to restore the original peak level if this was to be avoided.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

edwinn
Posts: 269
Joined: Fri Feb 27, 2015 12:46 am
Operating System: Windows 7

Re: Resampling lower cuts the audio in half

Post by edwinn » Mon Aug 17, 2015 12:06 pm

Gale Andrews wrote:Once again, those rates are non-standard. For maximum compatibility export as 11025 Hz by selecting that rate, not by typing in 11000 Hz (if you are doing that). By contrast, 16000 Hz is a standard rate.

Do you mean those are the files that you exported, then re-imported into Audacity? If so the bug does not seem to be in Audacity.

MP3's are lossy. They adjust encoded volume slightly according to what is thrown away and what retained. If you use the highest MP3 export bitrate (320 kbps CBR) the volume adjustment is less likely to happen. Audacity would have to intervene somehow to restore the original peak level if this was to be avoided.
Thanks man, we can discontinue focusing on "non-standard rates." I'm using standard rates from the menu, or pull-down menu. You mean a custom sample rate can be entered? That sounds odd. What would it be used for?

Yes, those are the files exported from Audacity, then 'dropped' (drag and drop from file manager/explorer) onto a New Audacity window. I'd say there's a bug in Winamp, and am sure Audacity is strictly coded, seeing how precise it is. The problem with Winamp didn't appear until using Audacity in the last year. Been running it for 10-15 years prior and never had an issue.

Slight clipping in MP3's is a non-issue. I'm aware of encoding errors, and those clips are so minor... in the range of 0.00 to 0.1 dB


What criteria does Audacity used to determine a RED clip indication? (this is going OT)

-Ed

steve
Site Admin
Posts: 80693
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Resampling lower cuts the audio in half

Post by steve » Mon Aug 17, 2015 12:46 pm

edwinn wrote:What criteria does Audacity used to determine a RED clip indication? (this is going OT)
Because Integer formats (16-bit and 24-bit) have an absolute ceiling of 0 dB, if Audacity looked for "over 0 dB", then it would never show clipping for integer format tracks. So what Audacity does is to show the warning indicators "at" 0 dB. Note that this means that the audio may not actually be clipped, but if sample values are at 0 dB, then the audio is dangerously high and "probably" clipped. Consider the red "clip indicators" to be a "warning" rather than anything else.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Resampling lower cuts the audio in half

Post by Gale Andrews » Mon Aug 17, 2015 12:52 pm

edwinn wrote:I'm using standard rates from the menu, or pull-down menu. You mean a custom sample rate can be entered? That sounds odd. What would it be used for?
There will always be someone who needs some "non-standard" rate for some purpose. The only point I am making is that such non-standard rates, if used, could cause problems in some players. In my opinion, Winamp is being sloppy by displaying "11 kHz" when it is not.
edwinn wrote:Yes, those are the files exported from Audacity, then 'dropped' (drag and drop from file manager/explorer) onto a New Audacity window. I'd say there's a bug in Winamp, and am sure Audacity is strictly coded, seeing how precise it is. The problem with Winamp didn't appear until using Audacity in the last year. Been running it for 10-15 years prior and never had an issue.
Well, I imported a 22050 Hz FLAC (3 minutes 38 seconds) into Audacity, exported as 11025 Hz MP3 (64 kbps), opened it in Winamp 2.64 and it played the correct length in Winamp.

Winamp is discontinued but if you want to pursue it further I suggest you post the actual offending MP3 file somewhere.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

Post Reply