Adjust audio volume level with CLI omxplayer - Raspberry Pi

前端 未结 5 1208
死守一世寂寞
死守一世寂寞 2021-02-07 19:33

I have a bash script that plays .mp3 files on my Raspberry Pi via omxplayer. But can not control the local (earphone) audio volume with the GUI. Is there a comm

5条回答
  •  闹比i
    闹比i (楼主)
    2021-02-07 20:09

    Omxplayer doesn't use alsa for sound output, but it's possible to use stdin interface

    Volume up:

    echo -n "+" > /proc/$(pidof omxplayer.bin)/fd/0
    

    Volume down:

    echo -n "-" > /proc/$(pidof omxplayer.bin)/fd/0
    

提交回复
热议问题