RPIYT
Playing YouTube video on a Raspberry PI is possible directly from the Linux command-line, without having even to start X. It saves some resources. There are many tutorials (see 1, 2 for example) on how to install YouTube but I found that the information was spread all over, so here is a summary:
-
Install youtube-dl (and update it) to download YouTube video:
sudo apt-get update
sudo apt-get install youtube-dl
sudo youtube-dl -U
-
Install Python setup tools, needed to install whitey:
sudo apt-get install python-setuptools
-
Download whitey, which is the "front-end" to YouTube:
wget http://pypi.python.org/packages/source/w/whitey/whitey-0.1.tar.gz
tar -zxvf whitey-0.1.tar.gz
-
If you want to use omxplayer instead of mplayer, edit whitey init file:
nano whitey-0.1/src/yt/__init__.py
CTRL+W to search for mplayer
Replace mplayer by omxplayer and remove mplayer switches
-
Install whitey and start playing YouTube videos:
sudo python setup.py install
yt
If yt does not play the videos that you choose, make sure that youtube-dl is working properly by running the command:
youtube-dl http://www.youtube.com/watch?v=-KMpZaEF6g0
which should result in:
[youtube] Setting language
[youtube] -KMpZaEF6g0: Downloading video webpage
[youtube] -KMpZaEF6g0: Downloading video info webpage
[youtube] -KMpZaEF6g0: Extracting video information
[download] Destination: -KMpZaEF6g0.mp4
[download] X% of 118.89M at AAA.BBBk/s ETA MM:SS
where X, AAA.BBB, and MM:SS depend of course on how the download is going If the command returns an error, then sudo youtube-dl -U.
The last three changes:Tygre - 2015-05-09 11:01:34 am | Tygre - 2013-04-29 08:47:39 am | Tygre - 2013-04-29 08:09:45 am
|