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: Using FLAC to avoid problems with lossy -> lossy transcoding? (Read 6826 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Using FLAC to avoid problems with lossy -> lossy transcoding?

My music collection is about 95% FLAC (nearly all ripped from my original CD's). But I do have a smattering of MP3's that I have acquired for one reason or another. On the side, I like to have everything also available in MP4 (for portable devices). Converting my FLAC to MP4 is of course no problem. But when I attempt to transcode the MP3 to MP4 I get a warning message saying that this will result in a further degradation of quality. (I could of course just leave the MP3's as-is, but I want to have everything uniform.)

I have two questions:

1) just how bad IS the loss of quality going from MP3 to MP4? Is this a significant concern? My MP4 settings are "Very High", around 300 kbps.

2) am I over-thinking the problem if I transcode MP3 > FLAC (which doesn't increase quality at all, but doesn't decrease it either), and then go from FLAC to MP4? Does that effectively work around whatever issue there is with lossy to lossy transcoding?

Thoughts?

Using FLAC to avoid problems with lossy -> lossy transcoding?

Reply #1
Just copy the mp3 files directly to the portable device. Do not transcoded.

Using FLAC to avoid problems with lossy -> lossy transcoding?

Reply #2
Just copy the mp3 files directly to the portable device. Do not transcoded.



Yeah, that's what I actually have done thus far. But it irks me to have two different formats when I'm so close to uniformity. I'm probably just being OCD.

Still curious about lossy > lossy transcoding, but I probably should be in a different forum for that anyway.....

Using FLAC to avoid problems with lossy -> lossy transcoding?

Reply #3
mp3->flac->mp4 has the same quality as mp3->mp4

Using FLAC to avoid problems with lossy -> lossy transcoding?

Reply #4
That isn't over-thinking, it's just misunderstanding. If the only source you have is a lossy file, decoding the lossy format and then losslessly compressing the result only gives you a larger file with the same distortions as your lossy source. Encoding the resulting FLAC as MP4 won't give you a warning, because the encoder will no longer be able to tell there's distortions just from the file format, but the end result will be exactly the same loss of quality as the MP3-MP4 "direct" transcode.

(All you've done is stick an invertible operation and its inverse in the chain, which together are the same as doing nothing, just like adding a number and then subtracting it: decode MP3 to PCM -> losslessly compress PCM to FLAC -> decode FLAC to PCM, bit for bit identical to the PCM from decoding the MP3 -> encode PCM to MP4.)

Having everything "uniform" doesn't really provide any advantage. At least for the forseeable future, any device that supports MP4 will support MP3.

Please read the HA Wiki entry on transcoding carefully before proceeding any further.

Using FLAC to avoid problems with lossy -> lossy transcoding?

Reply #5
Encoding the resulting FLAC as MP4 won't give you a warning, because the encoder will no longer be able to tell there's distortions just from the file format, but the end result will be exactly the same loss of quality as the MP3-MP4 "direct" transcode.


Sigh, I suspected as much.  Thanks for the responses!

Using FLAC to avoid problems with lossy -> lossy transcoding?

Reply #6
You can try transcoding them, and then performing ABX tests to determine if the generation loss is a problem for you.

I'm happy to keep a variety of file formats if they are from lossy sources, you do not need arbitrary rules of uniformity.

Using FLAC to avoid problems with lossy -> lossy transcoding?

Reply #7
If you want lossy -> lossy transcoding with fb2k, just do it directly.
lossy -> FLAC -> lossy only to shut up fb2k warning is a complete non-sense, and actually is worse than simple direct transcoding.
Since FLAC only supports integer PCM, the latter process inevitably involves with quantization (with or without dither / noise shape).
On the other hand, in case of direct lossy->lossy transcoding  fb2k will use float32 as intermediate PCM format as far as encoder supports it. Unnecessary quantization doesn't take place.
Although difference may not be audible, you are just making it worse by adding chain of task. Do it simple.


Using FLAC to avoid problems with lossy -> lossy transcoding?

Reply #8
To be clear, encoding lossy to lossy involves an intermediate uncompressed stage, just as encoding lossy to lossless; the losslessly compressed result in the former case will be the same as the intermediate decompression in the former case.

An interesting question that I like to pose in these recurring threads and ones with similar ideas, and which I don’t recall having gotten an answer for, is a thought experiment that reframes the original question: How could an intermediate conversion to lossless protect against transcoding issues? In other words, what attributes of that process would grant it quality-restoring powers? There are none. With a basic understanding of the technology, such questions become impossible.

Using FLAC to avoid problems with lossy -> lossy transcoding?

Reply #9
lossy -> FLAC -> lossy only to shut up fb2k warning is a complete non-sense, and actually is worse than simple direct transcoding.
Since FLAC only supports integer PCM, the latter process inevitably involves with quantization (with or without dither / noise shape).
On the other hand, in case of direct lossy->lossy transcoding  fb2k will use float32 as intermediate PCM format as far as encoder supports it. Unnecessary quantization doesn't take place.
Although difference may not be audible, you are just making it worse by adding chain of task. Do it simple.


Huh. I never realized that.
The one thing i thought of is that FLAC can't handle samples above 0dB, while this can happen (and quite often, i've found) in mp3, resulting in a loss of quality (possibly audible?) when converting mp3 to FLAC.


Using FLAC to avoid problems with lossy -> lossy transcoding?

Reply #11
The question is what DAC technology can handle samples above 0dbFS.

Using FLAC to avoid problems with lossy -> lossy transcoding?

Reply #12
The question was whether lossy -> flac -> lossy was better than lossy -> lossy.

As to the off-tooic question about DACs and samples above 0dBFS, the worthwhile answer will only be found in an ABX test.

 

Using FLAC to avoid problems with lossy -> lossy transcoding?

Reply #13
The question is what DAC technology can handle samples above 0dbFS.

You can just turn software volume down if you worry about lossy files with peaks above 0dBFS (or you can simply apply replaygain).
That's completely different from playing files that are already hard clipped.
Try the attached file. AAC is original with peak of +3dBFS or so, and FLAC one is converted from AAC using fb2k (without applying gain or something).