Movie Looper for the Rasberry Pi using USB drive for storage

Setup USB media

sudo mkdir /media/usb
#One time USB device mount
sudo mount -t vfat /dev/sda /media/usb
#Keep USB device
sudo vim /etc/fstab
#Add to fstab
/dev/sda /media/usb vfat rw,user,defaults 0 2
sudo mount /media/usb


Ensure omxplayer is installed.

sudo apt-get install omxplayer -y

Install files on USB media: -> file used to write playlist file and start video loop -> use for startup via cronjob -> stop all videos via kill -> stop/start movie

www -> web interface

Can play movies continuously on boot or respond to commands

Store movies and scrips on a old thumb drive and play at boot

Turn your old TV into a movie player or play your favorite videos or songs

Web interface has visual representation of video size, commenting on videos and start stop control

Can also play mp3 files and make digital video frame

Future ideas include collaborative movie editing and viewing

Alt text

Alt text


Working RasberryPi2, Raspbian 8

Thumb drive, HDMI cable, Old TV

Projector - optional

Wifi USB device - optional for web interface

Example Flashcard Contents:

DIR: /media/usb
-> video -> featured -> main video playlist [Add first videos here!]
            raw-footage -> your recently recorded movies
            relax -> your relaxing meditate movies

Run (via ssh on pi)

sudo apt-get install screen -y

bash /media/usb/

# Stop
bash /media/usb/


Movie Playlists: Order and continuously play movies

Web Interface: See what video is playing and comment/rate video


Show footage on TV with friends while editing

Review recorded GoPro Videos

Portable Movie player

Recycle (what is old is new again)

Put your movies and files on a USB flash device using structure above.

Install cronjob to autoplay movies at reboot change location if needed, comment out.

Start at boot (optional)

as pi user crontab -e

# @reboot    bash -x /media/usb/ > /media/usb/autoplay-mp4.out 
# * * * * *  bash -x /media/usb/ > /media/usb/control.out

Install Web Interface:

  1. Install apache, php, setup wifi, permissions on web folder
sudo apt-get install apache2 php5 -y
  1. Deploy files to MediaPi (

#remove old html file

rm /var/www/html/index.html
  1. Control via web interface, start, stop, comment


Q) How do I boot up normally and not play videos?

A) Remove the usb stick

Q) How to stop the videos while playing?

A) ssh to the mediapi: echo “stop” > /tmp/play-mp4.txt or use web interface

Q) Does this require X running?

A) No does not require X (although it will work either way)