Hello guest, if you like this forum, why don't you register? https://fanrestore.com/member.php?action=register (December 14, 2021) x


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How lossy is a lossy audio codec?
#1
I decided to start this thread because I always read certain claims, by codec producers and/or users, about alleged subjective transparency of lossy codecs at really low bitrates; last of them was by MPEG-H (that uses AAC) that set transparency level at 96kbps per channel - that is 8 times less than uncompressed LPCM.

Now, how can anybody find out how lossy is that codec, or any other? And, what does it mean "subjectively transparent"?

According to Wikipedia:
Quote:In data compression and psychoacoustics, transparency is the result of lossy data compression accurate enough that the compressed result is perceptually indistinguishable from the uncompressed input. In other words, transparent compression has no perceptible compression artifacts.

Then, a given codec compressed using a given bitrate and/or setting could sound transparent to me, but not to someone else, or could sound transparent when played in a portable audio player and earplugs but not on a hi-fi system.

Said so, if I "lock" certain variables - subject: me, sound chain: always the same - how can I state a given codec is "subjectively transparent"? And, which could be "more transparent" than another?

I thought about several ways to compare original and lossy encoded files:
  • listening tests - just play one after the other (possibly with an ABX method)
  • waveforms - using Audacity, looking for difference in waveform shapes
  • spectrum analysis - using Spek (or Audacity etc.) looking for difference in frequency and loudness
  • audio difference - using Audacity, load first original file; then load encoded file; if stereo, divide each track in two mono tracks; invert phase in one file; playing both (one in phase, one out of phase) will lead to cancel similar sound, leaving only the difference
I made several tests, and a lot of surprises arose; although all codecs (at reasonable compression settings) sound more or less good, and their waveforms seems quite similar; still, when spectrums were compared, a lot of differences came out, as well as in the last test; sound transparencies were rarely achieved at claimed bitrates for many codecs.

Conclusion: taken in account that more or less all lossy codec sound "nice" around reasonable compression ratio that start from ratio 8:1 (depending on codecs), and almost all sound good around 4:1, and their waveforms are very similar, personally I prefer the codecs that does not cut high frequencies - even if some can't hear higher frequencies, it doesn't mean an encoded files should discard them - and, between them, I decided to favour the ones that have less audio differences.

Note: psychoacoustic techniques used in many modern lossy codecs help to lower bitrate, but introduce often audible artifacts not found on older codecs - maybe there is a reason while Auro decided to not use them in their Octopus codec!

PS: despite someone still claim, in 2020, superior quality of certain lossless codecs, they indeed sound ALL EXACTLY THE SAME (if played through the same chain of source-cables-amplifier-speakers, of course); hence: FLAC, DTS-HD, MA Dolby TrueHD etc. when decoded are all identical, bit by bit, to the uncompressed source.
Reply
Thanks given by: alleycat
#2
I think what helps the older codecs like AC-3 and Cinema DTS is the intended playback level (ie loud), louder sounds masking quieter ones etc. It's worth pointing out that AC-3 was the dominant digital format in most parts of the world, the theatrical flavour was 320kB/s and you only have to read some of the film-tech posts to see that once a print got some wear there was a lot of error correction going on to account for the missing/corrupted data. So it's a wonder it worked at all!

Obviously from a preservation perspective we'd love the older LD mixes available in higher resolution but by and large the mixes that are eventually released on blu/UHD are tainted in some way. For the most part the LD mixes will do, we're fortunate to have DTS CD-ROMs for many many titles as well we just need to crack the LFE crossover.

I would still rather listen to a dynamic mix at 384kB/s AC-3 than a dead dead near field/soundbar mix in 24bit DTS-HD, I listen at fairly high SPL and can't say I've ever been bothered by artifacts. My hearing gets tested at work and is good for my age although I'll be the first to say I don't have the 'golden ears'
Reply
Thanks given by:
#3
About loudness war: agree, humans tend to prefer louder track even by a difference of mere 0.2dB! Eek

