Changing Default Channel

Hi. How do I use the following script and have the videos go into a channel of my choosing instead of the user’s default channel?

Thank you.

$ node dist/server/tools/peertube-import-videos.js \
    -u 'PEERTUBE_URL' \
    --password 'PEERTUBE_PASSWORD' \
    --target-url 'TARGET_URL'

hi Dan

Which script?


$ node dist/server/tools/peertube-import-videos.js \
    -u 'PEERTUBE_URL' \
    --password 'PEERTUBE_PASSWORD' \
    --target-url 'TARGET_URL'

The script is documented with its options at

Thank you for your reply. Yes, I read it already. My problem is that I have a user x that uses this script to import a Youtube channel to their Peertube channel. If you run it, it will place the videos in the Peertube user’s first channel that was created. This user has multiple channels and wants to direct the videos to go to another channel and not the primary channel.

Is there a way to do that? The script doesn’t seem to have an option to specify what channel you want to import the videos to.

You can use this command to list available arguments:

node ./dist/server/tools/peertube.js help import-videos

Usage: import-videos [global options] [ -- youtube-dl options]

  -n, --video-name <name>                Video name
  -c, --category <category_number>       Category number
  -l, --licence <licence_number>         Licence number
  -L, --language <language_code>         Language ISO 639 code (fr or en...)
  -t, --tags <tags>                      Video tags
  -N, --nsfw                             Video is Not Safe For Work
  -d, --video-description <description>  Video description
  -P, --privacy <privacy_number>         Privacy
  -C, --channel-name <channel_name>      Channel name
  --no-comments-enabled                  Disable video comments
  -s, --support <support>                Video support text
  --no-wait-transcoding                  Do not wait transcoding before publishing the video
  --no-download-enabled                  Disable video download
  -v, --verbose <verbose>                Verbosity, from 0/'error' to 4/'debug' (default: "info")
  -u, --url <url>                        Server url
  -U, --username <username>              Username
  -p, --password <token>                 Password
  --target-url <targetUrl>               Video target URL
  --since <since>                        Publication date (inclusive) since which the videos can be imported (YYYY-MM-DD)
  --until <until>                        Publication date (inclusive) until which the videos can be imported (YYYY-MM-DD)
  --first <first>                        Process first n elements of returned playlist
  --last <last>                          Process last n elements of returned playlist
  --wait-interval <waitInterval>         Duration between two video imports (in seconds)
  -T, --tmpdir <tmpdir>                  Working directory (default: "/home/john/dev/PeerTube/dist/server/tools")
  -h, --help                             display help for command

It seems you are looking for the -C option.

edit: This is not the script you are using, but I think it does the same.

Thank you. I tired this script and the -C option but it doesn’t seem to work. I’ll keep on searching. But thank you for letting me know the options for this script. :slight_smile: