Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #228665 > unrolled thread
| Started by | "Juan R. de Silva" <juan.r.d.silva@gmail.com> |
|---|---|
| First post | 2020-11-15 03:40 +0100 |
| Last post | 2020-11-15 22:00 +0100 |
| Articles | 11 — 6 participants |
Back to article view | Back to linux.debian.user
How to manage audio volume unattended. "Juan R. de Silva" <juan.r.d.silva@gmail.com> - 2020-11-15 03:40 +0100
Re: How to manage audio volume unattended. Andrei POPESCU <andreimpopescu@gmail.com> - 2020-11-15 10:00 +0100
Re: How to manage audio volume unattended. Curt <curty@free.fr> - 2020-11-15 13:50 +0100
Re: How to manage audio volume unattended. "Juan R. de Silva" <juan.r.d.silva@gmail.com> - 2020-11-15 22:10 +0100
Re: How to manage audio volume unattended. Curt <curty@free.fr> - 2020-11-16 12:30 +0100
Re: How to manage audio volume unattended. didier gaumet <didier.gaumet@gmail.com> - 2020-11-15 14:20 +0100
Re: How to manage audio volume unattended. didier gaumet <didier.gaumet@gmail.com> - 2020-11-15 15:10 +0100
Re: How to manage audio volume unattended. Dan Ritter <dsr@randomstring.org> - 2020-11-15 15:40 +0100
Re: How to manage audio volume unattended. Brian <ad44@cityscape.co.uk> - 2020-11-15 15:50 +0100
Re: How to manage audio volume unattended. "Juan R. de Silva" <juan.r.d.silva@gmail.com> - 2020-11-15 22:00 +0100
Re: How to manage audio volume unattended. "Juan R. de Silva" <juan.r.d.silva@gmail.com> - 2020-11-15 22:00 +0100
| From | "Juan R. de Silva" <juan.r.d.silva@gmail.com> |
|---|---|
| Date | 2020-11-15 03:40 +0100 |
| Subject | How to manage audio volume unattended. |
| Message-ID | <Bbg7n-Uu-1@gated-at.bofh.it> |
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? Thanks.
[toc] | [next] | [standalone]
| From | Andrei POPESCU <andreimpopescu@gmail.com> |
|---|---|
| Date | 2020-11-15 10:00 +0100 |
| Message-ID | <Bbm38-4sy-7@gated-at.bofh.it> |
| In reply to | #228665 |
[Multipart message — attachments visible in raw view] — view raw
On Du, 15 nov 20, 02:35:39, Juan R. de Silva wrote: > > 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? Apparently mpv supports setting the volume from command line, as does (of course) mpd via mpc. Kind regards, Andrei -- http://wiki.debian.org/FAQsFromDebianUser
[toc] | [prev] | [next] | [standalone]
| From | Curt <curty@free.fr> |
|---|---|
| Date | 2020-11-15 13:50 +0100 |
| Message-ID | <BbpDH-6Ej-5@gated-at.bofh.it> |
| In reply to | #228665 |
On 2020-11-15, Juan R. de Silva <juan.r.d.silva@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.
[toc] | [prev] | [next] | [standalone]
| From | "Juan R. de Silva" <juan.r.d.silva@gmail.com> |
|---|---|
| Date | 2020-11-15 22:10 +0100 |
| Message-ID | <BbxrA-38t-13@gated-at.bofh.it> |
| In reply to | #228681 |
> 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? Unfortunately, it does not in this particular case. However, I might find suggested useful in other cases anyway. Thanks.
[toc] | [prev] | [next] | [standalone]
| From | Curt <curty@free.fr> |
|---|---|
| Date | 2020-11-16 12:30 +0100 |
| Message-ID | <BbKRQ-2Hf-13@gated-at.bofh.it> |
| In reply to | #228696 |
On 2020-11-15, Juan R. de Silva <juan.r.d.silva@gmail.com> wrote: > >> 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? > > Unfortunately, it does not in this particular case. However, I might find > suggested useful in other cases anyway. Have you tried pactl 'set-sink-volume @DEFAULT_SINK@ +5'? Or is that not useful? > Thanks.
[toc] | [prev] | [next] | [standalone]
| From | didier gaumet <didier.gaumet@gmail.com> |
|---|---|
| Date | 2020-11-15 14:20 +0100 |
| Message-ID | <Bbq6J-73t-9@gated-at.bofh.it> |
| In reply to | #228665 |
Le dimanche 15 novembre 2020 à 03:40:06 UTC+1, Juan R. de Silva a écrit : > 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. [...] Perhaps you could luach vlc with the following option: --audio-filter normalizer cf https://wiki.videolan.org/Documentation:Command_line/
[toc] | [prev] | [next] | [standalone]
| From | didier gaumet <didier.gaumet@gmail.com> |
|---|---|
| Date | 2020-11-15 15:10 +0100 |
| Message-ID | <BbqT7-7yB-5@gated-at.bofh.it> |
| In reply to | #228682 |
Le dimanche 15 novembre 2020 à 14:20:06 UTC+1, didier gaumet a écrit : [...] > cf https://wiki.videolan.org/Documentation:Command_line/ there are the --volume-step and --gain options as well, more directly suitable
[toc] | [prev] | [next] | [standalone]
| From | Dan Ritter <dsr@randomstring.org> |
|---|---|
| Date | 2020-11-15 15:40 +0100 |
| Message-ID | <Bbrma-7I0-15@gated-at.bofh.it> |
| In reply to | #228665 |
Juan R. de Silva 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. VLC has a remote control feature -- several, actually. Control can be handled by a command line, Lua, telnet, or http, among others. https://wiki.videolan.org/Documentation:Modules/rc/ The command you are probably looking for is volume [X] . . . . . . . . . . . . . . . . . . set/get audio volume -dsr-
[toc] | [prev] | [next] | [standalone]
| From | Brian <ad44@cityscape.co.uk> |
|---|---|
| Date | 2020-11-15 15:50 +0100 |
| Message-ID | <BbrvQ-7Lo-1@gated-at.bofh.it> |
| In reply to | #228665 |
On Sun 15 Nov 2020 at 02:35:39 -0000, Juan R. de Silva 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. Set the volume level before running vlc: amixer sset 'Master' 10% -- Brian.
[toc] | [prev] | [next] | [standalone]
| From | "Juan R. de Silva" <juan.r.d.silva@gmail.com> |
|---|---|
| Date | 2020-11-15 22:00 +0100 |
| Message-ID | <BbxhU-2PX-1@gated-at.bofh.it> |
| In reply to | #228685 |
On Sun, 15 Nov 2020 14:46:01 +0000, Brian wrote: > On Sun 15 Nov 2020 at 02:35:39 -0000, Juan R. de Silva 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. > > Set the volume level before running vlc: > > amixer sset 'Master' 10% Setting the volume before running vlc is not an option (see my OP) thus it would help using amixer instead of pactl. I'd hit the same wall. But thank you anyway.
[toc] | [prev] | [next] | [standalone]
| From | "Juan R. de Silva" <juan.r.d.silva@gmail.com> |
|---|---|
| Date | 2020-11-15 22:00 +0100 |
| Message-ID | <BbxhU-2PX-5@gated-at.bofh.it> |
| In reply to | #228665 |
On Sun, 15 Nov 2020 02:35:39 +0000, Juan R. de Silva wrote: Thanks to all replied and a lot of helpful suggestion. I'm working on it. :-)
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web