AC-3: it's a great codec; at limited bitrates quality is still good - and of course I agree that it's better a great lossy mix instead of worse lossless one... but many continues to state that 192kbps for stereo track (hence 96kbps per channel) is enough... well, decide for yourself:
[Image: SbwT7GMK_o.png]
So, IMHO, the minimum so-called "transparency" could be reached using 192kbps bitrate per channel; that would bring a 5.1 track (excluding the .1) to be encoded at 960kbps, but it can't be possible, as the max bitrate is 640kbps... by the way, encoded 5.1 track at 640kbps has frequencies cut at 20kHz (not "transparent", but good enough), while 320kbps, as used in theaters, cut them around 16kHz! Eek Still, 384kbps laserdisc tracks (that I'm pretty sure were, mostly at least, just direct port of cinema tracks with padded zeros) sound great!!! Sadly, "once seen it can't be unseen"; lucky me that I often, if not always, encoded stereo tracks using 384kbps, while - guilty me - often encoded 5.1 tracks at less than 640kbps...
About DTS: a lot must be talked about, but I'm lazy, and I'll leave this to someone else - pipefan, for example? Wink but I would like only to add this: Cinema DTS using APT-X 100 at 882kbps sounds great, much better than AC3 at 320kbps (obvious?) and "probably" even better than home DTS using Coherent Acoustic codec at 1411kbps.
Reply
Thanks given by: pipefan413
#4
The only reason why home AC3 sounds worse than DTS (the Theatrical AC3 codec does not have dialnorm), is the fact that the mainstream consumer hardware/software decoders applies dialnorm to AC3 tracks. I have played AC3 tracks on a kodi android box and compared DTS and AC3, and Kodi doesn't apply Dialnotm to the track. I have also used Media Player Classic on my PC hooked up to a HT receiver using HDMI and no dialnorm was applied.
Reply
Thanks given by:
#5
Add to this that - at least with DVD, for all or most of them - it uses stereo downmix, further degrading the overall quality; another reason why laserdisc AC3 sounds (almost always) better, apart farfield/theatrical mix.
Reply
Thanks given by:
#6
AC-3 has a way of allocating the 'bits' to the channels that need them, also some LD tracks have frequencies up to 20kHz instead of the usual 18kHz despite the fixed 384kB/s bitrate.

It's also worth noting that 70mm 6-track mag had a response only up to approximately 15kHz yet sounds amazing, with many preferring mag to any of the digital formats that followed
Reply
Thanks given by:
#7
Also, the free audio encoders we mere mortals use can possibly not be up to the task with professional encoders, in particular AC3 and DTS; that's why many laserdiscs with the low bitrate of 384kbps sound great: professional encoded, theatrical mixes (all?most?), no stereo downmix.

Analog tracks, despite higher noise floor, sound... well, analog, that's why many prefer them - I fondly remember the few tapes I recorded from CDs using DBX!

I guess we should discuss here about the quality of free audio encoders; and I think the encoder could make a difference, albeit not so much as bitrates - I mean, encoder A could be better than encoder B at 384kbps, but encoder B at 192kbps should not be better than encoder A at 448kbps.

By the way, still reading here and there, and audiophile do not like multichannel AC-3 even at 640kbps, while they do like full rate DTS (1441/1509/1536kbps) but not half rate DTS (704.5/768kbps) due to its frequency rolloff; I guess that for our preservation, when not using lossless codecs, and for compatibilty's sake, we should stick to DTS full rate or at least 640kbps AC-3 for multichannel; personally, for DTS I'd not go lower than 768kbps (maybe even overkill) or AC-3 384kbps for stereo, and subsequently 384kbps DTS and 192kbps AC-3 for mono.

I tested - briefly, I must admit - several codecs, and the one that astonished me more is Opus; even at low bitrate, quality is relatively high; AAC is quite good, but Vorbis is better; MP3 is the worst; still, to get the best quality/filesize ratio, I'd not go lower than 4:1 compression with any lossy codec, while I'll never use lossy for archival purpose.

I'm very curious to read some evalution about the new MPEG-H Audio.
Reply
Thanks given by:
#8
(2020-12-09, 06:33 PM)spoRv Wrote: About DTS: a lot must be talked about, but I'm lazy, and I'll leave this to someone else - pipefan, for example? Wink but I would like only to add this: Cinema DTS using APT-X 100 at 882kbps sounds great, much better than AC3 at 320kbps (obvious?) and "probably" even better than home DTS using Coherent Acoustic codec at 1411kbps.

