ashishbindal93
Posts: 1
Joined: Wed Oct 02, 2019 4:33 am

How to control multiple Omxplayer instances with dbuscontrol.sh ?

Wed Oct 02, 2019 4:38 am

Hi

I am running multiple omxplayer player instances on raspberry pi over HDMI.
Please help me by providing code that can control multiple instances.

My script to start omxplayer instances..

Code: Select all

screen -dmS camera1 sh -c 'while true; do omxplayer -- --layer 1 --live --win 4,4,454,342 http://192.168.1.201:8081; done; exec bash'
screen -dmS camera2 sh -c 'while true; do omxplayer --layer 1 --live --win 458,4,908,342 http://192.168.1.202:8081; done; exec bash'
screen -dmS camera3 sh -c 'while true; do omxplayer --layer 1 --live --win 912,4,1362,342 http://192.168.1.203:8081; done; exec bash'
#screen -dmS camera4 sh -c 'while true; do omxplayer --layer 1 --live --win 4,346,454,684 http://192.168.1.204:8081; done; exec bash'
#screen -dmS camera5 sh -c 'while true; do omxplayer --layer 1 --live --win 458,346,908,684 http://192.168.1.205:8081; done; exec bash'
screen -dmS camera6 sh -c 'while true; do omxplayer --layer 1 --live --win 912,346,1362,684 http://192.168.1.206:8081; done; exec bash'
I want to resize the movies on remote button press( already implemented in other file ) through code without killing them( Reinitiate new ones ).

Example :

Press button 1 :- Make camera1 full screen
Press nutton 2 :- Make camera2 full screen

I have tried alot on my behalf with omxplayer/dbuscontrol.sh but could not succeed to make it work.

using raspberry pi zero w :)

User avatar
topguy
Posts: 5885
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: How to control multiple Omxplayer instances with dbuscontrol.sh ?

Wed Oct 02, 2019 4:57 pm

I have tried alot on my behalf with omxplayer/dbuscontrol.sh but could not succeed to make it work.
Can you show/link the contents of that script ? does it work to control just one window ?

User avatar
rpiMike
Posts: 951
Joined: Fri Aug 10, 2012 12:38 pm
Location: Cumbria, UK

Re: How to control multiple Omxplayer instances with dbuscontrol.sh ?

Wed Oct 02, 2019 5:22 pm

You might find it easier writing some Python and using the omxplayer wrapper library.

https://python-omxplayer-wrapper.readth ... en/latest/

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

Re: How to control multiple Omxplayer instances with dbuscontrol.sh ?

Wed Oct 02, 2019 9:49 pm

You must set a different dbus address for each video and modify dbuscontrol.sh to use these addresses. My kweb suite contains such a modified script which accepts a dbus address as further argument.
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

Return to “General discussion”