feat: use python-vlc to play a video
This commit is contained in:
16
omx.py
Normal file
16
omx.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from omxplayer.player import OMXPlayer
|
||||
import time
|
||||
|
||||
v1 = '/home/pi/Videos/nicechord-original.mp4'
|
||||
v2 = '/home/pi/Videos/new_trunk for Alice(290)_1.mp4'
|
||||
|
||||
p1 = OMXPlayer(v1, args=['--display=2'], dbus_name='org.mpris.MediaPlayer2.omxplayer1')
|
||||
p2 = OMXPlayer(v2, args=['--display=7'], dbus_name='org.mpris.MediaPlayer2.omxplayer2')
|
||||
|
||||
try:
|
||||
time.sleep(10)
|
||||
except KeyboardInterrupt:
|
||||
print('exit')
|
||||
finally:
|
||||
p1.quit()
|
||||
p2.quit()
|
||||
Reference in New Issue
Block a user