aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/doc/tools.md
diff options
context:
space:
mode:
authorFlorent F <florent.fayolle69@gmail.com>2019-08-01 10:41:00 +0200
committerChocobozzz <chocobozzz@cpy.re>2019-08-01 11:27:00 +0200
commit1f8ac02436237f0a4f2f10b8c37b28578cc5a411 (patch)
tree20cbebbafe3e9451f51c643800fe920598354bd1 /support/doc/tools.md
parentd0198ff99f968739aa0c87ed4ea7553dd9796265 (diff)
downloadPeerTube-1f8ac02436237f0a4f2f10b8c37b28578cc5a411.tar.gz
PeerTube-1f8ac02436237f0a4f2f10b8c37b28578cc5a411.tar.zst
PeerTube-1f8ac02436237f0a4f2f10b8c37b28578cc5a411.zip
Document how to synchronize YT channel to PeerTube
Diffstat (limited to 'support/doc/tools.md')
-rw-r--r--support/doc/tools.md19
1 files changed, 16 insertions, 3 deletions
diff --git a/support/doc/tools.md b/support/doc/tools.md
index f0d3b15b2..e0f02173e 100644
--- a/support/doc/tools.md
+++ b/support/doc/tools.md
@@ -2,7 +2,7 @@
2 2
3<!-- START doctoc generated TOC please keep comment here to allow auto update --> 3<!-- START doctoc generated TOC please keep comment here to allow auto update -->
4<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> 4<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
5**Table of Contents** 5**Table of Contents**
6 6
7- [Remote Tools](#remote-tools) 7- [Remote Tools](#remote-tools)
8 - [Dependencies](#dependencies) 8 - [Dependencies](#dependencies)
@@ -114,7 +114,7 @@ $ peertube plugins uninstall --npm-name peertube-plugin-myplugin
114 114
115#### peertube-import-videos.js 115#### peertube-import-videos.js
116 116
117You can use this script to import videos from all [supported sites of youtube-dl](https://rg3.github.io/youtube-dl/supportedsites.html) into PeerTube. 117You can use this script to import videos from all [supported sites of youtube-dl](https://rg3.github.io/youtube-dl/supportedsites.html) into PeerTube.
118Be sure you own the videos or have the author's authorization to do so. 118Be sure you own the videos or have the author's authorization to do so.
119 119
120```sh 120```sh
@@ -141,6 +141,19 @@ Already downloaded videos will not be uploaded twice, so you can run and re-run
141 141
142Videos will be publicly available after transcoding (you can see them before that in your account on the web interface). 142Videos will be publicly available after transcoding (you can see them before that in your account on the web interface).
143 143
144**NB**: If you want to synchronize a Youtube channel to your PeerTube instance (ensure you have the agreement from the author),
145you can add a [crontab rule](https://help.ubuntu.com/community/CronHowto) (or an equivalent of your OS) and insert
146these rules (ensure to customize them to your needs):
147
148```
149# Update youtube-dl every day at midnight
1500 0 * * * /usr/bin/npm rebuild youtube-dl --prefix /PATH/TO/PEERTUBE/
151
152# Synchronize the YT channel every sunday at 22:00 all the videos published since last monday included
1530 22 * * 0 /usr/bin/node /PATH/TO/PEERTUBE/dist/server/tools/peertube-import-videos.js -u '__PEERTUBE_URL__' -U '__USER__' --password '__PASSWORD__' --target-url 'https://www.youtube.com/channel/___CHANNEL__' --since $(date --date="-6 days" +%Y-%m-%d)
154```
155
156Also you may want to subscribe to the PeerTube channel in order to manually check the synchronization is successful.
144 157
145#### peertube-upload.js 158#### peertube-upload.js
146 159
@@ -195,7 +208,7 @@ Or to transcode to a specific resolution:
195``` 208```
196$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-transcoding-job -- -v [videoUUID] -r [resolution] 209$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-transcoding-job -- -v [videoUUID] -r [resolution]
197``` 210```
198 211
199### create-import-video-file-job.js 212### create-import-video-file-job.js
200 213
201You 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. 214You 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.