Julian Rakuschek - 2023-04-11
ffmpeg
video
audio
editing
A small helper script to increase the volume of a video:
# $1 contains input video, $2 contains db increase
cp $1 $1_safe.mp4
ffmpeg -i $1 -vn -acodec aac a1.m4a
# Remove Audio
ffmpeg -i $1_safe.mp4 -c copy -an a2.mp4
# Increase by $2 db
ffmpeg -i a1.m4a -filter:a "volume=$2dB" a3.m4a
# Merge audio and video file
ffmpeg -i a2.mp4 -i a3.m4a -map 0:v -map 1:a -c copy -y $1_.mp4
# Cleanup
rm a1.m4a
rm a2.mp4
rm a3.m4a
rm $1_safe.mp4