Demarrer/arreter omxplayer via python (CTRL C) ?
Bonjour,
j'utilise ceci pour afficher la video d'une camera lorsque j'appuie sur un bouton :
Code:
1 2 3 4 5 6 7
| # fonction afficher video
def camera_on():
subprocess.call(['omxplayer --avdict rtsp_transport:tcp --live "rtsp://admin:admin@192.168.0.212:554/cam/realmonitor?channel=1&subtype=0"'], shell=True)
.....
if (button_press_timer > une_seconde) :
camera_on()
.... |
Quand je tape en commande terminal la video de ma camera s'affiche bien :
omxplayer --avdict rtsp_transport:tcp --live "rtsp://admin:admin@192.168.0.212:554/cam/realmonitor?channel=1&subtype=0
J'appuie sur CTRL C pour stopper la video.
Par contre, avec python, je ne sais pas comment fermer la video de la camera afficher à l'écran.
Une idée ?