Tag: Scrips
Convert any file VLC can play to mp3
I just felt the need for a script that could extract the audio track of a video, transcode it and save it as an mp3 file … 2 hours later I was finished (get the Gist). 😀 It uses VLC to do hard work. 😉
Thanks to Kris Hom for the inspiration. 🙂
Update 2014-03-01:
- Check whether VLC is installed
- Should also work on Linux now
- Increase default bit rate to 192kbit/s
- Fixed bug where the file/playlist would repeat endlessly
Update 2014-11-05:
- Also look for VLC in “~/Application/”
Update 2016-03-05
- Added a ffmpeg version
I found this command line magic gem some time ago and was using it ever since.
I started using it for synchronizing directories between computers on the same network. But it felt kind of clunky and cumbersome to get the slashes right so that it wouldn’t nest those directories and copy everything. Since both source and destination machine had the same basic directory layout, I thought ‘why not make it easier?’ … e.g. like this:
It uses rsync for the heavy lifting but does the tedious source and destination mangling for you. 😀
You can find the code in this Gist.