Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. #!/usr/bin/python
  2. import subprocess as sp
  3. import time
  4. import os
  5. from pirDetect import *
  6. import sys
  7. video = ["omxplayer", "filename", "-o", "both", "--win", "0 0 1280 720", "--aspect-mode", "fill", "--no-osd", "--orientation" ,"180","--vol", "-600"]
  8. scareFile = "MaleScare.mp4"
  9. print(scareFile)
  10. def onMotion(currState):
  11. if currState:
  12. video[1] = scareFile
  13. subVideo = sp.Popen(video)
  14. while subVideo.poll() is None:
  15. time.sleep(.1)
  16. def showImage():
  17. os.system("sudo fbi -T 1 -d /dev/fb0 -noverbose -once MaleStart.png")
  18. showImage()
  19. objDetect = detector(7)
  20. objDetect.subscribe(onMotion)
  21. objDetect.start()
  22. os.system("sudo killall -9 fbi")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement