3 - [Installation](#installation)
5 - [import-videos.js](#import-videosjs)
6 - [upload.js](#uploadjs)
12 You need at least 512MB RAM to run the script.
13 Scripts can be launched directly from a PeerTube server, or from a separate server, even a desktop PC.
14 You need to follow all the following steps even if you are on a PeerTube server.
18 Install the [PeerTube dependencies](dependencies.md).
22 Clone the PeerTube repo to get the latest version (even if you are on your PeerTube server):
25 $ git clone https://github.com/Chocobozzz/PeerTube.git
26 $ CLONE="$(pwd)/PeerTube"
38 $ npm run build:server
45 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.
46 Be sure you own the videos or have the author's authorization to do so.
51 $ node dist/server/tools/import-videos.js -u "PEERTUBE_URL" -U "PEERTUBE_USER" --password "PEERTUBE_PASSWORD" -t "TARGET_URL"
54 * 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
56 * PEERTUBE_PASSWORD : password of your PeerTube account (if ommited, you will be prompted for)
57 * TARGET_URL : the target url you want to import. Examples:
59 * Channel: https://www.youtube.com/channel/ChannelId
60 * User https://www.youtube.com/c/UserName or https://www.youtube.com/user/UserName
61 * Video https://www.youtube.com/watch?v=blabla
62 * Vimeo: https://vimeo.com/xxxxxx
63 * Dailymotion: https://www.dailymotion.com/xxxxx
65 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 You can use this script to import videos directly from the CLI.
74 $ node dist/server/tools/upload.js --help