[FFmpeg-user] Help Needed with FFmpeg – Audio Quality Issue in Final Output
German Geraskin
german.geraskin at gmail.com
Thu Jun 5 10:00:14 EEST 2025
> String command =
>
> '-y -i "$inputVideoPath" -i "$bgMusicPath" '
> '-filter_complex "[0:a]volume=1.5[a0];[1:a]volume=0.1[a1];[a0][a1]amix=inputs=2:duration=first[aout]" '
> '-map 0:v -map "[aout]" -c:v copy -c:a aac -b:a 256k -shortest "$outputPath”';
>
>
> I want the background music to be clear but not overpowering, and the user’s voice to remain clean and prominentin the final output.
>
> Can you please guide me on how to improve this? Any suggestions would be greatly appreciated.
Hi.
Perhaps, the `normalize=1` option of the `amix` filter can help (?).
As a first iteration, try not to use volume correction in the
beginning of the filtergraph.
Instead, use the `weights="1.0 0.07"` option of the `amix` filter.
https://ffmpeg.org/ffmpeg-all.html#amix
More information about the ffmpeg-user
mailing list