Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 28 lines (23 sloc) 887 Bytes
# This script takes a movie *.mov file and outputs with its normalized audio and compressed video
# Dependancies: brew install ffmpeg sox
# USAGE in the command line:
# norm
USAGE="Usage: `basename $0` [screencast-file]"
if [ $# -ne 1 ]; then
echo $USAGE;
exit -1;
ffmpeg -i $1 -c copy temp.mp4
echo "Created mp4"
ffmpeg -i temp.mp4 audio.wav
echo "Extracted audio to audio.wav"
sox audio.wav temp.wav compand 1,2 -80,-80,-55,-15,-10,-10,0,0 -7 -30 1 &&
sox temp.wav leveled-output.wav --norm
echo "Normalise audio to leveled-output.wav"
echo "Overwrite? [y/N]"
ffmpeg -i temp.mp4 -i leveled-output.wav -vcodec copy -acodec aac -strict experimental -ac 2 -ab 114k -map 0:0 -map 1:0 $FILENAME.mp4
echo "Recombined audio in mp4"
rm temp.mp4 audio.wav leveled-output.wav temp.wav
echo "SUCCESS: Normalised audio with video is created"