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: FSLAC: A FLAC Backward-Compatible Free Semi-Lossless Audio Coder (NMR) (Read 15341 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

FSLAC: A FLAC Backward-Compatible Free Semi-Lossless Audio Coder (NMR)

Quote
FLAC, being a mathematically lossless audio codec, inevitably creates link to external web page VBR streams as compressed files. Depending on the «difficulty» of coding each segment of the audio signal, the instantaneous coding bit-rate can be quite high. However, one can observe that, during passages of high FLAC bit-rate, the coded audio also exhibits the greatest ability of psychoacoustic masking. FSLAC exploits this property to limit the maximum instantaneous bit-rate of the compressed file. It does so by detecting the difficult audio blocks (by measuring their predictability via linear-prediction error energy calculations) and requantizing each of the detected blocks to a lower bit-depth, thereby reducing the bit-rate needed for lossless coding of that block. To prevent the quantization error from becoming audible (or visible in a spectrogram), simple adaptive noise shaping is used.

This approach is similar to the one used by link to external web page LossyWAV, but differs in two important aspects. First, FSLAC is not a stand-alone pre-processor but instead is coupled with a FLAC encoder and, hence, directly creates FLAC compatible compressed files. Second, FSLAC only alters the high-bit-rate audio segments, not (almost) all parts of the audio input as LossyWAV does. The coded audio, therefore, remains perceptually lossless. In addition, it is worth noting that, due to its simplicity, FSLAC encoding is very fast. All of these features make FSLAC attractive for audio production and archival applications.

http://www.ecodis.de/audio.htm#fslac

(Not My Release)
Quis custodiet ipsos custodes?  ;~)


Re: FSLAC: A FLAC Backward-Compatible Free Semi-Lossless Audio Coder (NMR)

Reply #2
Quote
All of these features make FSLAC attractive for audio production and archival applications.
I really fail to see how these two applications would be interesting. Really, the only case where I would consider constrained bitrate (CVBR) useful is in real-time applications like streaming over a constrained link, similar to that new bluetooth codec (was it aptX Lossless?), which scales depending on the link quality.
Music: sounds arranged such that they construct feelings.

Re: FSLAC: A FLAC Backward-Compatible Free Semi-Lossless Audio Coder (NMR)

Reply #3
It's as interesting as lossyWAV, but simplier to use and supposedly of better quality...

Re: FSLAC: A FLAC Backward-Compatible Free Semi-Lossless Audio Coder (NMR)

Reply #4
If we look at what has happened the last couple of decades, it isn't hard to come up with potential applications:

* aptX was mentioned ... Recall how bit peeling was thought of as interesting enough to make its way into Ogg Vorbis, but not interesting enough to be utilized back then. But now, realtime CVBR might be coming to a headphone near you?
It seems that aptX lossless can scale from 1 Mbit/s down to 0.14 (= 1/10 of CDDA) depending on connection, and as 1 Mbit likely isn't going to be seen in practice, it will have to adapt quite often.

* Hybrid encoding with correction file ... viewed in the infamous retrospectoscope, it was hardly enough to push WavPack to world domination nor LossyWAV to the masses - but the idea did indeed look appealing.

* DVDs have a way to reduce bitrates by decimating LSBs, as Meridian Lossless (like FLAC/TAK/WavPack) can utilize that to reduce size. One could have used CVBR as an alternative.
If I were their marketing department I would happily have chosen a strategy of CVBR mastering rather to eliminate the risk of a "promises 24 bits, delivers 22" pillory (- that is not to say that 22 is too little for your ears). But the marketing spin doctors probably know better - and they probably knew what they were doing and who they were audiophooling when they selected Bob Stuart Secret Sauce over an efficient codec.



Re: FSLAC: A FLAC Backward-Compatible Free Semi-Lossless Audio Coder (NMR)

Reply #5
in witch aspect is considered "semi" lossless?
According to the known issues, it doesn't support 24 bit, is it possible to do?

Re: FSLAC: A FLAC Backward-Compatible Free Semi-Lossless Audio Coder (NMR)

Reply #6
in witch aspect is considered "semi" lossless?
Maybe not the most fortunate wording, but here is a guess:
* Your typical lossy encoder is always lossy. Even if encoding a 200 kbit/s FLAC to 320 kbit/s MP3.
* A "decimate if needed" encoder could leave lossless if and when the constraint does not bind.

Re: FSLAC: A FLAC Backward-Compatible Free Semi-Lossless Audio Coder (NMR)

Reply #7
Aaaah, somebody found FSLAC! :D That was a "quick and dirty" project of mine, with emphasis on "dirty"... in the sense that,

