Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #script requires VLC to be installed
- #does not like apostrophes in filename
- #Bit rates range from 96 to 320 kilobytes per second (Kbps). Using a bit rate of 128 Kbps usually results in a sound quality equivalent to #what you'd hear on the radio. Many music sites and blogs urge people to use a bit rate of 160 Kbps or higher if they want the MP3 file to #have the same sound quality as a CD.
- $outputExtension = ".mp3"
- $bitrate = 320
- $channels = 2
- foreach($inputFile in get-childitem -recurse -Filter *.wav)
- {
- $outputFileName = [System.IO.Path]::GetFileNameWithoutExtension($inputFile.FullName) + $outputExtension;
- $outputFileName = [System.IO.Path]::Combine($inputFile.DirectoryName, $outputFileName);
- $programFiles = ${env:ProgramFiles(x86)};
- if($programFiles -eq $null) { $programFiles = $env:ProgramFiles; }
- $processName = $programFiles + "\VideoLAN\VLC\vlc.exe"
- $processArgs = "-I dummy -vvv `"$($inputFile.FullName)`" --sout=#transcode{acodec=`"mp3`",ab=`"$bitrate`",`"channels=$channels`"}:standard{access=`"file`",mux=`"wav`",dst=`"$outputFileName`"} vlc://quit"
- start-process $processName $processArgs -wait
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement