~minos-archive/minos/yt

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
``yt``: a command-line YouTube client
=====================================

``yt`` is a command-line front-end to YouTube which allows you to browse YouTube
videos and play them directly from the command-line. It uses ``youtube-dl`` and
``mplayer`` or ``omxplayer`` to actually *play* the videos.

The combination of a text based interface and ``omxplayer`` makes ``yt`` a great
YouTube client for the Raspberry Pi.

Usage
-----

Launch using ``mplayer`` with::

    yt

or, if you're using a Raspberry Pi, using ``omxplayer``::

    pi-yt

Installation
------------

From PyPi (easier!)
~~~~~~~~~~~~~~~~~~~

::

    # Install dependancies
    sudo apt-get install youtube-dl
    # Ensure using latest version of youtube-dl to keep up with YouTube API changes
    sudo youtube-dl -U

    # Install from PyPi
    sudo apt-get install python-setuptools
    sudo easy_install whitey

From GitHub
~~~~~~~~~~~

::

    # Install dependancies
    sudo apt-get install youtube-dl
    # Ensure using latest version of youtube-dl to keep up with YouTube API changes
    sudo youtube-dl -U

    # Install from GitHub
    sudo apt-get install python-setuptools
    git checkout git@github.com:rjw57/yt.git
    cd yt
    sudo python setup.py install

One line install for the Raspberry Pi
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

::

    curl -L https://github.com/rjw57/yt/raw/master/tools/install-pi.sh | sh
                        
Dependancies
------------

- youtube-dl
- mplayer or omxplayer
                        
Common problems
---------------

Videos don't play when selected in interface
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Make sure you have the latest version of youtube-dl. youtube-dl has a self update
mechanism::

    sudo youtube-dl -U

Omxplayer starts and terminates without playing video
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

For high quality videos the default memory allocation on the Raspberry Pi doesn't
provide enough memory to the GPU.

The default 192M ARM, 64M GPU split can be changed to a 128M ARM, 128M GPU split
using raspi-config.

::

    sudo raspi-config
    # Select memory-split
    # Allocate 128M to the GPU
        
See http://elinux.org/RPi_Advanced_Setup for more information.

Getting more help
~~~~~~~~~~~~~~~~~

See https://github.com/rg3/youtube-dl and https://github.com/huceke/omxplayer for
more detailed help.

Contributors
------------

- Rich Wareham
    - Created ``yt``.

- Calum J. Eadie
    - Added OMXPlayer support and pi-yt entry point.

Credits
-------

- `Distribute`_
- `Buildout`_
- `modern-package-template`_
- `youtube-dl`_
- `mplayer`_
- `Omxplayer`_
- Mark Baldridges's `"HOWTO: YouTube on the Raspberry Pi - sans X)"`_

.. _Buildout: http://www.buildout.org/
.. _Distribute: http://pypi.python.org/pypi/distribute
.. _`modern-package-template`: http://pypi.python.org/pypi/modern-package-template
.. _`youtube-dl`: http://rg3.github.com/youtube-dl/
.. _`mplayer`: http://www.mplayerhq.hu/
.. _`Omxplayer`: https://github.com/huceke/omxplayer
.. _`"HOWTO: YouTube on the Raspberry Pi - sans X)"`: http://www.raspberrypi.org/phpBB3/viewtopic.php?p=97710&sid=fa3272a732353dc501cb96d38453b97c#p97710