Display T. Box is a Raspberry Pi with an integrated display

Playing Videos

If Display T. Box is connected to an HDMI monitor before making these kinds of modifications, then nothing happens. No image appears in a standard configuration. The external monitor springs into action when you use a video with

omxplayer <NameofVideo>.mp4

(e.g., for an MP4 video). Then, the Raspberry Pi will play back the video on the monitor that has been connected by HDMI, and the built-in display screen will continue to display the terminal. Video playback is stopped by Ctrl+C, which causes the terminal to lose the signal.

If you want to see the video on the built-in display screen, start the playback, change to a second virtual terminal using the key combination Ctrl+Alt+F2, log in again, and copy the contents of the video playback by calling fbcp via the function integrated into VideoCore IV on the built-in display. Note, however, that this process burdens the CPU by up to 50 percent. You can interrupt the internal replay by pressing the Ctrl+C keys, closing the second terminal with exit, and then returning to the first terminal via Ctrl+Alt+F1.

Youtube-dl [5], which you can install from the package source (Listing 5), lets you do something similar with YouTube videos. Because YouTube changes its interface regularly, you will have to update the program [6]; however Debian, and therefore Raspbian, is running behind in terms of updates. Therefore, you should remove the package and install the program by hand (Listing 6). The dependencies that have been previously installed will not be changed. Once the program is installed, you will be able to update youtube-dl again via

sudo youtube-dl -U

Listing 5

Install youtube-dl

$ sudo apt-get update
$ sudo apt-get install youtube-dl
$ sudo youtube-dl -U
Updating to latest version...
Updated youtube-dl. Restart youtube-dl to use the new version.
$ sudo youtube-dl -U
/usr/bin/youtube-dl: 1: /usr/bin/youtube-dl: Not: not found

Listing 6

Update youtube-dl

$ sudo apt-get remove youtube-dl
$ sudo wget https://yt-dl.org/latest/youtube-dl -O /usr/local/bin/youtube-dl
$ sudo chmod a+x /usr/local/bin/youtube-dl
$ sudo youtube-dl -U
youtube-dl is up-to-date (2015.07.07)

For streaming videos, you can create a small script (nano ~/bin/ytcl) with the contents of Listing 7. Then, you can make the script executable with chmod +x ~/bin/ytcl. Afterward, it is easy to show YouTube videos on the external monitor by entering

ytcl https://youtu.be/b1WWpKEPdT4

Listing 7

Streaming Videos

omxplayer "$(youtube-dl -g $1)"

Theoretically, you could have two good YouTube browsers with mps-youtube and Yt; however, neither currently works on the Raspberry Pi. See the "YouTube for the Console" box.

YouTube for the Console

Mps-youtube [7] and Yt [8] – also known as "Whitey" – would offer convenient YouTube video playback solutions on a Linux terminal, but neither one currently works as of July 2015 for various reasons. Mps-youtube would need to transmit the video as an MP4 container to OMXPlayer. However, mps-youtube is lacking an option for switching the playback from WebM standard [9]. Yt relies on youtube-dl and would be able to communicate directly with OMXPlayer. However, the developers are still working on fixes for the consequences of the last big updates of the YouTube API [10].


Display T. Box is intended for users that have a concrete project in mind for a Raspberry Pi outfitted with an optimized, built-in touchscreen. The little screen does not have enough resolution for a standard desktop environment. Additionally, the touchscreen is lacking in precision, and the buttons are small. Therefore, it can take several tries to make proper contact with the buttons.

For this reason, pi3g is developing a framework called WebSys [11] that will allow the user to create browser-based apps that are touch optimized. This software was not yet available at press time. The first demo apps, like an RSS reader and a web version of raspi-config are in the starting blocks. A different sample app displays the current IP address on the screen.

Login Data

The Linux terminal does not have a virtual keyboard. Therefore, you need a USB keyboard to log in to Display T. Box. To do so, provide the standard user name pi and the standard password raspberry. Additionally, SSH runs on the display box with Avahi/Zeroconf. As a result, a modern Linux system lets you access the box via the network with either of the following,

ping displaypi.local
ssh pi@displaypi.local

so you don't have to look for the IP address.

Buy this article as PDF

Express-Checkout as PDF

Pages: 4

Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content