On 2020-11-15, Juan R. de Silva <juan.r.d.si...@gmail.com> wrote:
> I use cron job to run VLC several times a day at predefined times. Each 
> time a different mp3 file is played and I need to set different audio 
> volume for each file. I also need to make it working unattended.
>
> I can set the volume by executing 'pactl set-sink-input-volume X Y%' but 
> to do it I need to know in advance X number, which is Sink Input number 
> used by VLC on every run. The problem is that VLC changes Sink Input on 
> each consequitive run.
>
> The correct number can be obtained by executing 'pactl list sink-inputs' 
> while VLC is run but this requieres my involvement.
>
> Is there any way either to get the VLC Input Sink # programmatically, or 
> to make VLC using the same Input Sink it used at each previous run, or 
> let say some default Input Sink?
>
> If somebody can suggest another way to achieve the desired, please 
> suggest. For example, can anyone suggest a media player, which can accept 
> a desired volume level as a command line argument? Any other ideas?

Normalize the volume of the mp3 files beforehand rather than adjusting
the volume of the player in real time for each individual file (e.g.
with an app like python-rgain)? 

Or does this not speak to the reason for the volume changes?


> Thanks.

Reply via email to