logo
background
 Home and Links
 Your PC and Security
 Server NAS
 Wargames
 Astronomy
 PhotoStory
 DVD making
 Raspberry Pi
 PIC projects
 Other projects
 Next >>

A Raspberry Pi advertising screen

Pi advertising display
Although suitable for any Pi, the Pi Zero is the ideal (cheapest) choice (or the A+, if you can't get a Zero)

Pi Advert player (Kiosk movie player)

If what you want is a series of still images (slide-show), then see my slide-show project. If you want to play a movie, things are a bit more difficult

Since we don't want to wait minutes for the 'X-desktop' (or whatever) to load, we will use Jessie Lite (or Stretch Lite) i.e. the 'command line' system.

Since there is no desktop, this means we need an app. (to play the movie) that works in a 'command line' system = and the obvious is 'omxplayer'.
 
We launch this before the 'full' system has loaded, so you should see the movie almost immediately after power-on

The Pi will play standard h264 'mp4' style movies without you needing to pay for a any Licence

There are any number of Open Source video format converters that will recode .mpg into .mp4 (on your PC, before copying your movie to the Pi)

Jessie Lite

The FAT32 partition on the SDHC card is about 63Mb - so you can 'load' moves up to about 60Mb straight after 'burning' the SDHC card. Typical 'TV' quality movie data rate is 1 to 2mb/s i.e. 7.5-15mbytes per min. So 60Mb will get you 4 to 8 minutes, which is more than enough for an 'advertising' loop

Place the movie, 'advert.mp4' in the FAT32 partition before moving the SDHC to the Pi

 

If you want to play a 'real' move, then you should allow 1-2Gb per hour

 
Loading a real movie onto the Pi Zero SDHC (from your PC) is not easy. The 'best' way is likely to be to fit a USB Ethernet 'dongle', install SAMBA and load the 'movie.mp4' across your LAN (see below)
 
NOTE if you are prepared to wait for the boot-up sequence to complete, than you can set the Pi tyo play moves from a USB Memory stick instead (see at end)

NOTE. To control the Pi from your PC using PuTTY (via your LAN), don't forget to add a file called 'ssh' to the FAT32 partition :-)

Get latest omxplayer

Putty into the Pi and update omxplayer :-

sudo apt-get update
 
sudo apt-get -y install omxplayer

Code the script

To start the player as early in the boot sequence as possible, we add a 'launch' script (called 'advert' or 'amovie', so it is launched first) to the /etc/init.d/ folder

PuTTY into the Pi (user pi, password raspberry).
 
Give yourself 'su' rights
sudo su
 
Create the script
nano /etc/init.d/advert
#! /bin/sh omxplayer -o local --loop /boot/advert.mp4 --orientation 0 & # adjust path (if using SAMBA) # adjust orientation for screen angle (eg use --orientation 180 if your screen/beamer is hanging off the ceiling) # Note the & at the ednd = this means 'run in the backgrund' and SHOULD allow the boot to complete and thus allow PuTTY access
Make the script 'executable'
 
chmod a+x /etc/init.d/advert

MAKE A BACK-UP NOW. After the next step, the Pi will 'lock up forever' looping with the 'advert' 'Activate' the script insserv /etc/init.d/advert

Reboot and away we go !

reboot now

NOTE Reboot your Pi and enjoy the startup movie

Next subject :- Pi PhotoFrame - (project)

[top]