Last active
September 26, 2021 11:51
-
-
Save shellus/69fd04c79f35fa875d3390ce2978c7b2 to your computer and use it in GitHub Desktop.
ffmpeg multiple processes directory videos
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/bash | |
set -e | |
handler(){ | |
path=$@ | |
filename=$(basename "${path}") | |
basename=${filename%.*} | |
dirname=$(dirname "${path}") | |
newname=$dirname/$basename.mp4 | |
ffmpeg -i "$path" "$newname" | |
} | |
export -f handler | |
find $1 -name '*.avi' -exec bash -c 'handler "{}"' \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment