Skip to content

Instantly share code, notes, and snippets.

View AnthonyLloyd's full-sized avatar

Anthony Lloyd AnthonyLloyd

View GitHub Profile
@bradwilson
bradwilson / ConvertTo-MP3.ps1
Last active March 9, 2020 18:33
Converts FLAC/MP3 input, resamples down to ReplayGain levels, and converts to MP3. Requires on the path: flac, metaflac, ffmpeg, mogrify
param(
[string][Parameter(Mandatory=$true)]$InputFile,
[string][Parameter(Mandatory=$true)]$OutputFile,
[int]$SampleRate = 44100,
[string]$BitRate = "160k"
)
$ErrorActionPreference = "Stop"
$InputFile = [System.IO.Path]::Combine((Get-Location), $InputFile)