Hacker News new | past | comments | ask | show | jobs | submit login

If you are concerned about space, consider vorbis, AAC, or opus. They all will achieve a higher quality at a given bitrate (or equivalently a lower bitrate for a given quality).

Note that the difference is not large. A 128 kbps opus or AAC might be comparible to a 160 or 192 kbps MP3. So it's less than 2x improvement of file size.

AAC has an additional advantage though, which is that many phones and receivers can transmit AAC files over Bluetooth without reencoding. this is technically possible for MP3 too, but very few devices implement it.

the loss of quality from transcoding lossy to lossy is usually a lot worse than the difference in quality between codecs and bitrates (within reason).

Interesting, didn't know the Bluetooth fact. I don't usually deal with AAC myself, since opus is so close in every quality/feature, and the AAC patent license is sometimes costly to use commercially ($0.98 per software sale).

Even though it's theoretically possible to send over Bluetooth without reencoding, I wonder if it happens in practice. The audio pipeline has too many stages and each of them would have to retain the encoding.

good point. the developer settings on my pixel 2 allow me to set the preferred codec, but I've never dug into it enough to know whether the setting is actually honored. all my music is MP3 anyway so it's going to sound awful over Bluetooth no matter what.

Similar developer settings on the S8+/Note 9 - as soon as you connect to a device that doesn't support your chosen codec, it'll reset. I can tell the difference between APT-X and AAC, but I've got no idea if the AAC is being re-encoded.

I'm not that concerned, 256K mp3 has been good enough. Although it wouldn't be hard to automate a conversion to another format for my entire collection, given that I have lossless originals.

If I have a large FLAC collection and want to export the whole thing to MP3 or AAC copies, what would I do to automate that?

For AAC or MP3:

ffmpeg and a makefile with a pattern rule is pretty reasonable; (substutite any make-replacement if you prefer). If you are doing AAC, make sure you use the Fraunhofer FDK AAC not the builtin one (the builtin one used to be terrible, but is now somewhere between "okay" and "pretty good" but the FDK is still considered better last I checked, and your distro may not have an up-to-date ffmpeg).

ffmpeg is pretty good about preserving metadata.

If you want ID3v1 tags for MP3 (only needed for older players), then pass -write_id3v1; there's little downside to putting the id3v1 tag on there as it's quite small.

Links for basic ffmpeg encoding; it shows with .wav input but ffmpeg can read flac just fine and should preserve tags: 1,2

For Ogg output, oggenc can read flac directly and preserve tags, so I've never tried using ffmpeg.

I however, ripped my CD collection to a single flac per disc plus a TOC, and abcde[3] will automate that, including a musicbrainz or CDDB lookup for tagging.

1: https://trac.ffmpeg.org/wiki/Encode/MP3

2: https://trac.ffmpeg.org/wiki/Encode/AAC

3: https://abcde.einval.com/wiki/

It's point and click with Foobar 2000, though there might be a plugin needed. Certainly not anything that isn't on their download page. You should be able to populate the playlist, right click, and convert to whatever format you'd like. I've done this for batches of thousands of tracks without much difficulty.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact