Created
November 2, 2011 15:16
-
-
Save thefotios/1333887 to your computer and use it in GitHub Desktop.
ffmpeg batch conversion script. This script will take in mutlitple files from the command line and process them using the same ffmpeg options.
This file contains hidden or 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
| # Script for converting list of files using ffmpeg | |
| # | |
| # Author: Fotios Lindiakos (fotioslindiakos@gmail.com) | |
| # | |
| # Usage: batch_ffmpeg.sh file1 [file2 file3 ...] | |
| extension=mp3 | |
| options="-y" | |
| for source in "$@" | |
| do | |
| base=$(echo $source | cut -d "." -f1) | |
| target="$base.$extension" | |
| echo "Converting: $source -> $target" | |
| # Do the conversion | |
| ffmpeg $options -i $source $target | |
| # Adjust the modification date | |
| touch --date="$(date -r $source)" $target | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment