8348d77f827ce1a7315b9b3302b1fab7fca9ec42
[oweals/peertube.git] / README.md
1 <h1 align="center">
2   PeerTube
3 </h1>
4
5 <h4 align="center">
6 Federated (ActivityPub) video streaming platform using P2P (BitTorrent)
7 directly in the web browser with <a href="https://github.com/feross/webtorrent">WebTorrent</a>.
8 </h4>
9
10 **PeerTube is sponsored by [Framasoft](https://framatube.org/#en), a non-profit
11 that promotes, spreads and develops free culture in general, and free-libre
12 software in particular. If you want to support this project, please [consider
13 donating to them](https://soutenir.framasoft.org/en/).**
14
15 <p align="center">
16   <strong>Client</strong>
17
18   <br />
19
20   <a href="https://david-dm.org/Chocobozzz/PeerTube?path=client">
21     <img src="https://david-dm.org/Chocobozzz/PeerTube.svg?path=client" alt="Dependency Status" />
22   </a>
23
24   <a href="https://david-dm.org/Chocobozzz/PeerTube?path=client&type=dev">
25     <img src="https://david-dm.org/Chocobozzz/PeerTube/dev-status.svg?path=client" alt="devDependency Status" />
26   </a>
27 </p>
28
29 <p align="center">
30   <strong>Server</strong>
31
32   <br />
33
34   <a href="https://travis-ci.org/Chocobozzz/PeerTube">
35     <img src="https://travis-ci.org/Chocobozzz/PeerTube.svg?branch=develop" alt="Build Status" />
36   </a>
37
38   <a href="https://david-dm.org/Chocobozzz/PeerTube">
39     <img src="https://david-dm.org/Chocobozzz/PeerTube.svg" alt="Dependencies Status" />
40   </a>
41
42   <a href="https://david-dm.org/Chocobozzz/PeerTube?type=dev">
43     <img src="https://david-dm.org/Chocobozzz/PeerTube/dev-status.svg" alt="devDependency Status" />
44   </a>
45
46   <a href="http://standardjs.com/">
47     <img src="https://img.shields.io/badge/code%20style-standard-brightgreen.svg" alt="JavaScript Style Guide" />
48   </a>
49
50   <a href="https://kiwiirc.com/client/irc.freenode.net/#peertube">
51     <img src="https://img.shields.io/badge/%23peertube-on%20freenode-brightgreen.svg" alt="PeerTube Freenode IRC" />
52   </a>
53 </p>
54
55 <br />
56
57 <p align="center">
58   <a href="https://peertube.cpy.re">
59     <img src="https://lutim.cpy.re/mRdBAdeD.png" alt="screenshot" />
60   </a>
61 </p>
62
63 ## Demonstration
64
65 Want to see it in action?
66
67    * Demonstration servers:
68      * [peertube.cpy.re](http://peertube.cpy.re)
69      * [peertube2.cpy.re](http://peertube2.cpy.re)
70      * [peertube3.cpy.re](http://peertube3.cpy.re)
71    * [Video](https://peertube.cpy.re/videos/watch/f78a97f8-a142-4ce1-a5bd-154bf9386504)
72      to see what the "decentralization feature" looks like
73
74 ## Why
75
76 We can't build a FOSS video streaming alternatives to YouTube, Dailymotion,
77 Vimeo... with a centralized software. One organization alone may not have
78 enough money to pay for bandwidth and video storage of its servers.
79
80 So we need to have a decentralized network of servers seeding videos (as
81 [Diaspora](https://github.com/diaspora/diaspora) for example).  But it's not
82 enough because one video could become famous and overload the server.  It's the
83 reason why we need to use a P2P protocol to limit the server load.  Thanks to
84 [WebTorrent](https://github.com/feross/webtorrent), we can make P2P (thus
85 BitTorrent) inside the web browser, as of today.
86
87 ## Dependencies
88
89   * nginx
90   * PostgreSQL
91   * Redis
92   * **NodeJS >= 8.x**
93   * yarn
94   * OpenSSL (cli)
95   * **FFmpeg >= 3.x**
96
97 ## Run using Docker
98
99 See the [docker guide](/support/doc/docker.md)
100
101 ## Production
102
103 See the [production guide](/support/doc/production.md).
104
105 ## Contributing/Test
106
107 See the [contributing
108 guide](/.github/CONTRIBUTING.md)
109 to see how to test or contribute to PeerTube. Spoiler alert: you don't need to be a
110 coder to help!
111
112 ## API REST documentation
113
114 For now only on Github:
115
116  * HTML version: [/support/doc/api/html/index.html](/support/doc/api/html/index.html)
117  * Swagger/OpenAPI schema: [/support/doc/api/openapi.yaml](/support/doc/api/openapi.yaml)
118
119 ## Tools
120
121  * [Import videos (YouTube, Dailymotion, Vimeo...)](/support/doc/tools.md)
122  * [Upload videos from the CLI](/support/doc/tools.md)
123
124 ## FAQ
125
126 If you have a question, please try to find the answer in the [FAQ](/FAQ.md) first.
127
128 ## Architecture
129
130 See [ARCHITECTURE.md](/ARCHITECTURE.md) for a more detailed explanation.
131
132 ### Backend
133
134   * The backend is a REST API.
135   * Servers communicate with each others with [Activity
136     Pub](https://www.w3.org/TR/activitypub/).
137   * Each server has its own users who query it (search videos, query where the
138     torrent URI of this specific video is...).
139   * If a user uploads a video, the server seeds it and sends its followers some
140     metadata (name, short description, torrent URI...).
141   * A server is a tracker responsible for all the videos uploaded in it.
142   * Even if nobody watches a video, it is seeded by the server (through
143     [WebSeed protocol](http://www.bittorrent.org/beps/bep_0019.html)) where the
144     video was uploaded.
145
146 Here are some simple schemes:
147
148 <p align="center">
149
150 <img src="https://lutim.cpy.re/6Qut3ure.png" alt="Decentralized" />
151
152 <img src="https://lutim.cpy.re/NvRAcv6U.png" alt="Watch a video" />
153
154 <img src="https://lutim.cpy.re/pqKm3Q5S.png" alt="Watch a P2P video" />
155
156 </p>