mps-youtube allows you to play youtube content via a text terminal without needing X. As a result, without X, all you will get is audio. For me, I want to stream youtube audio to speakers, so this is one solution.
Install the latest Raspbian onto a SD card. If you are not familiar with how to do this, follow this guide.
I used Raspbian release 2014-12-24 for this guide.
1. Boot into the newly flashed Raspbian image.
2. Install python-pip by running the following command.
sudo apt-get install python3-pip
3. Install mps-youtube using pip by running the following command.
sudo pip3 install mps-youtube
4. Install youtube-dl
sudo pip3 install youtube-dl
5. Install omxplayer
sudo apt-get install omxplayer
1. Invoke mps-youtube by running the following command from a terminal.
2. Configure the audio player by running the following command.
set player omxplayer
3. Search for youtube content by running the following command.
4. Select one of the results to play by typing the number.
If you do not hear audio, you should check the audio output of your raspberry pi.
Similarly, you should also test omxplayer.