19-02-2017, 16:02:45
Bonjour,
j'utilise ceci pour afficher la video d'une camera lorsque j'appuie sur un bouton :
# fonction afficher video
def camera():
subprocess.call(['omxplayer --avdict rtsp_transport:tcp --live "rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0"'], shell=True)
.....
if (button_press_timer > une_seconde) :
camera_on()
....
Quand je tape en commande terminal :
omxplayer --avdict rtsp_transport:tcp --live "rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0
J'appuie sur CTRL C pour stopper la video.
Par contre ici je ne sais pas comment stopper par python.
Une idée ?
j'utilise ceci pour afficher la video d'une camera lorsque j'appuie sur un bouton :
# fonction afficher video
def camera():
subprocess.call(['omxplayer --avdict rtsp_transport:tcp --live "rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0"'], shell=True)
.....
if (button_press_timer > une_seconde) :
camera_on()
....
Quand je tape en commande terminal :
omxplayer --avdict rtsp_transport:tcp --live "rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0
J'appuie sur CTRL C pour stopper la video.
Par contre ici je ne sais pas comment stopper par python.
Une idée ?