RPIYT / 2013-04-29 03:50:23

Playing YouTube video on a RPI is possible directly from the Linux command-line, without having even to start X. It saves some resources. There are many tutorial on how to install YouTube but I found that the information was spread all over, so here is a summary:

  1. Install youtube-dl, to download YouTube video:

    1. sudo apt-get update

    2. sudo apt-get install youtube-dl

  2. Update youtube-dl to its latest version:

    1. sudo youtube-dl -U

  3. Install Python setup tools, needed to install whitey:

    1. sudo apt-get install python-setuptools

  4. Download whitey, which is the "front-end" to YouTube:

    1. wget http://pypi.python.org/packages/source/w/whitey/whitey-0.1.tar.gz

    2. tar -zxvf whitey-0.1.tar.gz

  5. If you want to use omxplayer instead of mplayer, edit whitey init file:

    1. nano whitey-0.1/src/yt/__init__.py

    2. CTRL+W to search for mplayer