Play Video With Python and GPIO

Hello again. Today I am going to show an ongoing project I am working on. My company has bestowed upon me the pleasure to build a demo kit for one of our product lines. I work in the low voltage industry that includes fire alarm, security, video surveillance and structured cable (voice and data). While designing the demo kit, it was brought to my attention that there are many situations that we are unable to simulate at trade shows or at a customer site, especially when we are talking about releasing chemical agent or setting off video with python and gpio

Anyways, a coworker came up to me and said that it would be cool if we could have video play when an alarm occurs on a panel. Immediately, I thought of a Raspberry Pi. Virtually all security and fire alarm panels are nothing more than microcontrollers on steroids, thus have no video capabilities. They do have IO though….lots and lots of IOs.

Step 1: BOM

Here is the bill of material you will need for this project:


  • Raspberry Pi (I used a Model B)
  • SD card or micro SD card with adapter (I used a class 10 16gb micro SD card with adapter)
  • Micro USB power cable (700ma minimum)
  • Keyboard and mouse
  • GPIO ribbon cable and cobbler
  • you can use female to male jumpers if you have them
  • Breadboard
  • Jumper wires
  • HDMI cable
  • TV
  • Computer
  • SD card reader
  • Internet connection (i used a usb wifi adapter but a hardwired connection is always better)


  • Raspbian Jessie (my version is from 11/21/2015)
  • omxplayer (built in to Raspbian)
  • Python 3 (built in to Raspbian)

Step 2: Setting up the Pi


First things first, we need to set up the SD card with the OS for the Raspberry Pi.

On your computer, go to to download Raspbian.

Once you have the file downloaded, unzip the file.

Follow the instructions Here based on your type of computer to install Raspbian onto your SD card.

I have followed the instructions for Windows and Mac and they have all worked great. I will try the Linux version when my Linux boxes are freed up from their duties.schematic play video with python and gpio


Now, insert your SD card into your Pi and power it up. Make sure you have your keyboard, mouse, TV and internet connection all plugged in as well.

For more detail: Play Video With Python and GPIO

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top