Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
This page list some ways to use the framebuffer drivers. All commands are issued from a SSH session.
Install framebuffer driver
sudo apt-get install xserver-xorg-video-fbdev
Create file: /usr/share/X11/xorg.conf.d/99-fbdev.conf
Section "Device" Identifier "myfb" Driver "fbdev" Option "fbdev" "/dev/fb1" EndSection
Start X server
WIDTH is the display width.
scale is used because the movie is larger than most small displays. -3 means keep aspect ratio and calculate height.
apt-get install -y mplayer wget http://fredrik.hubbe.net/plugger/test.mpg mplayer -nolirc -vo fbdev2:/dev/fb1 -vf scale=WIDTH:-3 test.mpg
This does not work for jessie anymore. mplayer was replaced with mplayer2 missing fbdev support. Workaround for this is using SDL
sudo SDL_VIDEODRIVER=fbcon SDL_FBDEV=/dev/fb1 mplayer -vo sdl -framedrop test.mpg
apt-get -y install fbi wget http://art110.wikispaces.com/file/view/Mystery-100x100.jpg/30649064/Mystery-100x100.jpg fbi -d /dev/fb1 -T 1 -noverbose -a Mystery-100x100.jpg
Use display as the primary console.
If a keyboard is plugged in after power on, a reboot may be necessary.
# Map console 1 to framebuffer 1, login screen will show up on the display con2fbmap 1 1 con2fbmap 1 console 1 is mapped to framebuffer 1 # Revert con2fbmap 1 0
/dev/fb1, we can take advantage of the GPU for hardware accelrated video playback.
fbcp takes a snapshot of /dev/fb0, copies it to /dev/fb1 and waits 25ms before repeating.
Snapshotting takes ~10ms and with a 25ms delay it gives roughly 1000/(10+25) = 28fps
CPU usage: ~2%
Note: Snapshot and /dev/fb1 driver refresh is not syncronized.
sudo apt-get install cmake git clone https://github.com/tasanakorn/rpi-fbcp cd rpi-fbcp/ mkdir build cd build/ cmake .. make sudo install fbcp /usr/local/bin/fbcp
Load drivers and fbcp
sudo modprobe fbtft dma sudo modprobe fbtft_device name=tinylcd35 rotate=90 speed=48000000 fps=50 # Start fb copying process in the background fbcp &
Play video on /dev/fb0, which will also show up on /dev/fb1
Stop framebuffer copy
$ tail /var/log/messages Dec 15 17:38:07 raspberrypi fbcp: Primary display is 720 x 480 Dec 15 17:38:07 raspberrypi fbcp: Second display is 480 x 320 16bps
sudo apt-get install youtube-dl # Do this twice sudo youtube-dl -U sudo youtube-dl -U sudo apt-get install python-setuptools sudo easy_install whitey
yt --player omxplayer