Thursday, June 15, 2017

convert-ToMp3.ps1 Powershell script for ffmpeg or vlc player

6/15/2017: Sometimes, you just need to convert that video into an mp3 file. You, know, something to take along in the car. Something to spin at your next 'rave' (ho-hum). :P

So what I have here, is a Powershell 'wrapper' for ffmpeg or VLC Player's native ability to convert video's to Mp3. Sure, you could use ffmpeg's command line, (or VLC's Media > Convert\Save menu). But sometimes you want to convert a whole batch, or directory, or recursive directory tree! And that is exactly where this .ps1 comes in.

All you need to do is download and install one or both of the above. I've found that ffmpeg works more consistently and bug-free than VLC. But take your pick. And then get-content c:\path-to-videos\. and pipeline them into the script, and you're off to the mp3 races. Docs and examples are in the script comments.

Here's a Gist outlining the key bits of the broader script code

No comments:

Post a Comment