This is a simple application built in OpenFrameworks for running a touch screen Video on Demand, for use in exhibition spaces, or anywhere a VOD is required!
When the program starts, it trawls its data/videos
directory looking for MP4 files to play, and corresponding JPG poster images, and text files for descriptions. It then displays a menu screen with a clickable tile for each video, which will then launch the video with a minimal interface (just play / pause, progress bar, and a back button).
The VOD works best with 3 to 5 videos, any more and the text on the menu screen will overflow. Future interfaces could easily extend this to scrollbars, pagination or other UI designs to accommodate more videos.
To get up and running you'll need to install a few things and run a compiler before you have a working build. This might seem tedious at first, but it's fun! And it's the best way to learn OpenFrameworks.
OpenFrameworks is a cross-platform framework written in C++ that abstracts away the more complex bits of dealing with graphics libraries, video, input and other things to make it easier to build intensive visual and interactive applications. This particular application is fairly simple, but there's a few steps to get up and running.
Please note that although OpenFrameworks is cross-platform, we built this code targeting Windows PCs, as they're the ones we had readily available for spinning up touch screen kiosks and VODs. The code may require tweaking to get working on Mac or Linux.
- Go to http://openframeworks.cc and follow the setup guides for your specific environment. If you're on Windows, Visual Studio 2015 Community Edition is free for open source projects and small teams (even commercial work). Be sure to include
Common Tools for Visual C++ 2015
during the VS install process or you will not be able to compile OpenFrameworks projects. More info on the topic can be found here. - If you're on Windows, make sure to install a codec pack for using MP4 / h.264 video. OpenFrameworks recommend the K-Lite Codec Pack. If you're using this one, be sure to avoid an installer with adware!
- Follow the OpenFrameworks setup guide to create a blank project. In the project creation steps, be sure to include the following Offical addons:
- ofxGui
- ofxXmlSettings
- Next, replace the
main.cpp
,ofApp.cpp
, andofApp.h
with the files in this repo. Copy all sub-directories from the repo (fonts, icons) to the project'sbin/data/
directory. - Add some MP4 videos to
bin/data/videos
. If you need a video for testing, Big Buck Bunny has some good MP4s. For each video, add a JPEG poster image with the exact same filename (including case). E.g. formy_video_01.mp4
createmy_video_01.jpg
. - Create a text file, also with the same name as the video, but with the file extension
.txt
. E.g. formy_video_01.mp4
create_my_video_01.txt
.- Within the text file, write a title as the first line.
- Press enter and write a description in the second line.
- Be sure not to press enter or create new lines in the description. The application only reads the first two lines of the text file, so any further lines will be ignored.
- You can make particular words italic by wrapping the word in underscores. This is not quite like Markdown where you just add underscores or asterisks to the beginning and ends of a phrase or sentence. If you want an entire phrase or sentence to be italic, here you will need to wrap each word with underscores individually. This makes it slightly easier to parse the strings.
- Optionally, add a 1920 x 1080 background image to
bin/data/backgrounds
, labelledbackground_menu.jpg
. This will display behind the menu. - If you're using Visual Studio, make sure to select
Release Build
, and compile and run the application.
Once you have a successfully compiled version of the VOD, follow the end user notes for more details on fine-tuning settings and getting up and running with some videos.
To distribute the application to a target PC, be sure to bundle in the VC++ runtime DLLs before copying over your bin
folder to the new PC. Alternately, install the VC++ redistributable packages on the new PC.
This VOD attempts to run with VSync, but on same graphics cards the video may decode without VSync. If you're using Intel Integrated Graphics, follow these steps to force VSync: http://www.intel.com/content/www/us/en/support/graphics-drivers/000005552.html.
Read the ACMI Labs blog post covering this project: Building a simple open source cross platform video player for museums
The ACMI Mini VOD code itself is released under the MIT License.
OpenFrameworks is distributed under the MIT License.
Bundled with this application is the excellent Open Sans font by Steve Matteson, which was released under the Apache License 2.0, included in this repo.