Live data from Hacker News

FLAC 1.3.4

xiph.org

31–40 of 165 posts

Re: FLAC 1.3.4

#31

Earlier quoted context omitted.

What would make life simpler is the industry standardising on at least one format. For example Apple doesn't actually support FLAC, despite it being the most popular lossless format.

Core Audio added support for FLAC in High Sierra, macOS 10.13, in 2017. Apple has supported "ALAC" for longer, which unlike FLAC uses only integer math and is therefore less power hungry on mobile devices. You can transcode losslessly between FLAC and ALAC.

I can't comment on the "power hungry" part, but FLAC only requires and (to my knowledge) has ever only required integer math. Source: just looked at my own FLAC implementation [1].

[1] https://github.com/astoeckel/libfoxenflac/blob/master/foxen/...

Re: FLAC 1.3.4

#32
post #6

Earlier quoted context omitted.

I'm surprised to hear this perspective. I feel like FLAC is to PCM as PNG is to BMP. Why not just work with FLAC directly? Half the file size in exchange for negligible processing time. As a practical use case, FLAC is the only way I can fit my song library on my phone. Flagship phones today come with 128GB of storage, about 90GB is actually usable. Every additional 128GB is $100 more.

>Flagship phones today come with 128GB of storage IMO, one of the biggest scams in the mobile space currently. My old OnePlus 3T flagship from 2016 came with 128GB of storage and it "only" cost €480. Also, best phone I ever owned by far BTW. Today, nearly 6 years later, Apple and Samsung flagships (I'm staying away from OnePlus nowadays) are charging huge markups for more than the base 128GB of storage, on phones tha…

I was watching some old Apple videos one day and back in 2001 Apple asked $500 more just to have a better _optical_ drive in your iBook https://youtu.be/ZxIgyG_7jcI?t=243

Re: FLAC 1.3.4

#33
post #16

Shoutout to LossyWAV (formerly LossyFLAC) [1]. It's a preprocessor to lossless codecs shaping noise such that higher compression ratios can me reached. It works out much better than that sounds like. 1. https://wiki.hydrogenaud.io/index.php?title=LossyWAV

It works out much better than that sounds like.

That... doesn't sound good ;)

Really cool idea, though more comparable to lossy compression I guess.

Re: FLAC 1.3.4

#34

Earlier quoted context omitted.

>Flagship phones today come with 128GB of storage IMO, one of the biggest scams in the mobile space currently. My old OnePlus 3T flagship from 2016 came with 128GB of storage and it "only" cost €480. Also, best phone I ever owned by far BTW. Today, nearly 6 years later, Apple and Samsung flagships (I'm staying away from OnePlus nowadays) are charging huge markups for more than the base 128GB of storage, on phones tha…

The market decides; people pay those rates even though there's alternatives available.

There is not much choice when the giants in the space with the majority market share are all pulling the exact shame shenanigans.

Re: FLAC 1.3.4

#35
post #16

Shoutout to LossyWAV (formerly LossyFLAC) [1]. It's a preprocessor to lossless codecs shaping noise such that higher compression ratios can me reached. It works out much better than that sounds like. 1. https://wiki.hydrogenaud.io/index.php?title=LossyWAV

This reduces the bitrate by about 3 times. Even at the lowest bitrate at about 300 kbps I can't even hear the slightest difference to the original. Impressive, but I wonder what it would sound like when you reduce the bitrate even further. Would it be competitive with mp3?

Re: FLAC 1.3.4

#36

Earlier quoted context omitted.

> How cheap does storage have to get before people stop bothering to use FLAC? It's not about the storage, it's about the transfer. Streaming services are only just beginning to support lossless at all. Improved lossy codecs like Opus provide indistinguishable-from-lossless audio at 128Kb/s, so the formula is store the audio losslessly, then transcode it to lossy (on the fly, even) for streaming.

I found an use for lossless streaming: A weakness in the open source landscape I found is that there's a lack of fast codecs. If you want to encode in real time (eg, streaming speech or an artist playing in the moment), and encode per client for positional audio in a 3D world, then Opus becomes a bottleneck. FLAC according to some preliminary tests helps by being faster than Opus to encode.

By "fast to encode" do you mean that in terms of low latency or low CPU usage?

I ask because I know Opus is used quite commonly in real-time applications (e.g. voip), and I remember when researching in the past that it is actually capable of lower inherent latency because of support for smaller frame sizes than some of its competition.

I haven't looked into how expensive it is to encode in terms of CPU time, so I assume maybe you're taking about a bottleneck in terms of the number of simultaneous streams you can support on a single CPU?

Re: FLAC 1.3.4

#37
post #32

Earlier quoted context omitted.

>Flagship phones today come with 128GB of storage IMO, one of the biggest scams in the mobile space currently. My old OnePlus 3T flagship from 2016 came with 128GB of storage and it "only" cost €480. Also, best phone I ever owned by far BTW. Today, nearly 6 years later, Apple and Samsung flagships (I'm staying away from OnePlus nowadays) are charging huge markups for more than the base 128GB of storage, on phones tha…

I was watching some old Apple videos one day and back in 2001 Apple asked $500 more just to have a better _optical_ drive in your iBook https://youtu.be/ZxIgyG_7jcI?t=243

It was also for double the RAM.

Re: FLAC 1.3.4

#38

Earlier quoted context omitted.

I found an use for lossless streaming: A weakness in the open source landscape I found is that there's a lack of fast codecs. If you want to encode in real time (eg, streaming speech or an artist playing in the moment), and encode per client for positional audio in a 3D world, then Opus becomes a bottleneck. FLAC according to some preliminary tests helps by being faster than Opus to encode.

By "fast to encode" do you mean that in terms of low latency or low CPU usage? I ask because I know Opus is used quite commonly in real-time applications (e.g. voip), and I remember when researching in the past that it is actually capable of lower inherent latency because of support for smaller frame sizes than some of its competition. I haven't looked into how expensive it is to encode in terms of CPU time, so I ass…

Both, primarily the first. Low latency is definitely a requirement, but no issues with Opus on that account.

> I haven't looked into how expensive it is to encode in terms of CPU time, so I assume maybe you're taking about a bottleneck in terms of the number of simultaneous streams you can support on a single CPU?

Yup! I work on https://vircadia.com/ -- we have to compress audio in real time and every user gets their own mix since it depends on their location in 3D space. It turns out to add up pretty fast, and you can't fit that many people into a cheap VPS.

That's why I'm working on FLAC support for it. If bandwidth is plentiful but CPU resources are lacking it's a good alternative to have.

This code originally came from the High Fidelity company, which made their own codec. It's some piece of black magic that cuts down audio by exactly 1/4th and is amazingly fast. But it's closed source.

Re: FLAC 1.3.4

#39

Earlier quoted context omitted.

I found an use for lossless streaming: A weakness in the open source landscape I found is that there's a lack of fast codecs. If you want to encode in real time (eg, streaming speech or an artist playing in the moment), and encode per client for positional audio in a 3D world, then Opus becomes a bottleneck. FLAC according to some preliminary tests helps by being faster than Opus to encode.

What are the use-cases for pre-baked positional audio? Ie where the client can't do the positional audio processing itself.

Not pre-baked. I work on https://vircadia.com/ -- it has to give every user their own audio mix to account for their 3D position.

This means codec costs add up fast. You can't just encode once and stream the same thing to a dozen people.

Re: FLAC 1.3.4

#40
post #16

Shoutout to LossyWAV (formerly LossyFLAC) [1]. It's a preprocessor to lossless codecs shaping noise such that higher compression ratios can me reached. It works out much better than that sounds like. 1. https://wiki.hydrogenaud.io/index.php?title=LossyWAV

> It's a preprocessor to lossless codecs shaping noise...

So it's a lossy compression? Why use FLAC then?

Post reply on HN