Last active
March 28, 2018 16:36
-
-
Save EspaceRaspberryFrancais/948e0c4effeada4729636d869493a2ca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import picamera | |
import time | |
camera = picamera.PiCamera() | |
#Retourner image : Enlever les deux hashtag suivants | |
#camera.hflip = True | |
#camera.vflip = True | |
dureeVideo = 5 | |
nomVideo = time.strftime("%d.%m.%Y-%Hh%Mm%Ss") | |
camera.start_recording(nomVideo+".h264") | |
print("REC...") | |
time.sleep(dureeVideo) | |
camera.stop_recording() | |
commande = "MP4Box -add "+nomVideo+".h264 " + nomVideo+".mp4" | |
os.system(commande) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment