elfresno
Posts: 44
Joined: Sun May 21, 2017 5:19 pm

select subtitles or audio in omxplayer with d-bus

Tue Apr 23, 2019 1:39 am

Hi. I'm trying to select subtitles or audios with d-bus. but I get an error, I tried other commands like showsubtitle and they work fine.

example of d-bus that works
sudo bash /home/pi/Desktop/scripts/dbuscontrol.sh togglesubtitles

example of d-bus that does not work
sudo bash /home/pi/dbuscontrol.sh ListAudio
the error
usage: /home/pi/dbuscontrol.sh status | pause | stop | seek | volumeup | volumedown | setposition [position in microseconds] | hidevideo | unhidevideo | togglesubtitles | hidesubtitles | showsubtitles | setvideopos [x1 y1 x2 y2] | setvideocroppos [x1 y1 x2 y2] | setaspectmode [letterbox, fill, stretch, default] | setalpha [alpha (0..255)] | getsource

I hope your help, thanks

gkreidl
Posts: 6326
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: select subtitles or audio in omxplayer with d-bus

Tue Apr 23, 2019 4:48 am

The script dbuscontrol.sh supports only a subset of all possible omxplayer dbus commands.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

User avatar
Douglas6
Posts: 4860
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: select subtitles or audio in omxplayer with d-bus

Tue Apr 23, 2019 1:51 pm

If you can stand Python, omxcontrol.py supports most of the omxplayer D-Bus commands: https://github.com/Douglas6/omxcontrol

Return to “General discussion”