slhck / ffmpeg-normalize

Audio Normalization for Python/ffmpeg
MIT License
1.28k stars 118 forks source link

Add an option to make mono audios stereo #267

Closed prldm closed 1 month ago

prldm commented 2 months 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 2 months 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.

slhck commented 1 month ago

Closing for now as the option should be given via:

-e="-ac 2"

Feel free to reopen if you need further help.

slhck commented 1 month ago

Thinking about it more, I think having an explicit option makes sense because it's used more often.

This was added here: b3a705e0c1ae8789dd87d44bc1a29d6dd68cd1f8