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: re-encoding flac files with a new encoder (Read 1255 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

re-encoding flac files with a new encoder


If I have a library of nicely tagged flac files and I need or want to encode them into that format, say apple to play on my iphone, i can easily do that, but if I want to encode to flac again using a 'better' or newer flac encoder can I do that?

Thanks
dpr

Re: re-encoding flac files with a new encoder

Reply #1
There is really no gain in re-encoding it to FLAC again since the files is already lossless. What you can maybe gain is a little smaller file size but that's it imo.

Re: re-encoding flac files with a new encoder

Reply #2
Perhaps, but my question is simple. Can it re-encode?

Re: re-encoding flac files with a new encoder

Reply #3
Not without decoding first. Which is lossless.

Re: re-encoding flac files with a new encoder

Reply #4
Thanks. So use of flac and its tagging system is future proof.

Re: re-encoding flac files with a new encoder

Reply #5
As safe as it goes, as long as you start with a standard 16-bit or 24-bit PCM file - like CD or lossless digital store download. (Unless it is DSD or floating-point that the FLAC format doesn't support - if you have that, use WavPack.)

If you use the reference encoder, the command
flac --force <whatever_options_and_compression_level_you_have_patience_for> -- flacfilename.flac
will do the decoding and re-encoding and transfer tags.
High Voltage socket-nose-avatar

Re: re-encoding flac files with a new encoder

Reply #6
It's a great practice. Provided one has compatible GPU, they should always (re-)encode flac with latest version of FLACCL, which is the flac encoder with highest compression ratio at the moment (correct me if there's a better one).

Some time ago I re-encoded my flac library with FLACCL set to highest compression parameter via foobar2000. Given that many files were encoded with flac 1.2.1 probably set to avg mode, this has cut down on several GBs worth of space. Not only that, it exposed which files were corrupted so I could re-download and replace them. Now I automatically re-encode all flac I download with FLACCL for these two reasons. I just wish foobar had convert-and-replace option such that xrecode has, right now it's a little finicky because you have to delete original files and rename the converted ones. No biggie though, just a few keystrokes if you know how to set them up.

I often think that if music download stores and streaming services that offer flac (beatport, junodownload, bandcamp, tidal, deezer, qobuz etc.) caught up to this, it would probably allow them to save thousands of dollars in bandwidth costs monthly, if not more.

Re: re-encoding flac files with a new encoder

Reply #7
Corrupted FLACs ... you can find them by foo_verifier. I would in any case do that before trying to re-compress, in case I set parameters to overwrite corrupted files without warning - although the reference encoder yells at me if I try.

which is the flac encoder with highest compression ratio at the moment (correct me if there's a better one).
FLACCL obtains good results fast - I have no idea whether compression ratio depends on display card, does it?
I did some testing with a new beta and proposed a couple of settings here. Feel free to compare size to FLACCL and report, I am curious. On my not-very-new computer, FLACCL gets me similar compression levels at 3/4 of the time.
High Voltage socket-nose-avatar

Re: re-encoding flac files with a new encoder

Reply #8
Unless you don't use Windows.

Re: re-encoding flac files with a new encoder

Reply #9
Corrupted FLACs ... you can find them by foo_verifier.
Sure you can, but it's done during re-encoding anyway so why do it twice.

I did some testing with a new beta and proposed a couple of settings here. Feel free to compare size to FLACCL and report, I am curious.
So was I! I ran some tests and they were largely inconclusive: flaccl lost in compression but by a minuscule margin, and won in encoding speed significantly.

FLACCL obtains good results fast - I have no idea whether compression ratio depends on display card, does it? 
Beats me. But here's a file you can test and see if you get different results.

Unless you don't use Windows.
Virtual machines are pretty useful I hear.


Re: re-encoding flac files with a new encoder

Reply #10
You realise flacCL -11 does not produce standard subset files? You have to compare flac -8 results directly to flacCL -8. Even CUETools flake from the same guy that did flacCL compresses better at -8 then.
Is troll-adiposity coming from feederism?
With 24bit music you can listen to silence much louder!

Re: re-encoding flac files with a new encoder

Reply #11
You realise flacCL -11 does not produce standard subset files? You have to compare flac -8 results directly to flacCL -8. Even CUETools flake from the same guy that did flacCL compresses better at -8 then.
Technically I don't have to do anything. My personal curiosity lies in the best compression results for flac format.

Re: re-encoding flac files with a new encoder

Reply #12
Technically I don't have to do anything. My personal curiosity lies in the best compression results for flac format.
Subset is a stricter format that should be streamable, and the reference encoder sticks to that unless you deliberately instruct it to do otherwise with a special parameter that makes it more ... uh, fool proof.

 A "flac decoder" need not be able to stream a file generated by flaccl -11 file nor need it be able to stream a flac.exe --lax -m -b 32768 -r 15 -l 32 -A "partial_tukey(31)" -p -e generated file. In the reference encoder, non-subset is deliberately left to the geex who know what they are doing and are willing to give the commands themselves.

My personal curiosity lies in the best compression results for flac format.
Well here you got something to test your curiosity ... and your patience. This is worse than what in an older version of flac called --super-secret-totally-impractical-compression-level .
There is not really any limit to how slow compression can be - in the reference encoding, such a limit is just self-imposed.
High Voltage socket-nose-avatar

Re: re-encoding flac files with a new encoder

Reply #13
Unless you don't use Windows.
Virtual machines are pretty useful I hear.
Pretty swell when you want to limit a program to using half the host's CPU cores at most, and have the overhead of a second OS running on those cores. Unfortunately, a fine number of random encoders are broken even under Wine. But why not target exclusively Windows? Most people only use that anyway.

Re: re-encoding flac files with a new encoder

Reply #14
I recompress everything I download, as it helps to remove padding from album artwork, check for errors/corrupt files, unify filenaming schemes, and shrink file sizes even if only a little bit. My older personal CD rips were done at “only” -8, my newer cd rips are done with more technically advanced compression settings since my CPU can now handle it. I think I’d make some decent space savings if I recompressed all my old rips, and it shouldn’t take too long in theory, but I haven’t attempted it.

 

Re: re-encoding flac files with a new encoder

Reply #15
With current hard drive space re encoding flac isn't good. At worse, you
can even suffer corruption and data loss through sofware or HW bugs.
I suggest keep old flacs for a while just in case if it must be done.
wavpack hybrid 320k -hx4s.5c