Skip to content

Commit

Permalink
post: journal entry week starting 2 December 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
practicalli-johnny committed Dec 5, 2024
1 parent 427a136 commit 6862969
Showing 1 changed file with 89 additions and 0 deletions.
89 changes: 89 additions & 0 deletions docs/posts/2024/december/02.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
---
title: Long Cold Winter
date: 2024-12-02
authors:
- practicalli
categories:
- practicalli
tags:
- neovim
- codec
- opus
---

Converted some audio files to Opus codec, which provides a really optimum compression and allows for relatively low bit rates and results in much smaller files with the same quality.

Neovim upcoming changes

- neovim 0.11
- astronvim v5
- [mason-tool-installer.nvim](https://github.com/WhoIsSethDaniel/mason-tool-installer.nvim) to simplify mason config in astronvim v5 - discussed in Atronvim Discord community

<!-- more -->


## converting audio with

The Opus codec has excellent compression ability and music and spoken word can be encoded in a relatively low bit rate.

128k variable bit rate encoding provides near transparent encoding. libopus uses [variable bit rate by default](https://ffmpeg.org/ffmpeg-codecs.html#libopus-1).

Opus recommended bit rates are:

- Music: 96 to 128k (I use 96k)
- Audiobooks: 32k

I had some books that were already encoded at 96k bit rate. Converting them to 32k bit rate reduced the file size by a third without any noticeable drop in quality.

Using zsh pattern matching allows for a very simple script to convert multiple files in the current directory, saving them in a separate `32k` directory (otherwise the script may have converted all the new opus files it created).

!!! EXAMPLE "Convert Opus encoded files to 32k bit rate"

```shell
#!/usr/bin/zsh

# Convert Opus audio files to 32k bitrate
# zsh specific parsing of current directory
# converted files saved in `32k` directory

for x in *.opus ; do
ffmpeg -i "$x" -b:a 32k -c:a libopus "32k/${x:r}".opus
done
```

!!! EXAMPLE "Convert raw WAV files to Opus 96k bit rate"

```shell
#!/usr/bin/zsh

# Convert wav files to 96k bit rate Opus encoded files
# zsh specific parsing of current directory

for x in *.wav ; do
ffmpeg -i "$x" -b:a 96k -c:a libopus "${x:r}".opus
done
```


## Book List

I have time to read and reread some of the physical books before I dispatch them to one of the book buying companies for a second chance at life.

- The Goal - Goldratt
- Critical Path - Goldratt
- Its Not Luck - Goldratt
- The Mythical Man Month (20th anniversary edition) - Fred Brooks
- Death March - Yourdon
- Agile Retrospectives (there is a 2nd edition to read)


---
Thank you.

[:globe_with_meridians: Practical.li Website](https://practical.li){target=_blank .md-button}

[:fontawesome-brands-github: Practical.li GitHub Org](https://github.com/practicalli){target=_blank .md-button}
[:fontawesome-brands-github: practicalli-johnny profile](https://github.com/practicalli-johnny){target=_blank .md-button}

[:fontawesome-brands-mastodon: @practicalli@clj.social](https://clj.social/@practicalli){target=_blank .md-button}
[:fontawesome-brands-twitter: @practical_li](https://twitter.com/practcial_li){target=_blank .md-button}

0 comments on commit 6862969

Please sign in to comment.