How To Play Videos
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:
If you don't have mplayer yet, run
sudo apt-get update
sudo apt-get install mplayer
to install it. It may take a few minutes to complete
OK now you just have to run:
sudo SDL_VIDEODRIVER=fbcon SDL_FBDEV=/dev/fb1 mplayer -vo sdl -framedrop bigbuckbunny320p.mp4
If your video is not sized for 320 wide, you may need to add a
-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!
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 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.
To do the conversion itself, we suggest 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.
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