popcornmix / omxplayer

omxplayer
GNU General Public License v2.0
1.01k stars 334 forks source link

Volume control while playing #816

Closed rijotech closed 1 year ago

rijotech commented 2 years ago

I'm trying to control the volume while playing a video using xdotool key minus and xdotool key plus but it doesn't seem to work and I'm wondering if this is possible via command line?

popcornmix commented 2 years ago

omxplayer isn't an X app, so I wouldn't expect that to work. Perhaps the DBUS control section of readme would be helpful.

rijotech commented 1 year ago

I can't still figure out the DBUS control but I found a possible solution here to control the volume via stdin. the only problem is I'm getting a permission denied after executing sudo echo -n "-" > /proc/$(pidof omxplayer.bin)/fd/0 -bash: /proc/$(pidof omxplayer.bin)/fd/0: Permission denied I got this info from this site

popcornmix commented 1 year ago

sudo echo -n "-" > [file is almost certainly not what you want. That runs echo as root but pipes the output as a normal user.

Try echo -n "-" | sudo tee [file] which will actually pipe the output as root.