Modifications

Sauter à la navigation Sauter à la recherche
2 645 octets ajoutés ,  16 décembre 2013 à 19:47
aucun résumé de modification
Ligne 1 : Ligne 1 :  
{{RASP-PiTFT-NAV}}
 
{{RASP-PiTFT-NAV}}
    +
{{ADFImage|RASP-PiTFT-04.jpg|640px}}
    +
== 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.
 +
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:
    +
<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!}}
 +
 +
If you don't have '''mplayer''' yet, run '''sudo apt-get install mplayer''' to install it. It may take a few minutes to complete
 +
 +
{{ADFImage|RASP-PiTFT-Video-01.png|480px}}
 +
 +
OK now you just have to run
 +
 +
<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!
 +
 
[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)
 +
 +
{{ADFImage|RASP-PiTFT-04.jpg|640px}}
 +
 +
== Convertir et redimensionner une fenêtre ==
 +
 +
It's possible to play full length videos on the TFT plate, but since the screen is small and the Pi cant use hardware accelleration to play the videos its best to scale them down to 320x240 pixels. This will be easier for the Pi to play and also save you tons of storage space. For this demo, we'll be using the famous [http://www.bigbuckbunny.org/ Big Buck Bunny] video, which is creative commons and also very funny!
 +
 +
You can download it from the link above, we'll be using the 720p AVI version.
 +
 +
{{ADFImage|RASP-PiTFT-10.jpg|640px}}
 +
 +
To do the conversion itself, we suggest [http://handbrake.fr/ HandBrake] which works great and is open source so it runs on all operating systems! Download and install from the link. Then run the installed application and open up the AVI file from before. The app will pre-fill a bunch of information about it.
 +
 +
{{ADFImage|RASP-PiTFT-11.jpg|640px}}
 +
 +
Under '''Destination''' click '''Browse'''... to select a new MP4 file to save. Then under Picture change the '''Width''' to 320 (the height will be auto-calculated)
 +
 +
{{ADFImage|RASP-PiTFT-12.jpg|640px}}
 +
 +
Click '''START''' to begin the conversion, it will take a minute or two.
 +
 +
{{ADFImage|RASP-PiTFT-13.jpg|640px}}
 +
 +
That's it! You now have a smaller file. Don't forget to play it on your computer to make sure it plays right before copying it to your Pi
    
{{RASP-PiTFT-TRAILER}}
 
{{RASP-PiTFT-TRAILER}}
29 917

modifications

Menu de navigation