Created
January 11, 2013 09:29
-
-
Save imrehg/4509280 to your computer and use it in GitHub Desktop.
Normalize the audio for a video file and combine it back
This file contains hidden or 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 | |
fullname=$1 | |
filename=$(basename "$fullname") | |
extension="${filename##*.}" | |
filename="${filename%.*}" | |
if [ -f "audio.wav" ] | |
then | |
rm audio.wav | |
fi | |
ffmpeg -i "$fullname" -c:a pcm_s16le audio.wav | |
normalize audio.wav | |
ffmpeg -i "$fullname" -i audio.wav \ | |
-map 0:0 -map 1:0 -c:v copy \ | |
-c:a libmp3lame -b:a 192k \ | |
"${filename}_normalized.${extension}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment