Convert-ToMP3 (modification of post by view diff)
View followups from CrazyDave | embed code: <script type="text/javascript" src="http://PoshCode.org/embed/1501"></script>download | new post
This script uses VLC to convert an audio file to MP3 format. It makes the assumption that you have an Alias “vlc” that points to the VLC executable.
- param([String] $inputPath, [String] $wildcard, [String] $outputPath = $inputPath
- gci -path $inputPath\$wildcard | % {
- $outputFile = Join-Path $outputPath ($_.Name.Replace($_.Extension, '.mp3'))
- vlc -I dummy $_.FullName ":sout=#transcode{acodec=mp3,ab=128,channels=6}:standard{access=file,mux=asf,dst=$outputFile}" vlc://quit
- Get-Process vlc | % { $_.WaitForExit() }
- }
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.
PowerShell Code Repository