major disclaimer: this has an undocumented bug that excessively 0-dBFS clipped PCM (which, unfortunately, is what most contemporary pop/rock content looks like) sometimes has clicks after decoding. For those interested: the clicks come from decoded (and apparently invalid) PCM value 32768 being wrapped to -32768 with 16-bit input. If someone wants to address this issue (by clipping the PCM input of frames-to-be-modified during encoding to -0.001 dBFS), let me know, and I can assist.

Quote from: rutra80
It's as interesting as lossyWAV, but ... supposedly of better quality...
I don't know about that, FSLAC is not meant for bit-rates that lossyWAV may be able to handle, I use it only to limit the bit-rate of my personal FLAC encoded music collection to around 800-1000 kbps with 16-bit stereo. That's the "semi"-lossless part: frames requiring more than an instantaneous bit-rate limit (controlled by the FSLAC compression preset 3-8) will have a few LSBs set to zero to lower their FLAC bit-rate and make them effectively lossy, with noise shaping similar to lossyWAV but simpler, and all other frames will remain lossless. So Porcus is absolutely correct.

I really fail to see how these two applications would be interesting.
Me too, actually, when I look at my wording today (wrote this 6 years ago). What I meant was something like "contribution encoding" e.g. during live broadcasting, where you may want to send very-high-quality, near-lossless audio to the studio but may not have enough bandwidth to handle more than, say, 1 Mbps for 2-channel stereo. I did not mean production inside a studio - there one should have plenty of storage space for truely lossless audio.

Chris
If I don't reply to your reply, it means I agree with you.

 

Re: FSLAC: A FLAC Backward-Compatible Free Semi-Lossless Audio Coder (NMR)

Reply #8
I found this project 4 years ago and have actually used this.
This is great in terms of compression speed (lossyWAV is slow as hell...),  can be interesting to lossyWAV/wavpack lossy users.

Re: FSLAC: A FLAC Backward-Compatible Free Semi-Lossless Audio Coder (NMR)

Reply #9
its crashing for me

Problem signature:
  Problem Event Name:   APPCRASH
  Application Name:   FSLAC.EXE
  Application Version:   0.0.0.0
  Application Timestamp:   5855d400
  Fault Module Name:   FSLAC.EXE
  Fault Module Version:   0.0.0.0
  Fault Module Timestamp:   5855d400
  Exception Code:   c000001d
  Exception Offset:   0003ad82
  OS Version:   6.1.7601.2.1.0.256.48
  Locale ID:   3081
  Additional Information 1:   0a9e
  Additional Information 2:   0a9e372d3b4ad19135b953a78882e789
  Additional Information 3:   0a9e
  Additional Information 4:   0a9e372d3b4ad19135b953a78882e789



Re: FSLAC: A FLAC Backward-Compatible Free Semi-Lossless Audio Coder (NMR)

Reply #10
Invalid opcode, your processor lacks support for a specific instruction set.

Re: FSLAC: A FLAC Backward-Compatible Free Semi-Lossless Audio Coder (NMR)

Reply #11
Yeah, somebody should recompile this properly. Attached my FSLAC code ported to the FLAC 1.3.4 codebase (including a fix for the abovementioned wrap-around bug!, so you can build it by

- downloading FLAC source code from e.g. https://ftp.osuosl.org/pub/xiph/releases/flac/
- downloading libogg source code from e.g. https://github.com/xiph/ogg
- downloading nasm executable from e.g. https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/
- opening file README in FLAC source directory and following instructions in e.g. section "Building with MSVC"
- before compiling FSLAC, replace files format.c and stream_encoder.c with those in the attached zip file.

I found this project 4 years ago and have actually used this.
Great to hear that! :)

Chris
If I don't reply to your reply, it means I agree with you.

Re: FSLAC: A FLAC Backward-Compatible Free Semi-Lossless Audio Coder (NMR)

Reply #12
It's possible someone is running Windows XP on a machine without SSE2 support, as that's the default instruction set chosen by Visual Studio these days.

Re: FSLAC: A FLAC Backward-Compatible Free Semi-Lossless Audio Coder (NMR)

Reply #13
Is anyone interested in blind-testing the FSLAC bitrate reduction method at roughly 320-352 kbps CVBR? Then please contact me via personal message.

Chris
If I don't reply to your reply, it means I agree with you.

Re: FSLAC: A FLAC Backward-Compatible Free Semi-Lossless Audio Coder (NMR)

Reply #14
I am very interested in this tool.
What level is suitable for transcoding?
Edit: I get MD5 signature mismatch error when I try to decode FLAC files created by this tool.
gold plated toslink fan

Re: FSLAC: A FLAC Backward-Compatible Free Semi-Lossless Audio Coder (NMR)

Reply #15
That mismatch should not happen, at least not with the attched new compile of mine (you may need a Visual C++ 2012 Runtime Library to run this). You should be able to use all presets starting at -2 for transcoding. Edit: That statement is only valid if, when transcoding, you do not cut the encoded waveform by a non-integer multiple of FLAC's default frame size, or change FLAC's frame size during re-encoding (since that would cause different framing). If you do, you should use a preset higher than -3. Note that preset -2 is slower since it activates a more sophisticated psychoacoustic model.

For those interested: with CDDA audio, the bit-rate capping value of each preset is roughly 300 + 88 * preset kbps.

Chris
If I don't reply to your reply, it means I agree with you.

Re: FSLAC: A FLAC Backward-Compatible Free Semi-Lossless Audio Coder (NMR)

Reply #16
I have a very mixed feelings about this tool. I can already see shops using it to reduce bandwidth costs.
Error 404; signature server not available.

Re: FSLAC: A FLAC Backward-Compatible Free Semi-Lossless Audio Coder (NMR)

Reply #17
I have a very mixed feelings about this tool. I can already see shops using it to reduce bandwidth costs.
Doubt it. Hardly worth it I guess?
* It limits "peak bandwidth" which is more of an issue for streaming than for downloads. If you want to reduce download bandwidth, then there are other means available.
* They could just have decimated down to 15 bits undithered: probably not audible, and dither is "expensive" to compress. 
* This tool is already a few years old, and hasn't seen world domination yet.
* In the Netflix era, bandwidth isn't that expensive anymore. If they didn't ten years ago, why start now? Hi-rez downloads? Old news.
* If they were concerned about it, they could just charge an extra $ for .wav. Maybe someone does already? (Boomkat charges more for lossless format than for MP3, but I have a hunch that is more due to what customers are willing to pay, than costs.)
* ... and they could have incentivized lossless compression by bundling it with an executable and the instruction "just drag and drop and you will have WAV files!"  (Or even: used OptimFROG/WavPack self-extract files? WavPack has discontinued the feature, it was probably not in much demand.)


Re: FSLAC: A FLAC Backward-Compatible Free Semi-Lossless Audio Coder (NMR)

Reply #18
That mismatch should not happen, at least not with the attched new compile of mine (you may need a Visual C++ 2012 Runtime Library to run this). You should be able to use all presets starting at -2 for transcoding. Note that preset -2 is slower since it activates a more sophisticated psychoacoustic model.

Chris

This one is working . Thanks

Re: FSLAC: A FLAC Backward-Compatible Free Semi-Lossless Audio Coder (NMR)

Reply #19
Great, thanks for confirming. Attached for legal completeness of my previous post the license files.

Chris
If I don't reply to your reply, it means I agree with you.

Re: FSLAC: A FLAC Backward-Compatible Free Semi-Lossless Audio Coder (NMR)

Reply #20
Encoding test on random 150 tracks. All CD audio.

 FLAC -8: 921 kbps

FSLAC -2: 335 kbps
FSLAC -3: 565 kbps
FSLAC -4: 649 kbps
FSLAC -5: 731 kbps
FSLAC -6: 802 kbps
FSLAC -7: 863 kbps
FSLAC -8: 900 kbps

Decoding test (flac -d *.flac) on -2 files: 3 MD5 errors
Decoding test (flac -d *.flac) on -3 files: 29 MD5 errors

Decoding test on -2 and -3 files using ffmpeg: success!

Either:
a) files created by FSLAC are not good
b) ffmpeg is "more flexible"
c) reference decoder is broken

Overall, -2 has very low bitrate. I doubt it will be good for transcoding.
-7 and -8 are also not worth it imo. Very small space savings.
Sweet spot seems to be from -3 to -6.
gold plated toslink fan

Re: FSLAC: A FLAC Backward-Compatible Free Semi-Lossless Audio Coder (NMR)

Reply #21
By the way, shouldn't this be moved to Other Lossy Codecs? "Losslessness", after all, isn't inherited nominally.

Re: FSLAC: A FLAC Backward-Compatible Free Semi-Lossless Audio Coder (NMR)

Reply #22
True, this is a lossy encoder by definition.

FSLAC -2: 335 kbps
...
Overall, -2 has very low bitrate. I doubt it will be good for transcoding.
True, I actually didn't inted that. Coud you please re-test preset -2 with the attached binary?

Chris
If I don't reply to your reply, it means I agree with you.

Re: FSLAC: A FLAC Backward-Compatible Free Semi-Lossless Audio Coder (NMR)

Reply #23
By the way, shouldn't this be moved to Other Lossy Codecs? "Losslessness", after all, isn't inherited nominally.
Hurry make correction files!

I'd say it could be justified in the FLAC subforum (where the big LossyFLAC thread is found).

Re: FSLAC: A FLAC Backward-Compatible Free Semi-Lossless Audio Coder (NMR)

Reply #24


LossyWAVinsaneextremehighstandardeconomicportableextraportable
599526459428397348312
FSLAC-8-7-6-5-4-3-2
900863802731649565483
gold plated toslink fan