Wiki

Reso-nance numérique | Arts et cultures libres

Outils du site


materiel:rpi:video:accueil

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

materiel:rpi:video:accueil [2016/12/05 18:50]
resonance créée
materiel:rpi:video:accueil [2016/12/05 18:51] (Version actuelle)
resonance
Ligne 18: Ligne 18:
 Control - C pour  terminer Control - C pour  terminer
  
- + SCRIPT #1 - subprocess
- +
- +
- +
-    SCRIPT #1 +
- +
-    la meilleur technique par toons : +
     import subprocess     import subprocess
- 
     subprocess.call(['omxplayer --alpha 100 test.mkv'], shell=True)     subprocess.call(['omxplayer --alpha 100 test.mkv'], shell=True)
  
  
- +    SCRIPT #2 - os
- +
- +
-    SCRIPT #2 +
     import os     import os
- 
     TheCommand ="omxplayer /opt/vc/src/hello_pi/hello_video/test.h264"     TheCommand ="omxplayer /opt/vc/src/hello_pi/hello_video/test.h264"
- 
     os.system(TheCommand)     os.system(TheCommand)
- 
  
  
     SCRIPT #3 - argument     SCRIPT #3 - argument
- 
     import os     import os
- 
     import argparse     import argparse
- 
     parser = argparse.ArgumentParser()     parser = argparse.ArgumentParser()
- 
     parser.add_argument("val", help="transparency", type=int)     parser.add_argument("val", help="transparency", type=int)
- 
     args = parser.parse_args()     args = parser.parse_args()
- 
     os.system("omxplayer --alpha args.val /opt/vc/src/hello_pi/hello_video/test.h264")     os.system("omxplayer --alpha args.val /opt/vc/src/hello_pi/hello_video/test.h264")
  
  
  
 +    SCRIPT #4- keyboard
 +    import os
 +    val = input("Ready ? ")
 +    print type(val)
 +    os.system("omxplayer --alpha " + str(val) + " /opt/vc/src/hello_pi/hello_video/test.h264")
 +
 +
 +
 +    SCRIPT #5- keyboard (mieux)
 +    import os
 +    val = input("Transparence ? ")
 +    val2 = 90
 +    command = "omxplayer --alpha {} --orientation {} /opt/vc/src/hello_pi/hello_video/test.h264".format(val, val2)
 +    os.system(command)
/home/resonancg/www/wiki/data/attic/materiel/rpi/video/accueil.1480960228.txt.gz · Dernière modification: 2016/12/05 18:50 de resonance