diff options
Diffstat (limited to 'support/doc')
-rw-r--r-- | support/doc/api/openapi.yaml | 188 | ||||
-rw-r--r-- | support/doc/api/quickstart.md | 12 | ||||
-rw-r--r-- | support/doc/docker.md | 1 | ||||
-rw-r--r-- | support/doc/production.md | 5 | ||||
-rw-r--r-- | support/doc/redundancy.md | 52 | ||||
-rw-r--r-- | support/doc/tools.md | 98 | ||||
-rw-r--r-- | support/doc/user/decentralized.png | bin | 22099 -> 0 bytes | |||
-rw-r--r-- | support/doc/user/decentralized.xml | 1 | ||||
-rw-r--r-- | support/doc/user/redundancy.png | bin | 29641 -> 0 bytes | |||
-rw-r--r-- | support/doc/user/redundancy.xml | 1 | ||||
-rw-r--r-- | support/doc/user/watch-p2p.png | bin | 16838 -> 0 bytes | |||
-rw-r--r-- | support/doc/user/watch-p2p.xml | 1 | ||||
-rw-r--r-- | support/doc/user/watch-video.png | bin | 21543 -> 0 bytes | |||
-rw-r--r-- | support/doc/user/watch-video.xml | 1 |
14 files changed, 232 insertions, 128 deletions
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml index aa6be7e87..cb6ba9af5 100644 --- a/support/doc/api/openapi.yaml +++ b/support/doc/api/openapi.yaml | |||
@@ -1,7 +1,7 @@ | |||
1 | openapi: 3.0.0 | 1 | openapi: 3.0.0 |
2 | info: | 2 | info: |
3 | title: PeerTube | 3 | title: PeerTube |
4 | version: 1.1.0-alpha.2 | 4 | version: 1.1.0 |
5 | contact: | 5 | contact: |
6 | name: PeerTube Community | 6 | name: PeerTube Community |
7 | url: 'https://joinpeertube.org' | 7 | url: 'https://joinpeertube.org' |
@@ -433,7 +433,7 @@ paths: | |||
433 | parameters: | 433 | parameters: |
434 | - $ref: '#/components/parameters/start' | 434 | - $ref: '#/components/parameters/start' |
435 | - $ref: '#/components/parameters/count' | 435 | - $ref: '#/components/parameters/count' |
436 | - $ref: '#/components/parameters/sort' | 436 | - $ref: '#/components/parameters/usersSort' |
437 | responses: | 437 | responses: |
438 | '200': | 438 | '200': |
439 | description: successful operation | 439 | description: successful operation |
@@ -622,15 +622,16 @@ paths: | |||
622 | tags: | 622 | tags: |
623 | - Video | 623 | - Video |
624 | parameters: | 624 | parameters: |
625 | - name: category | 625 | - $ref: '#/components/parameters/categoryOneOf' |
626 | in: query | 626 | - $ref: '#/components/parameters/tagsOneOf' |
627 | required: false | 627 | - $ref: '#/components/parameters/tagsAllOf' |
628 | description: category id of the video | 628 | - $ref: '#/components/parameters/licenceOneOf' |
629 | schema: | 629 | - $ref: '#/components/parameters/languageOneOf' |
630 | type: number | 630 | - $ref: '#/components/parameters/nsfw' |
631 | - $ref: '#/components/parameters/filter' | ||
631 | - $ref: '#/components/parameters/start' | 632 | - $ref: '#/components/parameters/start' |
632 | - $ref: '#/components/parameters/count' | 633 | - $ref: '#/components/parameters/count' |
633 | - $ref: '#/components/parameters/sort' | 634 | - $ref: '#/components/parameters/videosSort' |
634 | responses: | 635 | responses: |
635 | '200': | 636 | '200': |
636 | description: successful operation | 637 | description: successful operation |
@@ -1002,7 +1003,7 @@ paths: | |||
1002 | parameters: | 1003 | parameters: |
1003 | - $ref: '#/components/parameters/start' | 1004 | - $ref: '#/components/parameters/start' |
1004 | - $ref: '#/components/parameters/count' | 1005 | - $ref: '#/components/parameters/count' |
1005 | - $ref: '#/components/parameters/sort' | 1006 | - $ref: '#/components/parameters/abusesSort' |
1006 | responses: | 1007 | responses: |
1007 | '200': | 1008 | '200': |
1008 | description: successful operation | 1009 | description: successful operation |
@@ -1063,7 +1064,7 @@ paths: | |||
1063 | parameters: | 1064 | parameters: |
1064 | - $ref: '#/components/parameters/start' | 1065 | - $ref: '#/components/parameters/start' |
1065 | - $ref: '#/components/parameters/count' | 1066 | - $ref: '#/components/parameters/count' |
1066 | - $ref: '#/components/parameters/sort' | 1067 | - $ref: '#/components/parameters/blacklistsSort' |
1067 | responses: | 1068 | responses: |
1068 | '200': | 1069 | '200': |
1069 | description: successful operation | 1070 | description: successful operation |
@@ -1271,7 +1272,7 @@ paths: | |||
1271 | parameters: | 1272 | parameters: |
1272 | - $ref: '#/components/parameters/start' | 1273 | - $ref: '#/components/parameters/start' |
1273 | - $ref: '#/components/parameters/count' | 1274 | - $ref: '#/components/parameters/count' |
1274 | - $ref: '#/components/parameters/sort' | 1275 | - $ref: '#/components/parameters/videosSearchSort' |
1275 | - name: search | 1276 | - name: search |
1276 | in: query | 1277 | in: query |
1277 | required: true | 1278 | required: true |
@@ -1317,6 +1318,74 @@ components: | |||
1317 | description: Sort column (-createdAt for example) | 1318 | description: Sort column (-createdAt for example) |
1318 | schema: | 1319 | schema: |
1319 | type: string | 1320 | type: string |
1321 | videosSort: | ||
1322 | name: sort | ||
1323 | in: query | ||
1324 | required: false | ||
1325 | description: Sort videos by criteria | ||
1326 | schema: | ||
1327 | type: string | ||
1328 | enum: | ||
1329 | - -name | ||
1330 | - -duration | ||
1331 | - -createdAt | ||
1332 | - -publishedAt | ||
1333 | - -views | ||
1334 | - -likes | ||
1335 | - -trending | ||
1336 | videosSearchSort: | ||
1337 | name: sort | ||
1338 | in: query | ||
1339 | required: false | ||
1340 | description: Sort videos by criteria | ||
1341 | schema: | ||
1342 | type: string | ||
1343 | enum: | ||
1344 | - -name | ||
1345 | - -duration | ||
1346 | - -createdAt | ||
1347 | - -publishedAt | ||
1348 | - -views | ||
1349 | - -likes | ||
1350 | - -match | ||
1351 | blacklistsSort: | ||
1352 | name: sort | ||
1353 | in: query | ||
1354 | required: false | ||
1355 | description: Sort blacklists by criteria | ||
1356 | schema: | ||
1357 | type: string | ||
1358 | enum: | ||
1359 | - -id | ||
1360 | - -name | ||
1361 | - -duration | ||
1362 | - -views | ||
1363 | - -likes | ||
1364 | - -dislikes | ||
1365 | - -uuid | ||
1366 | - -createdAt | ||
1367 | usersSort: | ||
1368 | name: sort | ||
1369 | in: query | ||
1370 | required: false | ||
1371 | description: Sort users by criteria | ||
1372 | schema: | ||
1373 | type: string | ||
1374 | enum: | ||
1375 | - -id | ||
1376 | - -username | ||
1377 | - -createdAt | ||
1378 | abusesSort: | ||
1379 | name: sort | ||
1380 | in: query | ||
1381 | required: false | ||
1382 | description: Sort abuses by criteria | ||
1383 | schema: | ||
1384 | type: string | ||
1385 | enum: | ||
1386 | - -id | ||
1387 | - -createdAt | ||
1388 | - -state | ||
1320 | name: | 1389 | name: |
1321 | name: name | 1390 | name: name |
1322 | in: path | 1391 | in: path |
@@ -1354,6 +1423,94 @@ components: | |||
1354 | description: The comment id | 1423 | description: The comment id |
1355 | schema: | 1424 | schema: |
1356 | type: number | 1425 | type: number |
1426 | categoryOneOf: | ||
1427 | name: categoryOneOf | ||
1428 | in: query | ||
1429 | required: false | ||
1430 | description: category id of the video | ||
1431 | schema: | ||
1432 | oneOf: | ||
1433 | - type: number | ||
1434 | - type: array | ||
1435 | items: | ||
1436 | type: number | ||
1437 | style: form | ||
1438 | explode: false | ||
1439 | tagsOneOf: | ||
1440 | name: tagsOneOf | ||
1441 | in: query | ||
1442 | required: false | ||
1443 | description: tag(s) of the video | ||
1444 | schema: | ||
1445 | oneOf: | ||
1446 | - type: string | ||
1447 | - type: array | ||
1448 | items: | ||
1449 | type: string | ||
1450 | style: form | ||
1451 | explode: false | ||
1452 | tagsAllOf: | ||
1453 | name: tagsAllOf | ||
1454 | in: query | ||
1455 | required: false | ||
1456 | description: tag(s) of the video, where all should be present in the video | ||
1457 | schema: | ||
1458 | oneOf: | ||
1459 | - type: string | ||
1460 | - type: array | ||
1461 | items: | ||
1462 | type: string | ||
1463 | style: form | ||
1464 | explode: false | ||
1465 | languageOneOf: | ||
1466 | name: languageOneOf | ||
1467 | in: query | ||
1468 | required: false | ||
1469 | description: language id of the video | ||
1470 | schema: | ||
1471 | oneOf: | ||
1472 | - type: string | ||
1473 | - type: array | ||
1474 | items: | ||
1475 | type: string | ||
1476 | style: form | ||
1477 | explode: false | ||
1478 | licenceOneOf: | ||
1479 | name: licenceOneOf | ||
1480 | in: query | ||
1481 | required: false | ||
1482 | description: licence id of the video | ||
1483 | schema: | ||
1484 | oneOf: | ||
1485 | - type: number | ||
1486 | - type: array | ||
1487 | items: | ||
1488 | type: number | ||
1489 | style: form | ||
1490 | explode: false | ||
1491 | nsfw: | ||
1492 | name: nsfw | ||
1493 | in: query | ||
1494 | required: false | ||
1495 | description: whether to include nsfw videos, if any | ||
1496 | schema: | ||
1497 | type: string | ||
1498 | enum: | ||
1499 | - 'true' | ||
1500 | - 'false' | ||
1501 | filter: | ||
1502 | name: filter | ||
1503 | in: query | ||
1504 | required: false | ||
1505 | description: > | ||
1506 | Special filters (local for instance) which might require special rights: | ||
1507 | * `local` - only videos local to the instance | ||
1508 | * `all-local` - only videos local to the instance, but showing private and unlisted videos (requires Admin privileges) | ||
1509 | schema: | ||
1510 | type: string | ||
1511 | enum: | ||
1512 | - local | ||
1513 | - all-local | ||
1357 | requestBodies: | 1514 | requestBodies: |
1358 | VideoChannelInput: | 1515 | VideoChannelInput: |
1359 | content: | 1516 | content: |
@@ -1741,7 +1898,12 @@ components: | |||
1741 | type: string | 1898 | type: string |
1742 | description: 'The user videoQuota ' | 1899 | description: 'The user videoQuota ' |
1743 | role: | 1900 | role: |
1744 | type: string | 1901 | type: integer |
1902 | format: int32 | ||
1903 | enum: | ||
1904 | - 0 | ||
1905 | - 1 | ||
1906 | - 2 | ||
1745 | description: 'The user role ' | 1907 | description: 'The user role ' |
1746 | required: | 1908 | required: |
1747 | - username | 1909 | - username |
diff --git a/support/doc/api/quickstart.md b/support/doc/api/quickstart.md index 6c19b59ee..00874a1c9 100644 --- a/support/doc/api/quickstart.md +++ b/support/doc/api/quickstart.md | |||
@@ -6,13 +6,13 @@ | |||
6 | 6 | ||
7 | Some endpoints need authentication. We use OAuth 2.0 so first fetch the client tokens: | 7 | Some endpoints need authentication. We use OAuth 2.0 so first fetch the client tokens: |
8 | 8 | ||
9 | ``` | 9 | ```bash |
10 | $ curl https://peertube.example.com/api/v1/oauth-clients/local | 10 | $ curl https://peertube.example.com/api/v1/oauth-clients/local |
11 | ``` | 11 | ``` |
12 | 12 | ||
13 | Response example: | 13 | Response example: |
14 | 14 | ||
15 | ``` | 15 | ```json |
16 | { | 16 | { |
17 | "client_id": "v1ikx5hnfop4mdpnci8nsqh93c45rldf", | 17 | "client_id": "v1ikx5hnfop4mdpnci8nsqh93c45rldf", |
18 | "client_secret": "AjWiOapPltI6EnsWQwlFarRtLh4u8tDt" | 18 | "client_secret": "AjWiOapPltI6EnsWQwlFarRtLh4u8tDt" |
@@ -23,7 +23,7 @@ Response example: | |||
23 | 23 | ||
24 | Now you can fetch the user token: | 24 | Now you can fetch the user token: |
25 | 25 | ||
26 | ``` | 26 | ```bash |
27 | $ curl -X POST \ | 27 | $ curl -X POST \ |
28 | -d "client_id=v1ikx5hnfop4mdpnci8nsqh93c45rldf&client_secret=AjWiOapPltI6EnsWQwlFarRtLh4u8tDt&grant_type=password&response_type=code&username=your_user&password=your_password" \ | 28 | -d "client_id=v1ikx5hnfop4mdpnci8nsqh93c45rldf&client_secret=AjWiOapPltI6EnsWQwlFarRtLh4u8tDt&grant_type=password&response_type=code&username=your_user&password=your_password" \ |
29 | https://peertube.example.com/api/v1/users/token | 29 | https://peertube.example.com/api/v1/users/token |
@@ -31,7 +31,7 @@ $ curl -X POST \ | |||
31 | 31 | ||
32 | Response example: | 32 | Response example: |
33 | 33 | ||
34 | ``` | 34 | ```json |
35 | { | 35 | { |
36 | "access_token": "90286a0bdf0f7315d9d3fe8dabf9e1d2be9c97d0", | 36 | "access_token": "90286a0bdf0f7315d9d3fe8dabf9e1d2be9c97d0", |
37 | "token_type": "Bearer", | 37 | "token_type": "Bearer", |
@@ -42,13 +42,13 @@ Response example: | |||
42 | 42 | ||
43 | Just use the `access_token` in the `Authorization` header: | 43 | Just use the `access_token` in the `Authorization` header: |
44 | 44 | ||
45 | ``` | 45 | ```bash |
46 | $ curl -H 'Authorization: Bearer 90286a0bdf0f7315d9d3fe8dabf9e1d2be9c97d0' https://peertube.example.com/api/v1/jobs/completed | 46 | $ curl -H 'Authorization: Bearer 90286a0bdf0f7315d9d3fe8dabf9e1d2be9c97d0' https://peertube.example.com/api/v1/jobs/completed |
47 | ``` | 47 | ``` |
48 | 48 | ||
49 | 49 | ||
50 | ### List videos | 50 | ### List videos |
51 | 51 | ||
52 | ``` | 52 | ```bash |
53 | $ curl https://peertube.example.com/api/v1/videos | 53 | $ curl https://peertube.example.com/api/v1/videos |
54 | ``` | 54 | ``` |
diff --git a/support/doc/docker.md b/support/doc/docker.md index cab336344..c20746486 100644 --- a/support/doc/docker.md +++ b/support/doc/docker.md | |||
@@ -63,7 +63,6 @@ Pull the latest images and rerun PeerTube: | |||
63 | 63 | ||
64 | ```shell | 64 | ```shell |
65 | $ cd /your/peertube/directory | 65 | $ cd /your/peertube/directory |
66 | $ docker-compose down | ||
67 | $ docker-compose pull | 66 | $ docker-compose pull |
68 | $ docker-compose up -d | 67 | $ docker-compose up -d |
69 | ``` | 68 | ``` |
diff --git a/support/doc/production.md b/support/doc/production.md index 35c7de3b5..16efe17c4 100644 --- a/support/doc/production.md +++ b/support/doc/production.md | |||
@@ -185,9 +185,8 @@ $ sudo journalctl -feu peertube | |||
185 | On FreeBSD, copy the startup script and update rc.conf: | 185 | On FreeBSD, copy the startup script and update rc.conf: |
186 | 186 | ||
187 | ``` | 187 | ``` |
188 | $ sudo cp /var/www/peertube/peertube-latest/support/freebsd/peertube /usr/local/etc/rc.d/ | 188 | $ sudo install -m 0555 /var/www/peertube/peertube-latest/support/freebsd/peertube /usr/local/etc/rc.d/ |
189 | $ sudo chmod +x /usr/local/etc/rc.d/peertube | 189 | $ sudo sysrc peertube_enable="YES" |
190 | $ sudo echo peertube_enable="YES" >> /etc/rc.conf | ||
191 | ``` | 190 | ``` |
192 | 191 | ||
193 | Run: | 192 | Run: |
diff --git a/support/doc/redundancy.md b/support/doc/redundancy.md deleted file mode 100644 index 00442fd85..000000000 --- a/support/doc/redundancy.md +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | # Redundancy | ||
2 | |||
3 | A PeerTube instance can cache other PeerTube videos to improve bandwidth of popular videos or small instances. | ||
4 | |||
5 | ## How it works | ||
6 | |||
7 | The instance administrator can choose between multiple redundancy strategies (cache trending videos or recently uploaded videos etc), set their maximum size and the minimum duplication lifetime. | ||
8 | Then, they choose the instances they want to cache in `Manage follows -> Following` admin table. | ||
9 | |||
10 | <p align="center"> | ||
11 | |||
12 | <img src="user/redundancy.png" alt="Redundancy" /> | ||
13 | |||
14 | </p> | ||
15 | |||
16 | Videos are kept in the cache for at least `min_lifetime`, and then evicted when the cache is full. | ||
17 | |||
18 | When PeerTube chooses a video to duplicate, it imports all the resolution files (to avoid consistency issues) using their magnet URI and put them in the `storage.videos` directory. | ||
19 | Then it sends a `Create -> CacheFile` ActivityPub message to other federated instances. This new instance is injected as [WebSeed](https://github.com/Chocobozzz/PeerTube/blob/develop/FAQ.md#what-is-webseed) in the magnet URI by instances that received this ActivityPub message. | ||
20 | |||
21 | ## Stats | ||
22 | |||
23 | See the `/api/v1/server/stats` endpoint. For example: | ||
24 | |||
25 | ``` | ||
26 | { | ||
27 | ... | ||
28 | "videosRedundancy": [ | ||
29 | { | ||
30 | "totalUsed": 0, | ||
31 | "totalVideos": 0, | ||
32 | "totalVideoFiles": 0, | ||
33 | "strategy": "most-views", | ||
34 | "totalSize": 104857600 | ||
35 | }, | ||
36 | { | ||
37 | "totalUsed": 0, | ||
38 | "totalVideos": 0, | ||
39 | "totalVideoFiles": 0, | ||
40 | "strategy": "trending", | ||
41 | "totalSize": 104857600 | ||
42 | }, | ||
43 | { | ||
44 | "totalUsed": 0, | ||
45 | "totalVideos": 0, | ||
46 | "totalVideoFiles": 0, | ||
47 | "strategy": "recently-added", | ||
48 | "totalSize": 104857600 | ||
49 | } | ||
50 | ] | ||
51 | } | ||
52 | ``` | ||
diff --git a/support/doc/tools.md b/support/doc/tools.md index 1c7739525..4f806a9db 100644 --- a/support/doc/tools.md +++ b/support/doc/tools.md | |||
@@ -4,13 +4,13 @@ | |||
4 | <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> | 4 | <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> |
5 | **Table of Contents** | 5 | **Table of Contents** |
6 | 6 | ||
7 | - [CLI wrapper](#cli-wrapper) | ||
8 | - [Remote Tools](#remote-tools) | 7 | - [Remote Tools](#remote-tools) |
9 | - [Dependencies](#dependencies) | 8 | - [Dependencies](#dependencies) |
10 | - [Installation](#installation) | 9 | - [Installation](#installation) |
11 | - [peertube-import-videos.js](#peertube-import-videosjs) | 10 | - [CLI wrapper](#cli-wrapper) |
12 | - [peertube-upload.js](#peertube-uploadjs) | 11 | - [peertube-import-videos.js](#peertube-import-videosjs) |
13 | - [peertube-watch.js](#peertube-watchjs) | 12 | - [peertube-upload.js](#peertube-uploadjs) |
13 | - [peertube-watch.js](#peertube-watchjs) | ||
14 | - [Server tools](#server-tools) | 14 | - [Server tools](#server-tools) |
15 | - [parse-log](#parse-log) | 15 | - [parse-log](#parse-log) |
16 | - [create-transcoding-job.js](#create-transcoding-jobjs) | 16 | - [create-transcoding-job.js](#create-transcoding-jobjs) |
@@ -26,9 +26,40 @@ | |||
26 | 26 | ||
27 | <!-- END doctoc generated TOC please keep comment here to allow auto update --> | 27 | <!-- END doctoc generated TOC please keep comment here to allow auto update --> |
28 | 28 | ||
29 | ## CLI wrapper | 29 | ## Remote Tools |
30 | |||
31 | You need at least 512MB RAM to run the script. | ||
32 | Scripts can be launched directly from a PeerTube server, or from a separate server, even a desktop PC. | ||
33 | You need to follow all the following steps even if you are on a PeerTube server (including cloning the git repository in a different directory than your production installation because the scripts utilize non-production dependencies). | ||
34 | |||
35 | ### Dependencies | ||
36 | |||
37 | Install the [PeerTube dependencies](dependencies.md). | ||
38 | |||
39 | ### Installation | ||
40 | |||
41 | Clone the PeerTube repo to get the latest version (even if you are on your PeerTube server): | ||
42 | |||
43 | ``` | ||
44 | $ git clone https://github.com/Chocobozzz/PeerTube.git | ||
45 | $ CLONE="$(pwd)/PeerTube" | ||
46 | ``` | ||
47 | |||
48 | Run ``yarn install --pure-lockfile`` | ||
49 | ``` | ||
50 | $ cd ${CLONE} | ||
51 | $ yarn install --pure-lockfile | ||
52 | ``` | ||
53 | |||
54 | Build server tools: | ||
55 | ``` | ||
56 | $ cd ${CLONE} | ||
57 | $ npm run build:server | ||
58 | ``` | ||
59 | |||
60 | ### CLI wrapper | ||
30 | 61 | ||
31 | The wrapper provides a convenient interface to most scripts, and requires the [same dependencies](#dependencies). You can access it as `peertube` via an alias in your `.bashrc` like `alias peertube="node ${PEERTUBE_PATH}/dist/server/tools/peertube.js"`: | 62 | The wrapper provides a convenient interface to the following scripts. You can access it as `peertube` via an alias in your `.bashrc` like `alias peertube="node /your/peertube/directory/dist/server/tools/peertube.js"`: |
32 | 63 | ||
33 | ``` | 64 | ``` |
34 | Usage: peertube [command] [options] | 65 | Usage: peertube [command] [options] |
@@ -51,12 +82,12 @@ The wrapper provides a convenient interface to most scripts, and requires the [s | |||
51 | The wrapper can keep track of instances you have an account on. We limit to one account per instance for now. | 82 | The wrapper can keep track of instances you have an account on. We limit to one account per instance for now. |
52 | 83 | ||
53 | ```bash | 84 | ```bash |
54 | $ peertube auth add -u "PEERTUBE_URL" -U "PEERTUBE_USER" --password "PEERTUBE_PASSWORD" | 85 | $ peertube auth add -u 'PEERTUBE_URL' -U 'PEERTUBE_USER' --password 'PEERTUBE_PASSWORD' |
55 | $ peertube auth list | 86 | $ peertube auth list |
56 | ┌──────────────────────────────┬──────────────────────────────┐ | 87 | ┌──────────────────────────────┬──────────────────────────────┐ |
57 | │ instance │ login │ | 88 | │ instance │ login │ |
58 | ├──────────────────────────────┼──────────────────────────────┤ | 89 | ├──────────────────────────────┼──────────────────────────────┤ |
59 | │ "PEERTUBE_URL" │ "PEERTUBE_USER" │ | 90 | │ 'PEERTUBE_URL' │ 'PEERTUBE_USER' │ |
60 | └──────────────────────────────┴──────────────────────────────┘ | 91 | └──────────────────────────────┴──────────────────────────────┘ |
61 | ``` | 92 | ``` |
62 | 93 | ||
@@ -72,53 +103,22 @@ And now that your video is online, you can watch it from the confort of your ter | |||
72 | $ peertube watch https://peertube.cpy.re/videos/watch/e8a1af4e-414a-4d58-bfe6-2146eed06d10 | 103 | $ peertube watch https://peertube.cpy.re/videos/watch/e8a1af4e-414a-4d58-bfe6-2146eed06d10 |
73 | ``` | 104 | ``` |
74 | 105 | ||
75 | ## Remote Tools | 106 | #### peertube-import-videos.js |
76 | |||
77 | You need at least 512MB RAM to run the script. | ||
78 | Scripts can be launched directly from a PeerTube server, or from a separate server, even a desktop PC. | ||
79 | You need to follow all the following steps even if you are on a PeerTube server (including cloning the git repository in a different directory than your production installation because the scripts utilize non-production dependencies). | ||
80 | |||
81 | ### Dependencies | ||
82 | |||
83 | Install the [PeerTube dependencies](dependencies.md). | ||
84 | |||
85 | ### Installation | ||
86 | |||
87 | Clone the PeerTube repo to get the latest version (even if you are on your PeerTube server): | ||
88 | |||
89 | ``` | ||
90 | $ git clone https://github.com/Chocobozzz/PeerTube.git | ||
91 | $ CLONE="$(pwd)/PeerTube" | ||
92 | ``` | ||
93 | |||
94 | Run ``yarn install`` | ||
95 | ``` | ||
96 | $ cd ${CLONE} | ||
97 | $ yarn install | ||
98 | ``` | ||
99 | |||
100 | Build server tools: | ||
101 | ``` | ||
102 | $ cd ${CLONE} | ||
103 | $ npm run build:server | ||
104 | ``` | ||
105 | |||
106 | ### peertube-import-videos.js | ||
107 | 107 | ||
108 | You can use this script to import videos from all [supported sites of youtube-dl](https://rg3.github.io/youtube-dl/supportedsites.html) into PeerTube. | 108 | You can use this script to import videos from all [supported sites of youtube-dl](https://rg3.github.io/youtube-dl/supportedsites.html) into PeerTube. |
109 | Be sure you own the videos or have the author's authorization to do so. | 109 | Be sure you own the videos or have the author's authorization to do so. |
110 | 110 | ||
111 | ```sh | 111 | ```sh |
112 | $ node dist/server/tools/peertube-import-videos.js \ | 112 | $ node dist/server/tools/peertube-import-videos.js \ |
113 | -u "PEERTUBE_URL" \ | 113 | -u 'PEERTUBE_URL' \ |
114 | -U "PEERTUBE_USER" \ | 114 | -U 'PEERTUBE_USER' \ |
115 | --password "PEERTUBE_PASSWORD" \ | 115 | --password 'PEERTUBE_PASSWORD' \ |
116 | -t "TARGET_URL" | 116 | -t 'TARGET_URL' |
117 | ``` | 117 | ``` |
118 | 118 | ||
119 | * `PEERTUBE_URL` : the full URL of your PeerTube server where you want to import, eg: https://peertube.cpy.re | 119 | * `PEERTUBE_URL` : the full URL of your PeerTube server where you want to import, eg: https://peertube.cpy.re |
120 | * `PEERTUBE_USER` : your PeerTube account where videos will be uploaded | 120 | * `PEERTUBE_USER` : your PeerTube account where videos will be uploaded |
121 | * `PEERTUBE_PASSWORD` : password of your PeerTube account (if omitted, you will be prompted for it) | 121 | * `PEERTUBE_PASSWORD` : password of your PeerTube account (if `PEERTUBE_PASSWORD` is omitted, you will be prompted for it) |
122 | * `TARGET_URL` : the target url you want to import. Examples: | 122 | * `TARGET_URL` : the target url you want to import. Examples: |
123 | * YouTube: | 123 | * YouTube: |
124 | * Channel: https://www.youtube.com/channel/ChannelId | 124 | * Channel: https://www.youtube.com/channel/ChannelId |
@@ -133,7 +133,7 @@ Already downloaded videos will not be uploaded twice, so you can run and re-run | |||
133 | Videos will be publicly available after transcoding (you can see them before that in your account on the web interface). | 133 | Videos will be publicly available after transcoding (you can see them before that in your account on the web interface). |
134 | 134 | ||
135 | 135 | ||
136 | ### peertube-upload.js | 136 | #### peertube-upload.js |
137 | 137 | ||
138 | You can use this script to import videos directly from the CLI. | 138 | You can use this script to import videos directly from the CLI. |
139 | 139 | ||
@@ -144,7 +144,7 @@ $ cd ${CLONE} | |||
144 | $ node dist/server/tools/peertube-upload.js --help | 144 | $ node dist/server/tools/peertube-upload.js --help |
145 | ``` | 145 | ``` |
146 | 146 | ||
147 | ### peertube-watch.js | 147 | #### peertube-watch.js |
148 | 148 | ||
149 | You can use this script to play videos directly from the CLI. | 149 | You can use this script to play videos directly from the CLI. |
150 | 150 | ||
@@ -198,10 +198,10 @@ $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production | |||
198 | ### prune-storage.js | 198 | ### prune-storage.js |
199 | 199 | ||
200 | Some transcoded videos or shutdown at a bad time can leave some unused files on your storage. | 200 | Some transcoded videos or shutdown at a bad time can leave some unused files on your storage. |
201 | To delete them (a confirmation will be demanded first): | 201 | Stop PeerTube and delete these files (a confirmation will be demanded first): |
202 | 202 | ||
203 | ``` | 203 | ``` |
204 | $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run prune-storage | 204 | $ sudo systemctl stop peertube && sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run prune-storage |
205 | ``` | 205 | ``` |
206 | 206 | ||
207 | ### optimize-old-videos.js | 207 | ### optimize-old-videos.js |
diff --git a/support/doc/user/decentralized.png b/support/doc/user/decentralized.png deleted file mode 100644 index 8c23e2832..000000000 --- a/support/doc/user/decentralized.png +++ /dev/null | |||
Binary files differ | |||
diff --git a/support/doc/user/decentralized.xml b/support/doc/user/decentralized.xml deleted file mode 100644 index 952b9f4e7..000000000 --- a/support/doc/user/decentralized.xml +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | <mxfile userAgent="Mozilla/5.0 (X11; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0" version="9.1.8" editor="www.draw.io" type="device"><diagram id="2f5eda5b-dbab-6be5-4dc5-833b4d942388" name="Page-1">7Vptb9owEP41kdYPQ4lNAv24vm37sGkaq7p9NMlBooaYOaZAf/3sxM6rw2gVKFuL1Co+n8/O85zvzgYLXy42HxlZhl9oALGF7GBj4SsLoRGyxX8p2OaC4VAJ5iwKcpFTCibRIyihVltFAaQ1RU5pzKNlXejTJAGf12SEMbquq81oXJ91SebQEkx8Ereld1HAw1w6du1S/gmieahndmzVMyX+/ZzRVaLmsxCeZZ+8e0G0LaWfhiSg64oIX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vdk7idN5x/Xi7gvqgKRhcckjG98IF0QmmUReC2lGG0d8A8UvdupHzsCtR4pnn/tbpvo7+Ytm+TuHXL38LQm+/gM=</diagram></mxfile> \ No newline at end of file | ||
diff --git a/support/doc/user/redundancy.png b/support/doc/user/redundancy.png deleted file mode 100644 index 0184fb78e..000000000 --- a/support/doc/user/redundancy.png +++ /dev/null | |||
Binary files differ | |||
diff --git a/support/doc/user/redundancy.xml b/support/doc/user/redundancy.xml deleted file mode 100644 index c501b63d5..000000000 --- a/support/doc/user/redundancy.xml +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | <mxfile userAgent="Mozilla/5.0 (X11; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0" version="9.1.8" editor="www.draw.io" type="device"><diagram id="2f5eda5b-dbab-6be5-4dc5-833b4d942388" name="Page-1">7Vpbc5s4FP41zLQP8YAE2HmM3aa7D7vTadpp+yiDMJpg5AU5tvfXrwQSFyG8xMWJJ25m2jFHQpfzHX3nIiy4WO8/ZWgT/0VDnFjADvcW/GABMJva/H8hOJQC15WCVUbCUuTUggfyL5ZC1W1LQpy3OjJKE0Y2bWFA0xQHrCVDWUZ37W4RTdqzbtAKdwQPAUq60u8kZLHclmfX8j8wWcVqZseWLUsUPK4yuk3lfBaAUfFXNq+RGkv2z2MU0l1DBD9acJFRyspf6/0CJ0K1Sm3le/c9rdW6M5yyIS/MyheeULLFasXFuthB6aLYDRb9bQvOdzFh+GGDAtG64+BzWczWCX9y+M+cZfQRL2hCs+JtaBd/VYvSpugbkSRp9Iwi7AeBkNOUmUZACVmlXBbwvWHeOO9uVu7/CWcM7xsiuflPmK4xyw68i2r15SvKUBWQuxp2T4EVNyH3pRBJU1tVY9fq5j+kxs3an16O9kOEZ9Fra382UPkQjKB82FH+A8742rnsGAzO+WBIaYpfGAHPaSPgGOzfMUEwhvm7/QjAq0EA2K+IgN9B4Fsu9D+q7mdgCX1/EAl5eBa6LwwA1F2A/4IAqIDnmAvAaXgnYpraPnO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W9zgtDaC8QXEZeJtk5qo6ZlWF08xnvHsV938yO1sd5DpPT3DEuln7De8b0l0qiqeWrJgWpXBaKDvZWGV5fDgLnbqKlDISCdTLKjzNyIp7SpVoCmuISRCLQUNVrF+XuuUMUhKrLSmz9wboClJSCNoOVd3dNlPS6W3/YXpGSsof62+gSyOuvzOHH/8D</diagram></mxfile> \ No newline at end of file | ||
diff --git a/support/doc/user/watch-p2p.png b/support/doc/user/watch-p2p.png deleted file mode 100644 index 873309434..000000000 --- a/support/doc/user/watch-p2p.png +++ /dev/null | |||
Binary files differ | |||
diff --git a/support/doc/user/watch-p2p.xml b/support/doc/user/watch-p2p.xml deleted file mode 100644 index 7f2cdb627..000000000 --- a/support/doc/user/watch-p2p.xml +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | <mxfile userAgent="Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0" version="9.1.0" editor="www.draw.io" type="device"><diagram id="cb5ce52d-ab91-b6cb-bd1a-da918a399df8" name="Page-1">7VpLc5swEP41nmkO7YAEmB5jN2kvncnU6aQ5yrA2TDByhfzqr68EEpiHiRNjx23sQ5BWK2l3v88rsXEPD2frr4zMg+/Uh6iHDH/dw196CJkWssRDSjaZpG+bmWDKQl8pFYJR+AeU0FDSRehDUlLklEY8nJeFHo1j8HhJRhijq7LahEblXedkCjXByCNRXfoQ+jzIpK5tFPJvEE4DvbNpqJEx8Z6mjC5itV8P4Un6yYZnRK+l9JOA+HS1JcI3PTxklPKsNVsPIZKx1WHL5t3uGM3tZhDzfSYonJYkWoC2OLWLb3QsUm9A6hs9PFgFIYfRnHhydCXQF7KAzyLRM0Uz4Yw+wZBGlKWzsZF+8hEdTak7CaNoS3MyAcfzpJzGvGkFEoXTWMg84RuIwYGyHRiH9U7/zTyqgq1AZ8DZRqjoCY6aoohqaSBXBey2BivYgjxHkCiqTfO1i3CLhop4c/Tt84m+T8CdvHX0Rfj3i77pdBB9txb9n4nwDBm4BQXzFSi4aIwdZy8UbHB968Qo2KjyHbDrKJhNKHQBgmnWUBgBW6Y4mB3jsOe3IaYxnBgCXP0iOKeEoCkNORFXMSgh4PxeUD3wMUnP7WuJlDNfF4OiNZXPgTgMQZyEajFhR7ZeNtplqlOQnR2ujr7QbDTOTg3XfgOsuAtYnSPBesuE1gXX564Nx8IV1TOmOrfabg//4blVTZonPbf0Va2OQten1pmjkDv8JijscYMWmepavhJKvyOSJKGXxpIwXhe/4vaAWuItQsg2v2Ti+yQsVf1HtQGsQ56N2ar3qFJk5gL4tXfUCibCTbpgHpQZKTybQv5i2ozd9v26ARotYxARHi7LZjThpXa4o2F6sOTX+3KWdKrpLzNfzdp+S60shCrp1nYrC2U+1xYSAJPNltpcKiS7DUaVjIJdo9Uu/LlVXzQyCwou5xjsR++mI/ws6X18dusy0IXdpeT4QkL1/xVC9Y/OKPdCqAPTpe2+LF1a9pHTZb2ic6bs3pPcZqfpMovGhd17stuqlMVsq53dqOJgRf9wdn++sLuF3e5bkttCFezNsyd3K1mfTfVdk1sngwu5m+4ll8x90L3k+cx9ZHLXK3YvrsTipkrsA+FeAIkMjSzHGgmAL3s8ANkjM/lYhj5Q8fzwAOORUOghYbAhOj/uh1l7EPJ7yiQpr7RdY1aUc99tlRdbFb42lbaayrxdlLYwPhJpRiWSVNlx9Y7xzkv2+v1EL3GKUiY+/N81yNyZJKRxBdo7EO5iN+lRLP7cobv3zKRKYdB065kjZ82BTBLd4vdC2elU/CgL3/wF</diagram></mxfile> \ No newline at end of file | ||
diff --git a/support/doc/user/watch-video.png b/support/doc/user/watch-video.png deleted file mode 100644 index 8744c793c..000000000 --- a/support/doc/user/watch-video.png +++ /dev/null | |||
Binary files differ | |||
diff --git a/support/doc/user/watch-video.xml b/support/doc/user/watch-video.xml deleted file mode 100644 index e2b46aa8b..000000000 --- a/support/doc/user/watch-video.xml +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | <mxfile userAgent="Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0" version="9.1.0" editor="www.draw.io" type="device"><diagram id="067b0f1f-1608-c9cb-8da6-67e6cbc055e3" name="Page-1">7Vpbc5s6EP41PNYDEmD8mKRN25l2pnPcTk4fZVgDE4xcgWP7/PojgYSRgNTxJUnr+CERq+t+37IX2Ra+WWw+MrJMvtIIMgvZ0cbC7y2EHBe5/J+QbGvJ2HNqQczSSA7aCabpfyCFtpSu0ggKbWBJaVamS10Y0jyHsNRkhDG61ofNaabvuiQxdATTkGRd6V0alUktDTx7J/8EaZyonR1b9sxIeB8zusrlfhbC8+pTdy+IWkuOLxIS0XVLhD9Y+IZRWtatxeYGMoGtgq2edzvQ25ybQV7uMwHVEx5ItgJ14upc5VZhUWkDYrxt4et1kpYwXZJQ9K45+1yWlIuMPzm8WZSM3sMNzSirZmO7+jQ9Ck0xdp5mWWvkfA5+GAo5zcu+FUiWxjmXhVw34J3X8uzAStgM6u80qHJrBbqAkm35EDXBl1OkobqKyPWOdk+RlbQp96WQSFOLm7V3cPOGRLwfffx60I8IBPOXRj/YE3yMTgC+2wF/Coyrw2WP0eCcj4ac5vDMDHiOzoDTY/9OHwWnMH9vmAF8MQwg+wUZ8DsM/CgE/ifFPkAz7Pt7OSEPgsh9ZgKwGQL8ZyRg/PsIAHl0JVIaoXZGiiINKygJK7viA14B9AjcHEG2/VfGnurhp3gYeeJxk5ZV12isHn/KrWsVIDJyrIKuWAjaq8+1iEHCOdmbuHZ46OFFyRhkpEwf9EP0kSV3+EZTvvFgcPKxwXetj5zVzrGMhZDhY73AWKhGobMQp5dsW8OWYkAxfGA0sbV9sKPlfrxRr7gzzAbTvWw1+DNs1XnMVtEBtuq+2erJbdVz9X1ObauT4dRCMfz3pxZmZOvLr88W2VQp/we6i8N8gvfmE/SFDnht1U5PNpqzJT4yYigDcYajib2f5fivP5pgI5FwTX+wr+Xgia97efd8ltMt5y3kZxyY6xlvxKLhjJSIr9ZI+aSr4t4St4QiPBCxSBoB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