Will this change in audio codec result in appreciable difference? - AVS Forum | Home Theater Discussions And Reviews
Forum Jump: 
 
Thread Tools
post #1 of 3 Old 06-26-2019, 07:03 PM - Thread Starter
Newbie
 
Join Date: Jun 2019
Posts: 1
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 0
Will this change in audio codec result in appreciable difference?

I used SciPy to run a butterworth pass, removing sounds above a certain frequency from an audio file. The SciPy package is fast and easy to use but unfortunately, lacking options in terms of specifying codec to be used in the output.

My original audio files were in PCM s16LE @ 16 bits per sample. The output audio files are in 64 bits floats LE @ 64 bits per sample. Will the change in codec have an appreciable impact on the way the audio files sound. Would I be able to keep the sound quality similar if I were to convert the output audio codec back to its original format?
Chris Park is offline  
Sponsored Links
Advertisement
 
post #2 of 3 Old 06-27-2019, 01:01 PM
AVS Forum Special Member
 
DonoMan's Avatar
 
Join Date: Feb 2005
Location: Massachusetts
Posts: 4,089
Mentioned: 8 Post(s)
Tagged: 0 Thread(s)
Quoted: 246 Post(s)
Liked: 194
The output file format there is higher quality than the input. The rounding error would be minimal given that format. s16LE = signed 16-bit little endian (you don't need to care about the endian as a user though). 64-bit float gives a good amount of precision to minimize any rounding error that the filtering has. If you convert it back to 16-bit int then yes it will technically lose some quality but it won't be significant and you probably won't hear the difference. If you want to test that, you can use some software, get a friend to help and do a blind (or double-blind to be even better) ABX test.


The 64-bit/sample file will be 4 times as large as the 16-bit/sample file, given the same sample rate anyway. Filesize is the only downside of 64-bit/sample over 16-bit. That and maybe playback support (many players will play 16-bit but not 64-bit) but there is still plenty of software that can do it.


When you run your filter on the audio, the math that it uses will produce results that have to be rounded to be stored. This same process actually occurs when recording signals in the first place as well. It's not a problem unless you keep compounding those rounding errors. Say you've got a BUNCH of filters you want to run on audio - you wouldn't want to run each filter and independently save as a 16-bit int format between each, because the rounding error would compound. A 64-bit float signal has pretty good precision however. Technically speaking, you could process and re-save/re-round a 64-bit float enough times to compound the rounding error into something you could hear, but in practical terms, it will never happen unless you're just messing around with the goal of making it happen (by writing a script that keeps filtering and then saving).




16-bit samples are the standard for CD, and most other digital sources of music. There is a fair amount of content available in 24-bit samples (DVD can do 24-bit). 64-bit is well above any standard that a consumer would use.


P.S. a lot of people would tell you that PCM isn't actually a CODEC (capitals because it stands for COmpressor/DECompressor, not because I'm "yelling"). It's not like MP3 (or AAC, Vorbis, Opus or any other lossy CODEC). The only loss of quality you have with PCM is any rounding error when you use filters. There is no psychoacoustic coding that attempts to determine what details in the audio can be thrown out to save on bitrate like would happen in the lossy CODECs (again such as MP3). When you open an MP3 and re-save it as MP3 or as a different lossy CODEC, the quality goes down mostly because of the actual compression algorithm, which isn't the case with PCM.

Last edited by DonoMan; 06-27-2019 at 01:12 PM.
DonoMan is offline  
post #3 of 3 Old 06-27-2019, 03:55 PM
Advanced Member
 
Tomas2's Avatar
 
Join Date: Jan 2017
Location: New Orleans
Posts: 742
Mentioned: 2 Post(s)
Tagged: 0 Thread(s)
Quoted: 459 Post(s)
Liked: 731
Quote:
Originally Posted by DonoMan View Post
P.S. a lot of people would tell you that PCM isn't actually a CODEC (capitals because it stands for COmpressor/DECompressor, not because I'm "yelling").
CODEC stands for:

encoder / decoder or coder / decoder

https://en.m.wikipedia.org/wiki/Codec

-Tomas

SAMSUNG QLED | ROTEL | MOREL | M&K | HAFLER | TECHNICS SP-25
Tomas2 is offline  
Sponsored Links
Advertisement
 
Reply Audio Theory, Setup, and Chat

Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page


Forum Jump: 

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off