Skip to content
This repository was archived by the owner on Nov 8, 2018. It is now read-only.

Examples

Jeremy Herbison edited this page Jan 26, 2015 · 7 revisions

This command simply converts a folder full of FLAC files into MP3s:

Get-AudioFile *.flac  | Export-AudioFile "Lame MP3" C:\Output

To get a list of available encoders:

Get-AudioEncoderInfo

To get information about the Lame encoder, including the default and available settings:

Get-AudioEncoderInfo "Lame MP3"

Add ReplayGain 2.0 to your entire FLAC library, treating each directory as a separate album:

Get-ChildItem C:\Users\Myself\Music -Directory -Recurse | % { $_ | Get-ChildItem -File -Filter *.flac | Measure-AudioFile "ReplayGain 2.0" -PassThru | Save-AudioFileMetadata }

Convert your whole FLAC library to VBR AAC, with SoundCheck tags calculated from album ReplayGain information:

Get-ChildItem C:\Users\Myself\Music -Filter *.flac -Recurse | Get-AudioFile | Export-AudioFile "Apple AAC" "C:\Output\{Artist}\{Album}" -Name "{TrackNumber} - {Title}" -Setting @{AddSoundCheck = "Album"}

Convert your whole FLAC library to VBR MP3, with ReplayGain directly applied to the resulting volume levels:

Get-ChildItem C:\Users\Myself\Music -Filter *.flac -Recurse | Get-AudioFile | Export-AudioFile "Lame MP3" "C:\Output\{Artist}\{Album}" -Name "{TrackNumber} - {Title}" -Setting @{ApplyGain = "Album"}

Convert your whole FLAC library to VBR AAC, with embedded cover art retrieved from images located in each subdirectory. Embedded images are scaled and/or converted to JPEG for efficiency, where necessary:

foreach ($directory in Get-ChildItem C:\Users\Myself\Music -Directory -Recurse)
{
    $cover = $directory | Get-ChildItem -File -Include *.png,*.jpg | Get-AudioCoverArt | Convert-AudioCoverArt -MaxWidth 500 -ConvertToLossy
    $files = $directory | Get-ChildItem -File -Filter *.flac | Get-AudioFile

    if ($files -and $cover)
    {
        $files | Set-AudioFileCoverArt $cover
    }

    $files | Export-AudioFile "Apple AAC" "C:\Output\{Artist}\{Album}" -Name "{TrackNumber} - {Title}"
}
Clone this wiki locally