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

I rip my CDs in a two-step process: first to FLAC, then convert to mp3. The mp3s go in my phone, I have 33GB so far and my collection isn't even half ripped. I haven't checked how big the FLACs are lately but I'm sure they'd be a much bigger burden.

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.

Slightly off topic, but do you use something other than iTunes for this process? I'm looking for a good way to manage a FLAC library.

As far as I am aware, iTunes is not even able to play back FLACs, so when I am on a Mac, I use Clementine, (https://www.clementine-player.org), or cmus, (https://cmus.github.io).

Converting etc. I do exclusively on my Linux desktop, so can't help you there.

iTunes doesn't support FLAC, but it does support ALAC, whose implementation is also open-source. And it has a neat feature where it can store ALAC on your computer, and automatically transcode to a (much smaller) lossy format when syncing to a mobile device.

Yeah, I'm aware, I just feel like FLAC is the more popular, more multi-platform friendly/preferred option, definitely seems to have more momentum behind it, it's easier to buy FLAC then ALAC for one.

Buying options shouldn‘t be a concern at all as long as they are lossless - you simply convert them to the lossless format of your choice. There won‘t be any quality lost. Lossless to lossless is still lossless.

Your format of choice should be dictated by your mobile platform - if you use iOS device or simply like iTunes, go for ALAC. Any decent player will handle FLAC and ALAC, but Apple requires ALAC. If Apple isn‘t a concern for you, there‘s no reason to use anything but FLAC.

Personally, I use ALAC since I use iOS. So far there haven‘t been any downsides.

> Buying options shouldn‘t be a concern at all as long as they are lossless - you simply convert them to the lossless format of your choice. There won‘t be any quality lost. Lossless to lossless is still lossless.

Absolutely, but it's an extra step that to me brings little practical benefit, since FLAC is already the source format & is more widely used practically everywhere outside Apple's ecosystem.

> Your format of choice should be dictated by your mobile platform - if you use iOS device or simply like iTunes, go for ALAC. Any decent player will handle FLAC and ALAC, but Apple requires ALAC. If Apple isn‘t a concern for you, there‘s no reason to use anything but FLAC.

I use iOS as my smartphone platform for now, (waiting for the Librem 5), but Linux on the desktop, so that's why I prefer FLAC. It's worth noting however that iOS itself does support FLACs perfectly well, just iTunes doesn't, (I prefer not to deal with iTunes at all, so not a concern for me), but if you use something like Airsonic, you're set.

I do have a set of AirPlay speakers however, since I wanted something wireless, but still lossless, which kind of means AirPlay is the only option & that does transcode my FLACs to ALAC on the fly, so there's definitely an area where I use ALAC, even if indirectly.

Heh. I'm actually on a Linux desktop but figured most people would reply with an iTunes-based solution. Cmus looks interesting I'd love to hear what your workflow is for converting, naming, tagging, getting artwork, etc.

Heh, nice :-) Yeah, cmus is incredibly convenient for rapid playlist management once you learn the shortcuts, (there's an excellent quick tutorial $ man cmus-tutorial).

I mostly use 7digital & HDTracks to acquire FLACs these days, but when I rip from CDs, I use https://github.com/whipper-team/whipper to do the job.

FLACs from 7d/HDTracks are already named & tagged properly so I only deal with it occasionally and when I do, https://picard.musicbrainz.org works well for acquiring tags & artwork.

When I need to rename/tag manually, https://kid3.sourceforge.io has been working nicely.

Also I haven't used it myself, but there's a lot of positive chatter around https://github.com/beetbox/beets for tagging etc. I just prefer not to have my files touched in such an automated way :-)

I rarely actually convert from FLACs these days, since I have set up Airsonic, (https://github.com/airsonic/airsonic), on my home server. I now have access to the lossless files directly, from anywhere.

When I do convert, I usually just use https://github.com/kassoulet/soundconverter - nothing fancy, but does the job. I do not maintain my whole library in both, lossless & lossy formats since I have set up Airsonic, but when I do want to save data & do not have access to WiFi, I just let Airsonic use lame to transcode to MP3s on the fly, (rare). If you cannot do that, don't have regular access to data on the go etc. I'd honestly just use https://ecasound.seul.org/ecasound/Documentation/examples.ht... and put it in a script that checks if a .flac file in a folder or subfolder has a corresponding .mp3/.ogg file and convert if not, then just use find to filter out the format I don't want to copy over. :-)

Awesome. Thank you for a thorough response. Airsonic looks like just what I want, too. I have a FreeNAS system and would love to centralize my music catalog there.

Over the years I've ripped my CDs maybe 4 or 5 times. I used to have a PowerBook G4 and an early iPod, so I ripped to M4A/AAC. Nothing else played that, so then I went MP3 with storage limitations of the day dictating bitrate. Now, I just want to rip to FLAC and never deal with that again.

On Windows "foobar2000" is fantastic for playback and transcoding, looks pretty basic, but performs well and has lot's of plugins to modify look and feel as well as extra functionality.

On Mac, XLD is great for ripping and transcoding, but I'm not sure what's the hot favourite for playback these days.

Thanks for the pointer. I'm largely on Linux and my wife largely on Mac, but I'm sure I can spin up a VM somewhere if the software is worth it.

Oh snap! Haven't used Windows or Mac outside of occasional work use for >10 years - all BSD or Linux (mostly Debian since then)... I've heard good reports from people using foobar2000 under Wine, but on Linux there's many fine options depending on your preferences - Audacious or Deadbeef are more like foobar, or there's Quod Libet or Ex Falso if you prefer something "bigger". Personally I haven't used these GUI players for a while as I tend to have a terminal window always open and just point `mpv` to a directory, playlist or file. I use `ffmpeg` (compiled with recent codecs) for transcoding and for ripping there's `RubyRipper` or `abcde`.

I use an older version of Media Monkey on the PC. I would have upgraded to a newer version but they removed the interface to the LAME encoder. This was before the patents expired so I should check them out again, but the old version does everything I need. I quite like it.

I made comment a little further up before I saw this, but there's lossless format that iTunes and Apple devices support called ALAC. You can convert to and from FLAC files with avconv.

I've been ripping to FLAC, and then convert to ALAC via avconv. The ALAC files go into iTunes, FLAC files stay on my server as an "archive". I then let iTunes convert the files it syncs to my phone / ipad to which ever size I need for that device, and I can still listen to uncompressed songs when I'm at my desk.

I keep the Flac around in case sometime in the future I want to change formats for whatever reason.

Why do you think FLAC is better than ALAC for your archive? They are both open source, lossless formats.

This is pretty reasonable. 16/44.1 FLACs aren't that large, especially considering that 4TB HDDs are available for $70 these days.

I do the same. MP3s of yy entire CD collection sit on an SD card in my car and a Sandisk Ultra Fit USB drive in my wife's car. The FLAC files live on an external USB drive in my home.

I still have Spotify for the times I want to listen to something I don't own or want to listen to one specific song without drilling down multiple menus to find it.

Do you manually convert to mp3? iTunes has an option to convert lossless audio to a lossy, space saving AAC at a bitrate of your choice on the fly when syncing to an Apple device. I‘m sure there are similar solutions in Android land.

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