Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- function asdf(){
- mv "$1" "$1 (backup)"
- ffmpeg -i "$1 (backup)" -map 0 -map -0:a:1 -c copy "$1"
- }
- if (( $# >= 1 ));then
- export -f asdf
- echo "The second audio track will be removed from the following files:"
- find "$1" -iname *".mp4"
- echo "Continue? [ y / n ]"
- read qwer
- if [[ "$qwer" == "y"* ]] || [[ "$qwer" == "Y"* ]]; then
- find "$1" -iname *".mp4" -exec bash -c "asdf \"{}\"" \;
- else
- echo "Canceled."
- fi
- else
- echo "Usage: $0 <Destroy All Humans! dir>"
- echo "This will find and remove the second audio track(the German track) from all videos in the given directory (Destroy All Humans!)."
- echo "A backup of each video will be made first and appended with \"(backup)\", in case something goes wrong."
- echo "You are free to delete the backups if everything is working just fine."
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement