Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Best lossy source for transcoding (Read 11289 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Best lossy source for transcoding

I read some times what wavpack lossy files (at 320~384 kbps) used as source for transcoding to low bitrate mp3 (~128 kbps) for portable or so. And it is generally better then mp3 320 kbps or ogg -q8..-q10 because wavpack (and musepack also) has no artifacts on such bitrates. Is it a feature of this two algorithms or blind faith? Is it really just little noise difference and no artifacts?
I know what best way to achieve maximum possible quality is to encode from lossless sources but it's just interesting to know the truth.

Best lossy source for transcoding

Reply #1
wavpack lossy at 320-384k is already nice,
but the artefacts you might listen, are some kind of higher noise level than the Lossless source.
320-384k wavpack lossy is ok for transcoding to mp3@128k.

MPC at q7-q8 220k - 280k, is very nice, transparent in most cases, with headphones & HiFi/speakers.
It is also ok for transcoding to mp3@128k.

The mp3@128k transcodes get different kind of additional artefacts, remember, don't transcode for absolute best quality at given format/bitrate !

Tests have shown (published here at HA somewhere), that it might be better artefactwise, to transcode from lossy stuff without psy-models, ie. from wavpack/optimfrog lossy than from aac/ogg/mpc/mp3 to mp3@128k.
Though from my own expereince, tarnscoding from MPC@220-280k to Lame@130k will not result to annoying artefacts. It will depend on the purpose, mp3@130k is (imo) only suitable/ok for daily music listening whilst driving car or exercising sports, no critical listening conditions.

For HiFi I use MPC q7-q8 or Lossless Flac/Wavpack.

Best lossy source for transcoding

Reply #2
http://www.hydrogenaudio.org/forums/index....showtopic=32440

~250 kbps Vorbis and MPC were the best source according to my own small listening test. For higher bitrate, WavPack lossy was clearly better than MPC.
AAC encoders have improved since, and it may be worth testing them again.

Best lossy source for transcoding

Reply #3
it might be better artefactwise, to transcode from lossy stuff without psy-models

Is the missing of psy-model in such encoders the main reason for generally better quality after transcoding (or may be better to say it gives more assurance about the absence of strong artifacts)?

http://www.hydrogenaudio.org/forums/index....showtopic=32440

~250 kbps Vorbis and MPC were the best source according to my own small listening test. For higher bitrate, WavPack lossy was clearly better than MPC.
AAC encoders have improved since, and it may be worth testing them again.

Very interesting test, thanks for the link.

Best lossy source for transcoding

Reply #4
Musepack sure does have a psymodel, but its technical nature allows it to be somewhat usable for transcoding purposes. WavPack doesn't have any psymodels at all, therefore it is perfectly suitable for transcoding: the only artifact you may possibly encounter is a slight amount of white noise that can be avoided by raising the bitrate of WavPack files to ~400 kbps, where it is already imperceptible.
Infrasonic Quartet + Sennheiser HD650 + Microlab Solo 2 mk3. 

Best lossy source for transcoding

Reply #5
You could use OptimFROG DualStream, in quality mode with quality 3->5 (on average 339->418 kbps). At quality 5, this would ensure that the encoded content is transparent for almost every purpose, including transcoding, editing, etc.

Command line would be
1) for fastest encoding and decoding: ofs --mode fast --optimize none --quality 5 *.wav
2) for normal encoding and decoding: ofs --quality 5 *.wav

Encoding is almost twice slower than WavPack, but DualStream uses an advanced quality metric (both objective and perceptual) to maximize quality instead of just simple bitrate reaction control (as in WavPack). In DualStream there is a clear logical separation between the quantization algorithm (i.e. the quality), and the lossless coding part. This also allows enhancing the encoder without breaking decoder compatiblity.

DualStream, especially in quality mode (which WavPack doesn't have), was designed especially with highest transcoding quality in mind. The only kind of distortion is, similar to WavPack, only a very low amplitude white noise. Also, in quality mode --optimize and --mode (i.e. encoder and decoder complexity) do not affect the quality, in fact the different files decode to bit identical content.

In my opinion, noise shaping is not recommended for either WavPack or DualStream, if you want the best transcoding quality.

You can read more about OptimFROG DualStream, and see a detailed comparison with WavPack hybrid at

http://www.losslessaudio.org/DualStream.php


@Mo0zOoH: Musepack is probably more suitable for transcoding than MP3, Vorbis, or AAC because of the lower resolution of its filterbank (32 band PQF). This translates in a more "softer" quantization envelope.

Florin

Best lossy source for transcoding

Reply #6
http://www.hydrogenaudio.org/forums/index....showtopic=32440

~250 kbps Vorbis and MPC were the best source according to my own small listening test. For higher bitrate, WavPack lossy was clearly better than MPC.
AAC encoders have improved since, and it may be worth testing them again.


That's an interesting test. I wonder how re-encoding to other codecs than mp3-lame may have turned out.

Although transcoding is not a good thing to do, it is inevitable at some times: audio streaming, copying music to a DAP that does not support the original codec... for example.

IMHO another listening test, public this time and with more transcodes, would be interesting.

Best lossy source for transcoding

Reply #7

http://www.hydrogenaudio.org/forums/index....showtopic=32440

~250 kbps Vorbis and MPC were the best source according to my own small listening test. For higher bitrate, WavPack lossy was clearly better than MPC.
AAC encoders have improved since, and it may be worth testing them again.


That's an interesting test. I wonder how re-encoding to other codecs than mp3-lame may have turned out.

Although transcoding is not a good thing to do, it is inevitable at some times: audio streaming, copying music to a DAP that does not support the original codec... for example.

IMHO another listening test, public this time and with more transcodes, would be interesting.


I've done many personal transcoding tests from wavpack and sometime optimfrog to formats other than mp3. In a quite room with Grado headphones it is nearly always impossible to abx between a lossy file from lossless and one from wavpack / optimfrog lossy. I think the best results are with shaping off for both encoders + high mode with wavpack. I don't percieve any additional artifacts from that transcoding might add. Only differences I ever heard was like a subtle loudness change - sometimes more , sometimes less than reference file. No use for a public test as it is harder to abx these transcodes than the 128k tests.
Best thing is that it isn't some fluke - I've transcoded hundreds of tracks and it works stable all the time.

 

Best lossy source for transcoding

Reply #8
Musepack sure does have a psymodel, but its technical nature allows it to be somewhat usable for transcoding purposes.

Just out of curiosity: What technical property would that be?

WavPack doesn't have any psymodels at all, therefore it is perfectly suitable for transcoding ...

Hmm... this is a weird conclusion you draw here. Care to explain the logic?
I mean the lack of a psymodel which could compute a good noise shaping filter might be the very reason for the noticable "white noise" you mentioned. So, by your logic an improved WavPack lossy encoder (with a simple psymodel/advanced noise shaping) would sound worse after mp3 transcoding, right? If not, it must have something to do with WavPack's "technical nature", right?

Sorry, I don't want to be rude. But you made it look like you could pinpoint the exact reason why MPC/WavPack are better suited in such a case. Since I'm not sure myself I'd like to know 


Musepack is probably more suitable for transcoding than MP3, Vorbis, or AAC because of the lower resolution of its filterbank (32 band PQF). This translates in a more "softer" quantization envelope.

Interesting. But please explain: What's a quantization envelope and how does it relate to the topic exactly?


My theory would be: non-linear distortions (as in non-dithered quantization errors) are differently perceived on different synthesis filterbanks (more annoying on filterbanks with a low temporal resolution/high spectral resolution). By using such a filterbank twice (source=MP3/Vorbis/AAC --> signal is quantized twice in a high spectral resolution domain without dithering) it'll negativly affect perceived quality. But as I said: I'm not sure either.


SebG

Best lossy source for transcoding

Reply #9
You can read more about OptimFROG DualStream, and see a detailed comparison with WavPack hybrid at

http://www.losslessaudio.org/DualStream.php

Big thanks, it explains a lot.

For test I compressed original track from audio CD to .ofs at quality 5 (~430kbps) and to .ogg at -q10 (~500kbps). After that I decoded its back to .wav and compare with original (substract generated one from original in Audacity) - .ofs gave only little noice but noice from .ogg was louder and "not so white". DualStream file is really closer to original wav.

BTW, why lossy variant is called DualStream?

Best lossy source for transcoding

Reply #10
... After that I decoded its back to .wav and compare with original (substract generated one from original in Audacity) - .ofs gave only little noice but noice from .ogg was louder and "not so white". DualStream file is really closer to original wav.

Holy moly!
If we want the outcome of a lossy codec to be close (by your metrics) to the original we wouldn't be using any psychoacoustic models at all (even for mp3,vorbis,aac,....) would we?
Point is: That doesn't mean a lot.

Sebi

Best lossy source for transcoding

Reply #11
No, no. Psychoacoustic model need to get minimal sized files with maximal pleasure for hearing (by human ear). Psy model is just a trick for human.
Say, if I have small space but want to save maximum of original sound of audio CD so I can later (or maybe after further optimizing of lame or ogg by Aoyumi or AAC by nero) transcode it to some psy-model lossy, these "semi-lossy" formats (lossy from wavpack and dualstream from optimfrog) is a good solution.
And yes, I know what only for listen it's just waste of bits because lame or ogg on half of such bitrate gives to me full transparency.

Best lossy source for transcoding

Reply #12

... After that I decoded its back to .wav and compare with original (substract generated one from original in Audacity) - .ofs gave only little noice but noice from .ogg was louder and "not so white". DualStream file is really closer to original wav.


What do you think you are comparing when you listen to the substracted signal?

That is not the noise you will be hearing. It is just the, er, signal difference.

Let me give an example: Say your wife kept a ugly, but really ugly photo of your stepmother on the window sill. Consequently, you discover in yourself a sudden passion for gardening and decide the best spot for that bushy gardenia is right next to the window (it needs light heh).

Now the corner looks good with the plant. But the plant is hiding the photo, much like the audio signal is hiding the noise in a Ogg encode. Removing the plant to see the photo will not tell you how good the corner looks with the photo and the plant in front. What you need to compare is the corner with the plant without the photo, and the corner with the plant and the photo.

For music, you should compare the uncompressed signal and the encoded signal. Because of the hiding effect, looking just at the noise is meaningless.

Best lossy source for transcoding

Reply #13
That is already known. A good perceptual coder will maximize perceptual quality without much regard for objective quality. It is best suited for listening purposes. A non-perceptual coder won't take into account much detail of human hearing thresholds / masking etc. It won't sacrifice objective quality to sound correct for human hearing - that is better for transcoding  and editing. Drawback is that higher bitrate is required to achieve transparency.

Best lossy source for transcoding

Reply #14
Well said, shadowking.

Or in simpler terms, lossy encoding achieves lower bitrate because - due to psymodel - they know what to throw away that least affect human hearing. Unfortunately, what's being thrown away differ from one codec to the other, thus a lossily-encoded audio might suffer serious degradation when transcoded to other lossy codec.

Lossy variant of lossless codecs (gee, I'm having trouble to call this kind of thing... any standard word for this?) tries to throw away bits without regard to human hearing characteristics, usually by allowing noise to creep in (in essence, lowering the SNR to save bits). That is why they still must maintain high bitrate to get acceptable quality. But this also means that most of the information is still intact, thus preventing significant degradation when lossily encoded.

Best lossy source for transcoding

Reply #15
...A non-perceptual coder won't take into account much detail of human hearing thresholds / masking etc. It won't sacrifice objective quality to sound correct for human hearing - that is better for transcoding  and editing.

Is it? I have no reason to believe this. I think some interpretations of the tests are a bit off. Some including you just picked the "having-a-psy-model=yes/no"-property out of a large pool of properties (that diverge among the contestants) to be the main reason why things behave the way they behave.

My point is: There's nothing wrong with a perceptually enhanced WavPack version (meaning other "properties" are to blame). You can keep using your high bitrates for transcoding purposes if you like. No reason why it should sound worse compared to the "non-psy" WavPack. It's even likely that you can slightly lower the (wavpack-lossy-) bitrate in this case (allow slightly more distortions since they are better hidden)

When we want to reduce percible artefacts in the end why using a different error metric in the midway? -- Quantization errors add up (wavpack errors + mp3 errors) and so does the power spectral density of the noise (approximately), remember: we want'em to be below the masking curve.


Sebastian

Best lossy source for transcoding

Reply #16
You mean proper PSY with filtering or simple model like dualstream? Nothing wrong with simple model which just measures the noise and changes bitrate. There is no digital filtering in either wavpack or dualstream, which I like.. simple, but predictable quality for nearly any purpose, no quality testing needed with new versions, no psy tunings and debates. Once you put in filtering , you bring in pre-echo, ringing and all the nasties.

Best lossy source for transcoding

Reply #17
You mean proper PSY with filtering or simple model like dualstream? Nothing wrong with simple model which just measures the noise and changes bitrate.

Yeah, "psychoacoustically enhanced" as in "calculates masking thresholds and noise shaping filters".

There is no digital filtering in either wavpack or dualstream, which I like..

I can't speak for dualstream, but IIRC WavPack uses a simple noise shaping filter (it doesn't adapt to my knowledge -- maybe it could on a block basis).
You see: If it weren't so difficult to combine scalable lossless coding (dualstream/hybrid) with smart noise shaping: everybody would do it -- As for lossy encodes only (WavPack lossy for example, no correction layer): I think there's room for improvement withing the current stream specifications (encoder-side adaptive NS)
It should be clear by now that I consider the whole "no psy model is better for transcoding"-thingy to be BS

It's all about hiding artefacts. You better do it on the whole signal path.

Best lossy source for transcoding

Reply #18
You are right about room for improvement. I have a wavpack 4. alpha exe which has adaptive NS and works perfectly. The new code breaks decoders if you make a correction file. I am waiting for Bryant to make an optional switch like --ans

Best lossy source for transcoding

Reply #19
Most of my collection is in xtreme profile musepack and I sometimes transcode to mp3 for my girlfriends mp3 player. If there is an artifact in musepack I find it gets magnified in the mp3 but otherwise it's okay. "Housewife" by Dr Dre is a particularly bad example (the 'aerosol' noise in the background) but most stuff sounds good enough for her.

I'm currently evaluating an alternative lossy codec for my new encodes just because of the lack of musepack development (im otherwise happy with the codec), so any other experiences would be interesting to know about.

Best lossy source for transcoding

Reply #20
Quote
Or in simpler terms, lossy encoding achieves lower bitrate because - due to psymodel - they know what to throw away that least affect human hearing. Unfortunately, what's being thrown away differ from one codec to the other


Can we think of a better adjective than "thrown away". It makes me cringe. Nothing is "thrown" away in the psychocacoustics model. Quantization noise is added in place of what's removed. Yes and the choice of what type of psychoacoustics model to use in each encoder, is what makes the research all of the worthwhile. Try to tell that to a bunch of audiophiles.
budding I.T professional