Ligne 5 : |
Ligne 5 : |
| == Comment jouer une vidéo == | | == Comment jouer une vidéo == |
| | | |
− | You can play many types of videos on the screen, using mplayer you don't even need to run X and you can script the movies to play using Python. We'll show you how to just play one video for now.
| + | Vous pouvez jouer de nombreux types de vidéo sur cet écran. En utilisant '''mplayer''' vous n'avez même pas besoin de démarrer l'environnement X et vous pouvez écrire des script Python pour afficher les films. |
− | To demo, we'll use an mp4 of Big Buck Bunny for 320 pixel wide screens. Below we show you how to create/resize videos, but to make it easy, just download our version with:
| + | |
| + | Cette page vous montre comment jouer une vidéo. |
| + | |
| + | Pour cette démo, nous allons utiliser la vidéo mp4 de "Big Buck Bunny" adapté à la largeur de votre écran (320 pixels/points). Ensuite, nous vous montrerons comment créer/redimensionne une vidéo. |
| + | |
| + | Pour simplifier les étapes, nous vous proposons de télécharger la version préparée par AdaFruit: |
| | | |
| <nowiki>wget http://adafruit-download.s3.amazonaws.com/bigbuckbunny320p.mp4</nowiki> | | <nowiki>wget http://adafruit-download.s3.amazonaws.com/bigbuckbunny320p.mp4</nowiki> |
| | | |
− | {{ambox-stop|text=The video is 30MB which is a lot if you haven't expanded your SD card yet. Before you do this, run sudo raspi-config to expand the SD card so you don't run out of space!}} | + | {{ambox-stop|text=Cette vidéo fait 30MB, ce qui beaucoup si vous n'avez pas étendu votre système de fichier sur la carte SD. Avant, vous devriez exécuter un '''sudo raspi-config''' pour étendre le système de fichier (expand Root FileSystem) afin de ne pas tomber à court d'espace!}} |
| | | |
− | If you don't have '''mplayer''' yet, run '''sudo apt-get install mplayer''' to install it. It may take a few minutes to complete
| + | Si vous n'avez pas encore installé '''mplayer''', exécutez la commande suivante pour l'installer '''sudo apt-get install mplayer'''. Cette opération nécessite quelques minutes. |
| | | |
| {{ADFImage|RASP-PiTFT-Video-01.png|480px}} | | {{ADFImage|RASP-PiTFT-Video-01.png|480px}} |
| | | |
− | OK now you just have to run
| + | Voila, maintenant, il ne reste plus qu'a exécuter: |
| | | |
| <nowiki>mplayer -vo fbdev2:/dev/fb1 -x 240 -y 320 -framedrop bigbuckbunny320p.mp4</nowiki> | | <nowiki>mplayer -vo fbdev2:/dev/fb1 -x 240 -y 320 -framedrop bigbuckbunny320p.mp4</nowiki> |
| | | |
− | if your video is not sized for 320 wide, you may need to add a -zoom after -framedrop so that it will resize - note that this is quite taxing for the Pi, so it may result in a choppy or mis-synced video!
| + | Si votre vidéo n'est pas redimensionnée à 230 pixels de large, vous aurez besoin d'ajouter le paramètre -zoom après -framedrop pour faire une mise à dimension à la volée. Notez que cette opération nécessite beaucoup de ressources... ce qui pourrait provoquer un affichage saccadé ou soucis de synchronisation! |
| | | |
| [http://learn.adafruit.com/adafruit-pitft-28-inch-resistive-touchscreen-display-raspberry-pi/playing-videos la suite) | | [http://learn.adafruit.com/adafruit-pitft-28-inch-resistive-touchscreen-display-raspberry-pi/playing-videos la suite) |