Video editing: Adjusting the volume level of an audio track without touching the video?

I’m occasionally recording snippets of video with AMD ReLive while playing games, and that works just fine except that the recorded in-game audio volume is way too low for putting any clips up on Youtube. As there is presently no volume adjustment tool on Youtube itself I would like to find a way to reencode the audio track without at the same time having to reencode the video for no real reason. (MP4 H.264, AAC stereo)

One might think that it shouldn’t be a big hurdle in 2017, but googling around has netted me no clear result. Would I have to get something like Adobe Premiere to be able to do this?

Why don’t you use Audacity to record the audio and if needed use it instead of the original audio?

You can do it with Handbrake - adjust the audio gain

Audio tab>config def> gain

and you can do it with ffmpeg but you will need to find the cli commands for that

Handbrake might recompress. FFmpeg is the better way to go.

I’m hoping to have a power user’s guide for FFmpeg out soon.

2 Likes

Normally, for recording, you set the volume on all of the software to maximum, both in the taskbar and in-game. Then, on your hardware speakers, turn the volume really low so you can hear it comfortably. The software will then record the audio at the appropriate level.


Anyway, the ffmpeg command you are looking for is:

ffmpeg -i "C:\Users\User\Recordings\relive.mp4" -af "volume=2.5" -c:v copy relive-fixed.mp4

Experiment with the volume level. 3.0-3.5 is probably the highest you should go. 4.0 can sound very distorted.

I normally also specify stereo audio with -ac 2, the audio codec -c:a aac and audio bitrate -b:a 128k:

ffmpeg -i "C:\Users\User\Recordings\relive.mp4" -ac 2 -c:a aac -b:a 224k -af "volume=2.5" -c:v copy -y relive-fixed.mp4

-y means override without prompting. -c:v copy means copy the video stream into the target file without making any changes to it. Sometimes the mp4 container cannot hold the codecs properly so if you get an error try relive-fixed.mkv instead.

Here is a step-by-step guide for installation. See this related guide as well.


It should also be trivial to create a small .bat file that will fix the volume automatically. The idea would be to take the recorded video and drop it onto the script’s icon and have it fix the audio track automatically.

3 Likes

Good old ffmpeg, bloody marvellous!

I’ll keep testing and currently the following line in a batch file is doing a great job for me. Dropping a video file onto it adjusts the volume and creates a new one based on the old file name. Thanks!

ffmpeg -i %1 -ac 2 -c:a aac -b:a 192k -af “volume=3.5” -c:v copy -y %1_adjusted.mp4

Edit2: I’ll toy with the “-filter:a loudnorm” option as well, though normalization has its own pro’s and con’s.

Edit: On the volume settings while recording; I had already managed to get useable settings for when I game on my speakers, but when switching to headset (like when playing with friends) the volume becomes another beast entirely. I could probably find a set of manual settings that would work better there too, but requiring me to redo a set of sliders every time I switch between speakers and headset felt like a bit much. I’d rather just reencode the audio, lol. :slight_smile:

1 Like