notes/Fade all Video Clips in a folder MELT MLT-yE7V82qX.sh
#!/bin/bash
#Script by Kris Occhipinti
#http://filmsbykris.com
#GPLv3 - http://www.gnu.org/licenses/gpl-3.0.txt
#Source code https://github.com/metalx1000/Video-and-Film-Scripts
#This Script is designed to fade all video clips in a folder
if [ $# -lt 2 ]
then
echo "Useage: $0 <file type> <fade length in frames> <output dir>"
echo "Example: $0 MOV 30 /tmp/output"
exit 0
fi
ext=$1
len=$2 #fade length in frames
outputdir="$3"
echo "creating \"$outputdir\""
mkdir -p "$outputdir" || e="error"
if [ "$e" = "error" ]
then
echo "Can't create $outputdir"
exit 1
fi
x=""
for i in *.$ext
do
x="$x $i -mix $len -mixer luma -mixer mix:-1"
done
x="melt$x -consumer avformat:${outputdir}/fade_$(date +%s).$ext b=220000k acodec=mp2 ab=128k"
eval $x
syntax highlighted by Code2HTML, v. 0.9.1