Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ls -recurse -include *.flac | %{C:path_to_ffmpegffmpeg.exe -i $_.FullName -acodec alac ($_.DirectoryName+"\"+$_.BaseName+'.m4a')}
- Encode Tool : path to iTunesEncode.exe
- Extension : m4a
- Parameters : -d -e "Lossless Encoder" -a "%artist%" -l "%album%" -t "%title%" -g "%genre%" -y %date% -n %tracknumber% -i %s -o %d
- Format is: lossless
- next propery : 24
- DisplayInfo example :
- "Encoder name" - iTunes
- "Bitrate" - 1000
- "Setting" - Apple Lossless
- $folder = "d:demo"
- # Convert flac to wav
- Get-ChildItem -Recurse "$folder*.flac" | ForEach-Object {
- & C:toolsflac.exe -d --force --silent $_.FullName
- }
- # Convert wav to alac
- Get-ChildItem -Recurse "$folder*.wav" | ForEach-Object {
- $filename = [System.IO.Path]::ChangeExtension($_.FullName, ".m4a")
- & C:toolsffmpeg.exe -hide_banner -loglevel panic -i $_.FullName -acodec alac -sample_fmt s16p $fileName
- }
- # Remove wav and flac file
- Get-ChildItem -Recurse "$folder*.wav" | Remove-Item
- Get-ChildItem -Recurse "$folder*.flac" | Remove-Item
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement