diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2018-10-14 21:08:52 +0200 |
---|---|---|
committer | Rigel Kent <sendmemail@rigelk.eu> | 2018-10-14 21:08:52 +0200 |
commit | 12b119c05aea63ab225210479ebbe681303f26f3 (patch) | |
tree | 6d3c5f4d0c5f4270711d6e43372eaa3ec37a178b /support/doc | |
parent | 1e59ca3bace6e9fbe53b1c9354cecb7604ce285b (diff) | |
download | PeerTube-12b119c05aea63ab225210479ebbe681303f26f3.tar.gz PeerTube-12b119c05aea63ab225210479ebbe681303f26f3.tar.zst PeerTube-12b119c05aea63ab225210479ebbe681303f26f3.zip |
(doc) update architecture, tools and readme
Diffstat (limited to 'support/doc')
-rw-r--r-- | support/doc/tools.md | 45 |
1 files changed, 37 insertions, 8 deletions
diff --git a/support/doc/tools.md b/support/doc/tools.md index 0df8c9f6c..7f93c94f2 100644 --- a/support/doc/tools.md +++ b/support/doc/tools.md | |||
@@ -1,3 +1,30 @@ | |||
1 | <!-- START doctoc generated TOC please keep comment here to allow auto update --> | ||
2 | <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> | ||
3 | **Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* | ||
4 | |||
5 | - [CLI tools guide](#cli-tools-guide) | ||
6 | - [CLI wrapper](#cli-wrapper) | ||
7 | - [Remote Tools](#remote-tools) | ||
8 | - [Dependencies](#dependencies) | ||
9 | - [Installation](#installation) | ||
10 | - [peertube-import-videos.js](#peertube-import-videosjs) | ||
11 | - [peertube-upload.js](#peertube-uploadjs) | ||
12 | - [peertube-watch.js](#peertube-watchjs) | ||
13 | - [Server tools](#server-tools) | ||
14 | - [parse-log](#parse-log) | ||
15 | - [create-transcoding-job.js](#create-transcoding-jobjs) | ||
16 | - [create-import-video-file-job.js](#create-import-video-file-jobjs) | ||
17 | - [prune-storage.js](#prune-storagejs) | ||
18 | - [optimize-old-videos.js](#optimize-old-videosjs) | ||
19 | - [update-host.js](#update-hostjs) | ||
20 | - [REPL (Read Eval Print Loop)](#repl-read-eval-print-loop) | ||
21 | - [.help](#help) | ||
22 | - [Lodash example](#lodash-example) | ||
23 | - [YoutubeDL example](#youtubedl-example) | ||
24 | - [Models examples](#models-examples) | ||
25 | |||
26 | <!-- END doctoc generated TOC please keep comment here to allow auto update --> | ||
27 | |||
1 | # CLI tools guide | 28 | # CLI tools guide |
2 | - [CLI wrapper](#cli-wrapper) | 29 | - [CLI wrapper](#cli-wrapper) |
3 | - [Remote tools](#remote-tools) | 30 | - [Remote tools](#remote-tools) |
@@ -159,7 +186,7 @@ $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production | |||
159 | 186 | ||
160 | ### create-transcoding-job.js | 187 | ### create-transcoding-job.js |
161 | 188 | ||
162 | You can use this script to force transcoding of an existing video. | 189 | You can use this script to force transcoding of an existing video. PeerTube needs to be running. |
163 | 190 | ||
164 | ``` | 191 | ``` |
165 | $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-transcoding-job -- -v [videoUUID] | 192 | $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-transcoding-job -- -v [videoUUID] |
@@ -172,7 +199,7 @@ $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production | |||
172 | 199 | ||
173 | ### create-import-video-file-job.js | 200 | ### create-import-video-file-job.js |
174 | 201 | ||
175 | You can use this script to import a video file to replace an already uploaded file or to add a new resolution to a video. | 202 | You can use this script to import a video file to replace an already uploaded file or to add a new resolution to a video. PeerTube needs to be running. |
176 | 203 | ||
177 | ``` | 204 | ``` |
178 | $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-import-video-file-job -- -v [videoUUID] -i [videoFile] | 205 | $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-import-video-file-job -- -v [videoUUID] -i [videoFile] |
@@ -189,9 +216,10 @@ $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production | |||
189 | 216 | ||
190 | ### optimize-old-videos.js | 217 | ### optimize-old-videos.js |
191 | 218 | ||
192 | Before version v1.0.0-beta.16, Peertube did not specify a bitrate for the transcoding of uploaded videos. | 219 | Before version v1.0.0-beta.16, Peertube did not specify a bitrate for the |
193 | This means that videos might be encoded into very large files that are too large for streaming. This script | 220 | transcoding of uploaded videos. This means that videos might be encoded into |
194 | re-transcodes these videos so that they can be watched properly, even on slow connections. | 221 | very large files that are too large for streaming. This script re-transcodes |
222 | these videos so that they can be watched properly, even on slow connections. | ||
195 | 223 | ||
196 | ``` | 224 | ``` |
197 | $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run optimize-old-videos | 225 | $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run optimize-old-videos |
@@ -200,8 +228,9 @@ $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production | |||
200 | 228 | ||
201 | ### update-host.js | 229 | ### update-host.js |
202 | 230 | ||
203 | If you started PeerTube with a domain, and then changed it you will have invalid torrent files and invalid URLs in your database. | 231 | If you started PeerTube with a domain, and then changed it you will have |
204 | To fix this, you have to run: | 232 | invalid torrent files and invalid URLs in your database. To fix this, you have |
233 | to run: | ||
205 | 234 | ||
206 | ``` | 235 | ``` |
207 | $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run update-host | 236 | $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run update-host |
@@ -209,7 +238,7 @@ $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production | |||
209 | 238 | ||
210 | ### REPL ([Read Eval Print Loop](https://nodejs.org/docs/latest-v8.x/api/repl.html)) | 239 | ### REPL ([Read Eval Print Loop](https://nodejs.org/docs/latest-v8.x/api/repl.html)) |
211 | 240 | ||
212 | If you want to interact with the application libraries and objects, there is a REPL for that. | 241 | If you want to interact with the application libraries and objects even when PeerTube is not running, there is a REPL for that. |
213 | 242 | ||
214 | usage: `node ./dist/server/tools/repl.js` | 243 | usage: `node ./dist/server/tools/repl.js` |
215 | 244 | ||