]>
Commit | Line | Data |
---|---|---|
61b3e146 | 1 | # Import videos guide |
2519d9fe | 2 | |
61b3e146 | 3 | 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. |
2519d9fe L |
4 | Be sure you own the videos or have the author's authorization to do so. |
5 | ||
6 | - [Installation](#installation) | |
7 | - [Usage](#usage) | |
8 | ||
9 | ## Installation | |
10 | ||
11 | ## Prerequisites | |
12 | ||
13 | You need at least 512MB RAM to run the script. | |
35501c0f | 14 | Importation can be launched directly from a PeerTube server (in this case you already have dependencies installed :+1:) or from a separate server, even a dekstop PC. |
2519d9fe L |
15 | |
16 | ### Dependencies | |
17 | ||
35501c0f | 18 | * [PeerTube dependencies](dependencies.md) |
2519d9fe L |
19 | |
20 | ### Installation | |
21 | ||
35501c0f | 22 | Clone the PeerTube repo to get the latest version: |
2519d9fe L |
23 | |
24 | ``` | |
25 | git clone https://github.com/Chocobozzz/PeerTube.git | |
35501c0f | 26 | CLONE="$(pwd)/PeerTube" |
2519d9fe L |
27 | ``` |
28 | ||
29 | Run ``yarn install`` | |
30 | ``` | |
31 | cd ${CLONE} | |
32 | yarn install | |
33 | ``` | |
34 | ||
35 | Build server tools: | |
36 | ``` | |
37 | cd ${CLONE} | |
38 | npm run build:server | |
39 | ``` | |
40 | ||
41 | ||
42 | ## Usage | |
43 | ||
44 | You are now ready to run the script : | |
45 | ||
46 | ``` | |
47 | cd ${CLONE} | |
61b3e146 | 48 | node dist/server/tools/import-video.js -u "PEERTUBE_URL" -U "PEERTUBE_USER" --password "PEERTUBE_PASSWORD" -t "TARGET_URL" |
2519d9fe L |
49 | ``` |
50 | ||
35501c0f C |
51 | * PEERTUBE_URL : the full URL of your PeerTube server where you want to import, eg: https://peertube.cpy.re/ |
52 | * PEERTUBE_USER : your PeerTube account where videos will be uploaded | |
53 | * PEERTUBE_PASSWORD : password of your PeerTube account | |
61b3e146 C |
54 | * TARGET_URL : the target url you want to import. Examples: |
55 | * YouTube: | |
56 | * Channel: https://www.youtube.com/channel/ChannelId | |
57 | * User https://www.youtube.com/c/UserName or https://www.youtube.com/user/UserName | |
58 | * Video https://www.youtube.com/watch?v=blabla | |
59 | * Vimeo: https://vimeo.com/xxxxxx | |
60 | * Dailymotion: https://www.dailymotion.com/xxxxx | |
2519d9fe | 61 | |
35501c0f C |
62 | The script will get all public videos from Youtube, download them and upload to PeerTube. |
63 | Already downloaded videos will not be uploaded twice, so you can run and re-run the script in case of crash, disconnection... |