Hahaha, one day perhaps. For the sake of productivity, I'm sticking to lossless for everything unless there's no alternative (things like AC-3 LD/DVD tracks I'd probably just resync as FLAC/DTS-HD MA like everything else for the time being, maybe revisit later to do a lossy frame cutting method like I originally wanted to do on stuff like T2). I think I've sort of settled on using 639 kbps cores for stereo and 318 kbps for mono in DTS-HD MA encodes but I'm considering dropping those lower because they're only there for compatibility anyway and the bigger they are, the less efficient the compression is.


(2020-12-09, 08:59 PM)spoRv Wrote: I tested - briefly, I must admit - several codecs, and the one that astonished me more is Opus; even at low bitrate, quality is relatively high; AAC is quite good, but Vorbis is better; MP3 is the worst; still, to get the best quality/filesize ratio, I'd not go lower than 4:1 compression with any lossy codec, while I'll never use lossy for archival purpose.

Yeah I have never met anybody else who archives their entire music collection as FLAC and transcodes it to Vorbis for mobile use but that's what I've been doing for a very long time. The compression is amazing, it still sounds good at stupidly low bitrates, which is more than can be said for MP3 or AAC.
Reply
Thanks given by:
#9
(2020-12-09, 06:38 PM)dwalkerdon Wrote: The only reason why home AC3 sounds worse than DTS (the Theatrical AC3 codec does not have dialnorm), is the fact that the mainstream consumer hardware/software decoders applies dialnorm to AC3 tracks.

Certainly not as that embedded dialog normalization neither alters any sound quality nor dynamic range but is only a gain offset in order to get the dialogs at the same level despite having different dynamic range levels (theoretically as it is apparently rarely set correctly anyway).
Reply
Thanks given by:
#10
(2020-12-09, 08:59 PM)spoRv Wrote: Also, the free audio encoders we mere mortals use can possibly not be up to the task with professional encoders, in particular AC3 and DTS; that's why many laserdiscs with the low bitrate of 384kbps sound great: professional encoded, theatrical mixes (all?most?), no stereo downmix.

As you have found out, professional encoders sound better. But free encoders may allow better control over cutoff, but still generally sound worse.

(2020-12-09, 08:59 PM)spoRv Wrote: By the way, still reading here and there, and audiophile do not like multichannel AC-3 even at 640kbps, while they do like full rate DTS (1441/1509/1536kbps) but not half rate DTS (704.5/768kbps) due to its frequency rolloff; I guess that for our preservation, when not using lossless codecs, and for compatibilty's sake, we should stick to DTS full rate or at least 640kbps AC-3 for multichannel; personally, for DTS I'd not go lower than 768kbps (maybe even overkill) or AC-3 384kbps for stereo, and subsequently 384kbps DTS and 192kbps AC-3 for mono.

A compromise btw frequencies & space, I would suggest
  • 224kps for 20 AC3
  • 512kps for 51 AC3
  • 960kps for 51 DTS

For analog audio, there's not much useful signal >20k so discarding that may be fine.

(2020-12-09, 08:59 PM)spoRv Wrote: I tested - briefly, I must admit - several codecs, and the one that astonished me more is Opus; even at low bitrate, quality is relatively high; AAC is quite good, but Vorbis is better; MP3 is the worst; still, to get the best quality/filesize ratio, I'd not go lower than 4:1 compression with any lossy codec, while I'll never use lossy for archival purpose.

Opus was made for low latency , as such, @ 128kps, AAC may beat it. As such, I recommend AAC & vorbis over Opus, except at extremely low rates (<50kps/chan)


[Image: 01gw.png]

via https://hydrogenaud.io/index.php?topic=120166.0
Reply
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
  Streaming: Video/audio quality (bitrate) spoRv 2 1,435 2021-12-21, 08:34 PM
Last Post: spoRv
  [Help] Resyncing audio from completely different masters, potential automation? Mediahead 7 2,590 2021-10-28, 03:28 PM
Last Post: Mediahead
  minimum audio bit-depth needed... spoRv 10 3,530 2021-09-02, 11:24 PM
Last Post: spoRv
  "Left-leaning" audio? deleted user 29 8,159 2020-11-18, 11:43 PM
Last Post: zoidberg
  [Help] Mono Audio in 1.0 or 2.0? bendermac 10 4,990 2020-08-24, 05:56 PM
Last Post: pipefan413
  rating audio tracks quality spoRv 10 10,759 2017-02-16, 11:39 PM
Last Post: zoidberg
  Dolby matrixed audio on modern equipment captainsolo 11 11,310 2016-09-20, 09:43 PM
Last Post: captainsolo
  Laserdisc audio on Bluray - LPCM or FLAC? Colek 4 5,276 2016-07-13, 03:06 AM
Last Post: jerryshadoe
  Brickwalled audio FrankT 9 9,319 2016-07-01, 10:15 PM
Last Post: Avatar_Emil

Forum Jump:


Users browsing this thread: 1 Guest(s)