Skip to content

Commit

Permalink
update: journal entry week starting 10 February
Browse files Browse the repository at this point in the history
  • Loading branch information
practicalli-johnny committed Feb 16, 2025
1 parent fdaa3f4 commit debdb6e
Showing 1 changed file with 33 additions and 3 deletions.
36 changes: 33 additions & 3 deletions docs/posts/2025/february/10.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: First glimpse of Spring
date:
created: 2025-02-10
updated: 2025-02-15
updated: 2025-02-16
authors:
- practicalli
categories:
Expand All @@ -14,18 +14,48 @@ tags:
draft: false
---

A sunny day at the end of the week inspired me to get out on my road bike, doing some [important bike maintenance](#cycling)
A sunny day at the end of the week inspired me to get out on my road bike, once essential [bike maintenance](#cycling) was completed.

Saturday Park Run was the first in over a year and it was very challenging. My time was 39 minutes and 25 seconds, around 9 minutes slower than my personal best so there is a long road ahead to a reasonable fitness.

April is the start of a new tax year in the UK so time for a [personal financial review](#finances).

This weeks digital music organisation included [The Cranberries](https://en.wikipedia.org/wiki/The_Cranberries), an excellent Irish rock band.
This weeks digital music organisation included [The Cranberries](https://en.wikipedia.org/wiki/The_Cranberries), an excellent Irish rock band. [The Mission](https://en.wikipedia.org/wiki/The_Mission_(band)) and [Fields Of The Nephilim](https://en.wikipedia.org/wiki/Fields_of_the_Nephilim) unleashed my inner Goth.

![Ribble Endurance SL Disc road bicycle](https://c02.purpledshub.com/uploads/sites/39/2019/05/DSC_6888-2827ed4-e1568023172553.jpg){loading=lazy}


<!-- more -->


## Digital Music

ffmpeg is a versatile tool for converting audio and video formats and has a huge amount of options that I dont really want to keep looking up for common tasks.


Using `*.{wav,flac,mp3,opus}` in the `for` expression will fail as it expects to find at least 1 file for each of the file name extensions listed in the collection, e.g. if none of the files end in `.wav` then the `for` expression will fail even if there are files with one of the other file name extensions.

`*.(wav|flac|mp3|ogg)` uses the `Or` pattern (`|`) so will succeed if there is at least one file that contains one of the file name extensions, e.g. if there is a `.wav` file then the script succeeds even if the directory does not contain any of the other file name extensions.


!!! EXAMPLE "Convert music file to Opus format"
```shell
#!/usr/bin/zsh

# Convert audio files (.wav, .flac, .mp3) in current directory to Opus format
# zsh specific parsing of current directory
# `*.(wav|flac|mp3)` matches file name with any of the wav, flac or mp3 file extensions
#
# libopus uses variable bit rate by default - https://ffmpeg.org/ffmpeg-codecs.html#libopus-1
# 96 to 128k bit rate recommended for Music
# 128k variable bit rate encoding provides near transparent encoding

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


## Finances

Its that time of the year to review my tax position for the 2024-25 tax year. I earned sufficient to pay tax in the highest band, so I am reviewing if I need to increase my personal pension contributions to offset the tax paid for the year.
Expand Down

0 comments on commit debdb6e

Please sign in to comment.