-vf scale=960:-1
: scale the resolution to960*a
(a is calculated automatically)-b:v
: set video bitrate in bps-r
: framerate in FPS-b:a
: set audio bitrate in bps-af "volume=15dB"
: add a filter to increase audio volume-preset veryslow
: controls compression quality
ffmpeg -i .\VID_20220428_140425.mp4 \
-c:v h264 -vf scale=960:-1 -b:v 2M -r 24 \
-c:a aac -b:a 96k -af "volume=15dB" \
-preset veryslow \
out_15db.mp4
See also https://stackoverflow.com/a/36324719
ffmpeg -i ./VID_20220428_140425.mp4 -map a -q:a 0 bgm.mp3
ffmpeg -i input.aac -i input.mp4 output.mp4
See also http://sox.sourceforge.net/sox.html, search for "noisered".
noisered [profile-file [amount]]
How much noise should be removed is specified by amount-a number between 0 and 1 with a default of 0.5. Higher numbers will remove more noise but present a greater likelihood of removing wanted components of the audio signal.
sox music.mp3 -n noiseprof noise.prof
sox music.mp3 noisered noise.prof 0.1
gain [−e|−B|−b|−r] [−n] [−l|−h] [gain-dB]
Apply amplification or attenuation to the audio signal, or, in some cases, to some of its channels.
sox in.mp3 out.mp3 gain +6
ffmpeg -ss 00:01:00 -to 00:02:00 -i input.mp4 -c copy output.mp4