Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. ls -recurse -include *.flac | %{C:path_to_ffmpegffmpeg.exe -i $_.FullName -acodec alac ($_.DirectoryName+"\"+$_.BaseName+'.m4a')}
  2.  
  3. Encode Tool : path to iTunesEncode.exe
  4. Extension : m4a
  5. Parameters : -d -e "Lossless Encoder" -a "%artist%" -l "%album%" -t "%title%" -g "%genre%" -y %date% -n %tracknumber% -i %s -o %d
  6. Format is: lossless
  7. next propery : 24
  8.  
  9. DisplayInfo example :
  10. "Encoder name" - iTunes
  11. "Bitrate" - 1000
  12. "Setting" - Apple Lossless
  13.  
  14. $folder = "d:demo"
  15.  
  16. # Convert flac to wav
  17. Get-ChildItem -Recurse "$folder*.flac" | ForEach-Object {
  18. & C:toolsflac.exe -d --force --silent $_.FullName
  19. }
  20.  
  21. # Convert wav to alac
  22. Get-ChildItem -Recurse "$folder*.wav" | ForEach-Object {
  23. $filename = [System.IO.Path]::ChangeExtension($_.FullName, ".m4a")
  24. & C:toolsffmpeg.exe -hide_banner -loglevel panic -i $_.FullName -acodec alac -sample_fmt s16p $fileName
  25. }
  26.  
  27. # Remove wav and flac file
  28. Get-ChildItem -Recurse "$folder*.wav" | Remove-Item
  29. Get-ChildItem -Recurse "$folder*.flac" | Remove-Item
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement