aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--support/doc/tools.md50
1 files changed, 36 insertions, 14 deletions
diff --git a/support/doc/tools.md b/support/doc/tools.md
index 43bc03622..8f897dbfa 100644
--- a/support/doc/tools.md
+++ b/support/doc/tools.md
@@ -4,6 +4,8 @@
4 - [Usage](#usage) 4 - [Usage](#usage)
5 - [import-videos.js](#import-videosjs) 5 - [import-videos.js](#import-videosjs)
6 - [upload.js](#uploadjs) 6 - [upload.js](#uploadjs)
7 - [create-transcoding-job.js](#create-transcoding-jobjs)
8 - [create-import-video-file-job.js](#create-import-video-file-jobjs)
7 9
8## Installation 10## Installation
9 11
@@ -45,22 +47,24 @@ $ npm run build:server
45You can use this script to import videos from all [supported sites of youtube-dl](https://rg3.github.io/youtube-dl/supportedsites.html) into PeerTube. 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.
46Be sure you own the videos or have the author's authorization to do so. 48Be sure you own the videos or have the author's authorization to do so.
47 49
48 50```sh
49``` 51$ node dist/server/tools/import-videos.js \
50$ cd ${CLONE} 52 -u "PEERTUBE_URL" \
51$ node dist/server/tools/import-videos.js -u "PEERTUBE_URL" -U "PEERTUBE_USER" --password "PEERTUBE_PASSWORD" -t "TARGET_URL" 53 -U "PEERTUBE_USER" \
54 --password "PEERTUBE_PASSWORD" \
55 -t "TARGET_URL"
52``` 56```
53 57
54 * PEERTUBE_URL : the full URL of your PeerTube server where you want to import, eg: https://peertube.cpy.re 58* `PEERTUBE_URL` : the full URL of your PeerTube server where you want to import, eg: https://peertube.cpy.re
55 * PEERTUBE_USER : your PeerTube account where videos will be uploaded 59* `PEERTUBE_USER` : your PeerTube account where videos will be uploaded
56 * PEERTUBE_PASSWORD : password of your PeerTube account (if ommited, you will be prompted for) 60* `PEERTUBE_PASSWORD` : password of your PeerTube account (if omitted, you will be prompted for it)
57 * TARGET_URL : the target url you want to import. Examples: 61* `TARGET_URL` : the target url you want to import. Examples:
58 * YouTube: 62 * YouTube:
59 * Channel: https://www.youtube.com/channel/ChannelId 63 * Channel: https://www.youtube.com/channel/ChannelId
60 * User https://www.youtube.com/c/UserName or https://www.youtube.com/user/UserName 64 * User https://www.youtube.com/c/UserName or https://www.youtube.com/user/UserName
61 * Video https://www.youtube.com/watch?v=blabla 65 * Video https://www.youtube.com/watch?v=blabla
62 * Vimeo: https://vimeo.com/xxxxxx 66 * Vimeo: https://vimeo.com/xxxxxx
63 * Dailymotion: https://www.dailymotion.com/xxxxx 67 * Dailymotion: https://www.dailymotion.com/xxxxx
64 68
65 The script will get all public videos from Youtube, download them and upload to PeerTube. 69 The script will get all public videos from Youtube, download them and upload to PeerTube.
66 Already downloaded videos will not be uploaded twice, so you can run and re-run the script in case of crash, disconnection... 70 Already downloaded videos will not be uploaded twice, so you can run and re-run the script in case of crash, disconnection...
@@ -73,3 +77,21 @@ You can use this script to import videos directly from the CLI.
73$ cd ${CLONE} 77$ cd ${CLONE}
74$ node dist/server/tools/upload.js --help 78$ node dist/server/tools/upload.js --help
75``` 79```
80
81## Tools to create jobs in the queue
82
83### create-transcoding-job.js
84
85You can use this script to force transcoding of an existing video.
86
87```
88$ npm run create-transcoding-job -- -v [videoUUID]
89```
90
91### create-import-video-file-job.js
92
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
95```
96$ npm run create-import-video-file-job -- -v [videoUUID] -i [videoFile]
97```