Last active
January 16, 2017 04:19
-
-
Save atakane/bcaebef1a1c5dc6ac70cf4445099814d to your computer and use it in GitHub Desktop.
Strip audio from MPG video files within a folder. It automatically creates 44.1 kHz, 192 kbps mp3 files for each video file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This script strips audio from MPG video files within a folder. | |
# It automatically creates 44.1 kHz, 192 kbps mp3 files for each video file. | |
# You need to install "ffmpeg" first. | |
# To run an "sh" file you have to set it as executable | |
# atakan$> chmod +x chmod +x stripAudiofromMpg.sh | |
# after that you can run it in terminal; | |
# atakan$> ./stripAudiofromMpg.sh | |
# find each .mpg files in the current folder, pass them to ffmpeg with a set of parameters to produce mp3 files. | |
for i in *.mpg; do ffmpeg -i "$i" -vn -ar 44100 -ac 2 -ab 192 -f mp3 "$i.mp3"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment