RedditPP Mascot

RedditPP

r/DataHoarder • … • u/ASatyros

Audio converting guide (ffmpeg, powershell 7, windows, parallel and recursive)

Hi,

Just wanna share my simple work flow for handling audio converting, maybe someone will find it useful.

Also it's parallel - uses all cores of CPU, so it's much faster.

Parallel works only in powershell version 7 and up, so you need to get that before running the script.

`cd` to directory where you have files, converts recursively every file in every folder bellow.

copy-paste from notepad (to clear formatting) to run it

## .wav to .flac:

```powershell Get-ChildItem -Recurse -Filter *.wav | ForEach-Object -Parallel { $outfile = Join-Path $_.DirectoryName "$($_.BaseName).flac" ffmpeg -y -i $_.FullName -c:a flac -compression_level 12 $outfile } ```

## .flac to .opus (160K is enough for "transparency" XD)

```PowerShell Get-ChildItem -Recurse -Filter *.flac | ForEach-Object -Parallel { $outfile = Join-Path $_.DirectoryName "$($_.BaseName).opus" ffmpeg -y -i $_.FullName -c:a libopus -b:a 160k $outfile } ```

## .wav to .opus (160K is enough for "transparency" XD)

```PowerShell Get-ChildItem -Recurse -Filter *.wav | ForEach-Object -Parallel { $outfile = Join-Path $_.DirectoryName "$($_.BaseName).opus" ffmpeg -y -i $_.FullName -c:a libopus -b:a 160k $outfile } ```

After that you can use Everything (Void Tools) to clean up source files.

I'm sure there is a way to make in neater, but I need some flexibility it this works for me :D

— 0