Convert FLAC files to Opus

by jz on 2013-10-22

If you have a large library of FLAC encoded music and want to put it on a device with limited storage like an Android tablet or phone, Opus is a great choice. Just make sure you have a player like VLC that can have support for the codec.

To convert FLAC files to Opus you will need opus-tools installed. Then you can use the opusenc program.

for i in *.flac; do opusenc --bitrate 256 "$i" "$i.opus"; done

You can experiment with the bit rate if you like, 256 produces a quality that is probably indistinguishable from the FLAC file for most people.

The resulting files will be in the format file.flac.opus, if you would like to strip away the double file extension see this post.

There is 1 comment in this article:

  1. Quickly remove double file extensions in bash - tar.jz says: [2013-10-23]

    […] If you converted your FLAC to Opus after reading this post you can remove the redundant extension. […]