Created
April 28, 2022 11:46
-
-
Save b9AcE/5a5b848291cdbb9b43ba66887e8e6cea to your computer and use it in GitHub Desktop.
FFmpeg comand bourne shell script
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 | |
# | |
# /usr/local/bin/compand | |
# | |
# Bourne shell scriptlet that takes all the files with the mp4 suffix in the current working directory and runs | |
# FFmpeg's "compress and expand"-filter with pre-selected parameters on them with output to a subdirectory named "compand" | |
# or if there are arguments run the same once per argument. | |
# | |
\/bin/mkdir -p compand | |
if [ "$#" -eq 0 ]; then | |
for file in *.mp4 ; do | |
\/usr/bin/ffmpeg -i ${file} -n -filter_complex 'compand=attacks=0:points=-80/-900|-45/-15|-27/-9|0/-7|20/-7' -vcodec copy compand/${file} ; | |
done | |
else | |
for input in "$@" ; do | |
\/usr/bin/ffmpeg -i ${input} -n -filter_complex 'compand=attacks=0:points=-80/-900|-45/-15|-27/-9|0/-7|20/-7' -vcodec copy compand/${input} | |
done | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment