51c3747e8755546886d4eb2332260cebb52e7e3e
[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 developed by [Framasoft](https://framasoft.org/?l=en), a non-profit
11 that promotes and spreads free culture in general, and free-libre software in
12 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   
28   <img src="http://lutim.cpy.re/js3rkfIc.png" alt="Browser Stack" />
29 </p>
30
31 <p align="center">
32   <strong>Server</strong>
33
34   <br />
35
36   <a href="https://travis-ci.org/Chocobozzz/PeerTube">
37     <img src="https://travis-ci.org/Chocobozzz/PeerTube.svg?branch=develop" alt="Build Status" />
38   </a>
39
40   <a href="https://david-dm.org/Chocobozzz/PeerTube">
41     <img src="https://david-dm.org/Chocobozzz/PeerTube.svg" alt="Dependencies Status" />
42   </a>
43
44   <a href="https://david-dm.org/Chocobozzz/PeerTube?type=dev">
45     <img src="https://david-dm.org/Chocobozzz/PeerTube/dev-status.svg" alt="devDependency Status" />
46   </a>
47
48   <a href="http://standardjs.com/">
49     <img src="https://img.shields.io/badge/code%20style-standard-brightgreen.svg" alt="JavaScript Style Guide" />
50   </a>
51
52   <a href="https://kiwiirc.com/client/irc.freenode.net/#peertube">
53     <img src="https://img.shields.io/badge/%23peertube-on%20freenode-brightgreen.svg" alt="PeerTube Freenode IRC" />
54   </a>
55 </p>
56
57 <br />
58
59 <p align="center">
60   <a href="https://peertube.cpy.re">
61     <img src="https://lutim.cpy.re/mRdBAdeD.png" alt="screenshot" />
62   </a>
63 </p>
64
65 <p align="center">
66   <strong><a title="Website" target="_blank" href="https://joinpeertube.org">Website</a> |
67   <a title="Instances list" target="_blank" href="https://instances.joinpeertube.org">Instances list</a>
68   </strong>
69 </p>
70
71 ## Demonstration
72
73 Want to see it in action?
74
75    * Demonstration servers:
76      * [peertube.cpy.re](http://peertube.cpy.re)
77      * [peertube2.cpy.re](http://peertube2.cpy.re)
78      * [peertube3.cpy.re](http://peertube3.cpy.re)
79    * [Video](https://peertube.cpy.re/videos/watch/f78a97f8-a142-4ce1-a5bd-154bf9386504)
80      to see what the "decentralization feature" looks like
81    * [Video](https://peertube.cpy.re/videos/watch/da2b08d4-a242-4170-b32a-4ec8cbdca701) to see
82    the communication between PeerTube and [Mastodon](https://github.com/tootsuite/mastodon)
83
84 ## Why
85
86 We can't build a FOSS video streaming alternatives to YouTube, Dailymotion,
87 Vimeo... with a centralized software. One organization alone may not have
88 enough money to pay for bandwidth and video storage of its servers.
89
90 So we need to have a decentralized network of servers seeding videos (as
91 [Diaspora](https://github.com/diaspora/diaspora) for example).  But it's not
92 enough because one video could become famous and overload the server.  It's the
93 reason why we need to use a P2P protocol to limit the server load.  Thanks to
94 [WebTorrent](https://github.com/feross/webtorrent), we can make P2P (thus
95 BitTorrent) inside the web browser, as of today.
96
97 ## Dependencies
98
99   * nginx
100   * PostgreSQL
101   * Redis
102   * **NodeJS >= 8.x**
103   * yarn
104   * OpenSSL (cli)
105   * **FFmpeg >= 3.x**
106
107 ## Run using Docker
108
109 See the [docker guide](/support/doc/docker.md)
110
111 ## Production
112
113 See the [production guide](/support/doc/production.md).
114
115 ## Contributing/Test
116
117 See the [contributing
118 guide](/.github/CONTRIBUTING.md)
119 to see how to test or contribute to PeerTube. Spoiler alert: you don't need to be a
120 coder to help!
121
122 ## API REST documentation
123
124 Quick Start: [/support/doc/api/quickstart.md](/support/doc/api/quickstart.md)
125
126 Endpoints documentation:
127
128  * HTML version: [/support/doc/api/html/index.html](https://htmlpreview.github.io/?https://github.com/Chocobozzz/PeerTube/blob/develop/support/doc/api/html/index.html)
129  * Swagger/OpenAPI schema: [/support/doc/api/openapi.yaml](/support/doc/api/openapi.yaml)
130
131 ## Tools
132
133  * [Import videos (YouTube, Dailymotion, Vimeo...)](/support/doc/tools.md)
134  * [Upload videos from the CLI](/support/doc/tools.md)
135
136 ## FAQ
137
138 If you have a question, please try to find the answer in the [FAQ](/FAQ.md) first.
139
140 ## Architecture
141
142 See [ARCHITECTURE.md](/ARCHITECTURE.md) for a more detailed explanation.
143
144 ### Backend
145
146   * The backend is a REST API.
147   * Servers communicate with each others with [Activity
148     Pub](https://www.w3.org/TR/activitypub/).
149   * Each server has its own users who query it (search videos, query where the
150     torrent URI of this specific video is...).
151   * If a user uploads a video, the server seeds it and sends its followers some
152     metadata (name, short description, torrent URI...).
153   * A server is a tracker responsible for all the videos uploaded in it.
154   * Even if nobody watches a video, it is seeded by the server (through
155     [WebSeed protocol](http://www.bittorrent.org/beps/bep_0019.html)) where the
156     video was uploaded.
157
158 Here are some simple schemes:
159
160 <p align="center">
161
162 <img src="https://lutim.cpy.re/6Qut3ure.png" alt="Decentralized" />
163
164 <img src="https://lutim.cpy.re/NvRAcv6U.png" alt="Watch a video" />
165
166 <img src="https://lutim.cpy.re/pqKm3Q5S.png" alt="Watch a P2P video" />
167
168 </p>
169
170 ## License
171
172 Copyright (C) 2018 PeerTube Contributors
173
174 This program is free software: you can redistribute it and/or modify
175 it under the terms of the GNU Affero General Public License as published
176 by the Free Software Foundation, either version 3 of the License, or
177 (at your option) any later version.
178
179 This program is distributed in the hope that it will be useful,
180 but WITHOUT ANY WARRANTY; without even the implied warranty of
181 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
182 GNU Affero General Public License for more details.
183
184 You should have received a copy of the GNU Affero General Public License
185 along with this program.  If not, see <http://www.gnu.org/licenses/>.