aboutsummaryrefslogtreecommitdiffhomepage
path: root/support
diff options
context:
space:
mode:
Diffstat (limited to 'support')
-rw-r--r--support/doc/tools.md29
1 files changed, 19 insertions, 10 deletions
diff --git a/support/doc/tools.md b/support/doc/tools.md
index 8f897dbfa..85ce0428d 100644
--- a/support/doc/tools.md
+++ b/support/doc/tools.md
@@ -1,15 +1,14 @@
1# CLI tools guide 1# CLI tools guide
2 2
3 - [Installation](#installation) 3 - [Remote tools](#remote-tools)
4 - [Usage](#usage)
5 - [import-videos.js](#import-videosjs) 4 - [import-videos.js](#import-videosjs)
6 - [upload.js](#uploadjs) 5 - [upload.js](#uploadjs)
6 - [Server tools](#server-tools)
7 - [create-transcoding-job.js](#create-transcoding-jobjs) 7 - [create-transcoding-job.js](#create-transcoding-jobjs)
8 - [create-import-video-file-job.js](#create-import-video-file-jobjs) 8 - [create-import-video-file-job.js](#create-import-video-file-jobjs)
9 - [prune-storage.js](#prune-storagejs)
9 10
10## Installation 11## Remote Tools
11
12## Prerequisites
13 12
14You need at least 512MB RAM to run the script. 13You need at least 512MB RAM to run the script.
15Scripts can be launched directly from a PeerTube server, or from a separate server, even a desktop PC. 14Scripts can be launched directly from a PeerTube server, or from a separate server, even a desktop PC.
@@ -40,8 +39,6 @@ $ cd ${CLONE}
40$ npm run build:server 39$ npm run build:server
41``` 40```
42 41
43## Tools
44
45### import-videos.js 42### import-videos.js
46 43
47You can use this script to import videos from all [supported sites of youtube-dl](https://rg3.github.io/youtube-dl/supportedsites.html) into PeerTube. 44You can use this script to import videos from all [supported sites of youtube-dl](https://rg3.github.io/youtube-dl/supportedsites.html) into PeerTube.
@@ -78,14 +75,17 @@ $ cd ${CLONE}
78$ node dist/server/tools/upload.js --help 75$ node dist/server/tools/upload.js --help
79``` 76```
80 77
81## Tools to create jobs in the queue 78
79## Server tools
80
81These scripts should be run on the server, in `peertube-latest` directory.
82 82
83### create-transcoding-job.js 83### create-transcoding-job.js
84 84
85You can use this script to force transcoding of an existing video. 85You can use this script to force transcoding of an existing video.
86 86
87``` 87```
88$ npm run create-transcoding-job -- -v [videoUUID] 88$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-transcoding-job -- -v [videoUUID]
89``` 89```
90 90
91### create-import-video-file-job.js 91### create-import-video-file-job.js
@@ -93,5 +93,14 @@ $ npm run create-transcoding-job -- -v [videoUUID]
93You can use this script to import a video file to replace an already uploaded file or to add a new resolution to a video. 93You can use this script to import a video file to replace an already uploaded file or to add a new resolution to a video.
94 94
95``` 95```
96$ npm run create-import-video-file-job -- -v [videoUUID] -i [videoFile] 96$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-import-video-file-job -- -v [videoUUID] -i [videoFile]
97```
98
99### prune-storage.js
100
101Some transcoded videos or shutdown at a bad time can leave some unused files on your storage.
102To delete them (a confirmation will be demanded first):
103
97``` 104```
105$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run prune-storage
106``` \ No newline at end of file