-
1Download custom image of Raspbian
The entire software project is on GitHub. However, only the image is needed to make PlayVideo work: Bootable PlayVideo image of Raspbian for Raspberry Pi microSD (July 2018). You can find the entire project here: PlayVideo project on GitHub
-
2Burn PlayVideo image file to microSD card
Download and install Win32 Disk Imager. https://sourceforge.net/projects/win32diskimager/
Purchase a 8 GB or 16 GB microSD card. A larger card will not hurt, but it is not necessary. Burn the image onto the micro SD card. Install the micro SD card in the SD card slot of the Raspberry Pi.
-
3Wire a pushbutton switch for testing
Connect a pushbutton or adaptive switch to pins 3 (GPIO2) and 6 (Ground) of the GPIO header.
-
4Rip a few DVDs or other video source
Convert a few DVDs or other video sources to MP4 format. I use HandBrake https://handbrake.fr and I usually use the Amazon Kindle as the target device to keep the file size reasonably small.
-
5Format USB flash drive
Format a 64 GB USB flash drive as a NTFS drive with the name VIDEOS. Other size flash drives can be used. I use tiny flash drives (e.g., SanDisk Cruzer Fit) as a convenient fit for the Raspberry Pi . Put the videos on the root directory of the flash drive.
-
6Create a list.txt file
Create a text file called list.txt. Each line should look like this:
-1000 Hendrix Woodstock.mp4
The number is always negative. It sets the volume. The number is followed by spaces, then the name of the MP4 file. Useful volume values are:
Volume value
Off -6000
1% -4000
5% -2600
10% -2000
20% -1400
30% -1000
50% -600
75% -250
90% -90
100% -1See the GitHub pull for PlayVideo to learn more about the list.txt file. It includes documents and examples.
-
7Copy the list.txt file to flash drive
Copy the list.txt file to the flash drive (called VIDEOS) and insert the flash drive into one of the 4 Raspberry Pi USB slots.
-
8First test, part 1: Successful startup
Insert a keyboard and mouse into to open USB slots. Connect an HDMI monitor. If the monitor does not have audio, connect amplified speakers to the speaker jack of the Raspberry Pi. Power up the Raspberry Pi with a wall charger (1 Amp or greater). It should boot directly into PlayVideo.
Problem solving
1) Nothing on the screen. If this is your first experience with the Raspberry Pi, solve this problem using on-line resource and help from friends. The Raspberry Pi is nothing more than a small Linux PC. Try burning a standard Raspberry Pi microSD card and see if that works.
2) Boots to standard Raspbian system, but not the PlayVideo microSD card. Try downloading and burning the image again. This image should work well with a Pi 3B, 3B+ and 4. You can also try a different microSD card.
3) System boots, a command line window opens, but the window has error messages. If the mouse and keyboard are working, you are almost there.
a) See if you can read the USB drive directory using either the GUI file manager or using the command line window. The drive is mounted on /media/pi/ and the name must be VIDEOS (all caps). If you cannot find the VIDEOS drive, remove it from the Raspberry Pi and plug it into your PC. See if you can play one of the videos using Media Player. Once that works, plug it back into the Raspberry Pi and see if you can find the drive.
b) Look for your list.txt file /media/pi/VIDEOS/list.txt and see if you can read it with vi or the GUI editor.
c) Check that the file names listed in list.txt exactly match the video files on the USB drive.
d) Play one of the MP4 videos using the command line function omxplayer. The command is: omxplayer <file_name> If that works, shut down the Raspberry Pi (using the mouse) and restart it. Until you wire a START pushbutton, the only way to restart is to disconnect and reconnect the power.
4) If you are still having problem and you are an experienced Linux hack, download the pull from GitHub and look at the document entitled: PlayVideo Software Technical Notes.doc -
9First test, part 2: Step through the videos
When the system starts up the first video should start playing. Use the pushbutton or adaptive switch to step through all the videos. It should start back at the first video when the list is exhausted.
-
10Build a more complete interface
Go to this web page and see how to build a complete interface for the Raspberry Pi. https://arm22q13.wordpress.com/davids-video-player/
There are essentially two versions. The simpler one is for wired adaptive switches. The more complex one supports wireless. It is designed for use with a keyfob or the wireless controller, one of my other Hackaday projects.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.