Skip to main content
syntax highlighting only (comment edited Mar 21, 2016 at 22:57)
Source Link
Ghanima
  • 15.9k
  • 16
  • 63
  • 120

There's a library for that, although from the looks of things it may have a few 'quirks':

https://github.com/willprice/python-omxplayer-wrapper

Hello world example

from omxplayer import OMXPlayer
from time import sleep

# This will start an `omxplayer` process, this might 
# fail the first time you run it, currently in the 
# process of fixing this though.
player = OMXPlayer('path/to/file.mp4')

# The player will initially be paused

player.play()
sleep(5)
player.pause()

# Kill the `omxplayer` process gracefully.
player.quit()
from omxplayer import OMXPlayer
from time import sleep

# This will start an `omxplayer` process, this might 
# fail the first time you run it, currently in the 
# process of fixing this though.
player = OMXPlayer('path/to/file.mp4')

# The player will initially be paused

player.play()
sleep(5)
player.pause()

# Kill the `omxplayer` process gracefully.
player.quit()

There's a library for that, although from the looks of things it may have a few 'quirks':

https://github.com/willprice/python-omxplayer-wrapper

Hello world example

from omxplayer import OMXPlayer
from time import sleep

# This will start an `omxplayer` process, this might 
# fail the first time you run it, currently in the 
# process of fixing this though.
player = OMXPlayer('path/to/file.mp4')

# The player will initially be paused

player.play()
sleep(5)
player.pause()

# Kill the `omxplayer` process gracefully.
player.quit()

There's a library for that, although from the looks of things it may have a few 'quirks':

https://github.com/willprice/python-omxplayer-wrapper

Hello world example

from omxplayer import OMXPlayer
from time import sleep

# This will start an `omxplayer` process, this might 
# fail the first time you run it, currently in the 
# process of fixing this though.
player = OMXPlayer('path/to/file.mp4')

# The player will initially be paused

player.play()
sleep(5)
player.pause()

# Kill the `omxplayer` process gracefully.
player.quit()
Source Link
goobering
  • 10.7k
  • 4
  • 40
  • 64

There's a library for that, although from the looks of things it may have a few 'quirks':

https://github.com/willprice/python-omxplayer-wrapper

Hello world example

from omxplayer import OMXPlayer
from time import sleep

# This will start an `omxplayer` process, this might 
# fail the first time you run it, currently in the 
# process of fixing this though.
player = OMXPlayer('path/to/file.mp4')

# The player will initially be paused

player.play()
sleep(5)
player.pause()

# Kill the `omxplayer` process gracefully.
player.quit()