aboutsummaryrefslogtreecommitdiff
path: root/content/blog/2022-07-30-flac-to-opus.org
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2025-11-11 22:49:13 -0600
committerChristian Cleberg <[email protected]>2025-11-11 22:49:13 -0600
commit51a7a02f0c96d49b68fbcc155414c218207fa270 (patch)
tree845af8aad0e8769352efc02fcd1044eed9cc1ec1 /content/blog/2022-07-30-flac-to-opus.org
parent7d3e80ebf1dc770eac0e21890b74f18ba2d15a6b (diff)
downloadcleberg.net-51a7a02f0c96d49b68fbcc155414c218207fa270.tar.gz
cleberg.net-51a7a02f0c96d49b68fbcc155414c218207fa270.tar.bz2
cleberg.net-51a7a02f0c96d49b68fbcc155414c218207fa270.zip
fix grammar in 2022 posts
Diffstat (limited to 'content/blog/2022-07-30-flac-to-opus.org')
-rw-r--r--content/blog/2022-07-30-flac-to-opus.org73
1 files changed, 35 insertions, 38 deletions
diff --git a/content/blog/2022-07-30-flac-to-opus.org b/content/blog/2022-07-30-flac-to-opus.org
index 36d9fe7..0c1910e 100644
--- a/content/blog/2022-07-30-flac-to-opus.org
+++ b/content/blog/2022-07-30-flac-to-opus.org
@@ -6,17 +6,15 @@
* Converting FLAC to OPUS
I am currently rebuilding my music library from scratch so that I can
-effectively archive all the music I own in the
-[[https://en.wikipedia.org/wiki/FLAC][FLAC file format]], a lossless
-audio codec.
+effectively archive all the music I own in [[https://wikipedia.org/wiki/FLAC][FLAC]] (Free Lossless Audio Codec)
+files.
-However, streaming FLAC files outside the home can be difficult due to
-the size of the files, especially if you're using a weak connection.
+However, streaming FLAC files outside the home can be difficult due to the size
+of the files, especially if you're using a weak connection.
-So, in order to archive the music in a lossless format and still be able
-to stream it easily, I opted to create a copy of my FLAC files in the
-[[https://en.wikipedia.org/wiki/Opus_(audio_format)][Opus audio codec]].
-This allows me to archive a quality, lossless version of the music and
+So, in order to archive the music in a lossless format and still be able to
+stream it easily, I opted to create a copy of my FLAC files in the [[https://en.wikipedia.org/wiki/Opus_(audio_format)][Opus audio
+codec]]. This allows me to archive a quality, lossless version of the music and
then point my streaming service to the smaller, stream-ready version.
** Dependencies
@@ -28,39 +26,38 @@ proceeding, install the package:
sudo apt install opus-tools
#+end_src
-If you want to use a different conversion method, such as =ffmpeg= or
-=avconv=, simply install that package instead.
+If you want to use a different conversion method, such as =ffmpeg= or =avconv=,
+simply install that package instead.
** Conversion Process
-The script I'm using is stored in my home directory, but feel free to
-create it wherever you want. It does not need to be in the same
-directory as your music files.
+The script I'm using is stored in my home directory, but feel free to create it
+wherever you want. It does not need to be in the same directory as your music
+files.
#+begin_src sh
cd ~ && nano transform.sh
#+end_src
-Once you have your new bash script opened in an editor, go ahead and
-paste the following logic into the script.
+Once you have your new bash script opened in an editor, go ahead and paste the
+following logic into the script.
You *MUST* edit the following variables in order for it to work:
- =source=: The source directory where your FLAC files are stored.
-- =dest=: The destination directory where you want the resulting Opus
- files to be stored.
+- =dest=: The destination directory where you want the resulting Opus files to
+ be stored.
You *MAY* want to edit the following variables to suit your needs:
-- =filename=: If you are converting to a file format other than Opus,
- you'll need to edit this so that your resulting files have the correct
- filename extension.
-- =reldir=: This variable can be edited to strip out more leading
- directories in the file path. As you'll see later, I ignore this for
- now and simply clean it up afterward.
-- =opusenc=: This is the actual conversion process. You may want to edit
- the bitrate to suit your needs. I set mine at 128 but some prefer 160
- or higher.
+- =filename=: If you are converting to a file format other than Opus, you'll
+ need to edit this so that your resulting files have the correct filename
+ extension.
+- =reldir=: This variable can be edited to strip out more leading directories in
+ the file path. As you'll see later, I ignore this for now and simply clean it
+ up afterward.
+- =opusenc=: This is the actual conversion process. You may want to edit the
+ bitrate to suit your needs. I set mine at 128 but some prefer 160 or higher.
#+begin_src sh
#!/bin/bash
@@ -126,8 +123,8 @@ opusenc --vbr --bitrate 128 --date "$DATE" \
done
#+end_src
-Once you're done, simply save the file and exit your editor. Don't
-forget to enable execution of the script:
+Once you're done, simply save the file and exit your editor. Don't forget to
+enable execution of the script:
#+begin_src sh
chmod +x transform.sh
@@ -139,16 +136,16 @@ Finally, you may now run the script:
./transform.sh
#+end_src
-If you used =opusenc=, you'll see the conversions happen within the
-terminal as it progresses. You will also see variables printed if you
-uncommented any of the bash script's comments.
+If you used =opusenc=, you'll see the conversions happen within the terminal as
+it progresses. You will also see variables printed if you uncommented any of the
+bash script's comments.
** Cleanup
-As I noted above, I didn't customize my =reldir= variable in the script,
-which caused my output directory to be =/mnt/music/library/archives=
-instead of =/mnt/music/library=. So, I moved the output up one level and
-deleted the accidental directory.
+As I noted above, I didn't customize my =reldir= variable in the script, which
+caused my output directory to be =/mnt/music/library/archives= instead of
+=/mnt/music/library=. So, I moved the output up one level and deleted the
+accidental directory.
#+begin_src sh
cd /mnt/music/library
@@ -158,8 +155,8 @@ rm -rf archives
** Check the Resulting Size
-If you want to see what kind of file size savings you've gained, you can
-always use the =du= command to check:
+If you want to see what kind of file size savings you've gained, you can always
+use the =du= command to check:
#+begin_src sh
cd /mnt/music