slhck / ffmpeg-normalize

Audio Normalization for Python/ffmpeg
MIT License
1.24k stars 116 forks source link

Add an option to make mono audios stereo #267

Open prldm opened 1 week ago

prldm commented 1 week ago

:warning: Please read this carefully and edit the example responses! If you do not fill out this information, your feature request may be closed without comment.

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. E.g. “I'm always frustrated when [...]” No.

Describe the solution you'd like A clear and concise description of what you want to happen. When I'm using QLab on an input device, for example, it often happens that the source I get is mono. I always send these source files through ffmpeg-normalize so that I can play sound files with roughly the same loudness and codec by default, but when I convert mono sounds, I sometimes have complications with channel routing, especially when a Dante/AVB system is involved. This could easily be solved with an extra switch, which if specified, forces ffmpeg to use the "-ac 2" switch. It's a universal solution, because actually if the ffmpeg detects the input as stereo by default, the switch does nothing, and if it detects mono, it puts the same track in for both channels.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

slhck commented 1 week ago

Thanks for describing the issue. If I understand correctly, you can achieve what you need with the --extra-output-options option and pass the -ac option there. Please refer to the README for some examples.

The reason why there's not a dedicated option for this (yet) is that I didn't want to map every single ffmpeg option. That said, the audio channel option is used often, so it could make sense to add it explicitly.