Building a Private Video Sharing Platform Based on PeerTube (Part 2)
This article was last updated 148 days ago. The information in this article may have developed or changed. If it is invalid, please leave a message in the comment section.

Initialize peertube

Change the interface language

Click "root" in the top left corner, then select "interface".

image.png

In the next language selection box, select Simplified Chinese:
image.png

Several important options

Help share the video that is playing

image.png

This option will use webtorrent to store your video on a peertube server that is set up by someone else and has this option checked. In theory, other people can play this video from multiple sources, but after enabling this option, it may be slower than connecting to you directly, because it is very likely that you are the only one who has this source, so it is better to play it directly from you, so it is recommended not to check this option.

Enable Registration

image.png

If you want your peertube server to be available for other people to register and upload videos like youtube, you can turn on this option.

Video Import

image.png

If you need to import videos from other video sites using URLs, you need to check the relevant options here.

Search and Federation

image.png

Both of these options involve the relationship between your peertube and peertubes set up by other people. If you just want to be a quiet handsome man, then you should not choose these options.

Transcoding

image.png

The options here are more important. If the hardware for building peertube is not bad, it is recommended to enable transcoding. Otherwise, some browsers cannot play videos without installing the corresponding plug-in. I use an m1 macmini, and it feels like a 400MB mv can be converted in less than 10 minutes. Of course, it is hard to say how long it will take for a movie. It is recommended not to check the option to enable webtorrent. It is fastest to use HLS playback directly. As for the resolution below, I think 720p and 1080p are enough under normal circumstances. In this way, transcoding will only generate files with 2 resolutions and the time will be shorter.
image.png

I won't go into the number of transcoding threads, as it's clearly stated. The "Enable remote runners for VOD" part is interesting; it means that a program can be run remotely to help with decoding. I'll look into that when I have time.

Live Streaming

image.png

If you have this requirement, please study it yourself. I don’t have any requirement, so I won’t bother with it. However, this requires mapping port 1935 for rmtp to use.

Administration - Plugins/Themes

image.png

The plugin is actually quite useful for these two features: "privacysettings" and "transcoding-custom-quality". The former sets the default quality for all videos on the site, while the latter sets the default quality for transcoding videos.
image.png

In fact, the default good is enough, so it doesn’t matter whether these two plug-ins are installed or not.

Publish a video

Note: For security reasons, do not use the root account to publish videos directly. Create a new account specifically for publishing videos.

CREATE NEW ACCOUNT

“"Management" - "Overview" - "Create User":

image.png

The following interface appears:
image.png

Just fill in the relevant information according to the prompts. Pay attention to the channel name. Create a channel here first. The videos released subsequently must be in a channel. For example, I created an mv channel, and all the mvs released are in this channel.

Note the option "User bypasses video validation by moderators" in the red box below. This option is unchecked by default, meaning that all videos posted by this user require administrator approval. If you are the only user and don't need to approve videos, simply check this option. Finally, click the "Create User" button at the bottom.

Start publishing

Log out of the root account and log in with the newly created account. First, change the language to Chinese and uncheck the "Help share video" option:

image.png

Then click "Publish" in the upper right corner:
image.png

The following interface appears. Select the channel you created when creating a new account. Select the privacy method according to your needs, and then click the button in the red box to upload the file:
image.png

image.png

After selecting, click Open in the lower right corner and the following interface will appear:
image.png

There are 5 options for privacy:
image.png

image.png

You can choose according to your needs.
image.png

If you select Include sensitive content, the settings for sensitive content in the previous video section will be used:
image.png

If you choose to publish after transcoding, then the video will not be published before the transcoding is successful. Everyone uploads the video first and then transcodes it together. In this case, do not check this option.

There is also an option in the advanced settings to allow downloading. If it is not allowed, do not check to allow downloading:

image.png

After setting, click the publish button in the lower right corner to publish.


Here's a tip: Log in as root, and in "Manage" - "Overview" - "Videos," you can see all user-uploaded videos, their privacy settings, whether the files are transcoded, and in what format.

image.png

And you can select one or more files and choose to transcode:
image.png

However, normally, if the transcoding function is enabled in the options, transcoding will be automatically performed after publishing is completed, even if you do not select the option to publish after transcoding when publishing.


Effect display

Final result:

image.png

And the address can be shared directly with others without requiring them to log in (provided that the video privacy is set to public):

image.png

You can also share a link to a video:
image.png

You can also directly generate a QR code for sharing, the most important thing is embedding:
image.png

The embedded code generated directly can be placed directly in the WordPress page or article.

A few words: The biggest advantage of peertube is that you can host your own videos and embed them on your own website without relying on those video hosting platforms, which is not subject to censorship restrictions. Of course, if it is for traffic, the video must still be placed on those big platforms, but if there is no such demand and you just want to put it on your own website, then peertube is the best choice.

Alternatively, you can set all videos to private, create a playlist, add the videos to the playlist, and then set the playlist to public. This way, you can ensure that anonymous users cannot see the videos, while still having the option to share the playlist to publish the videos you want to share, achieving two goals at once.

Note: If you use nginx as a reverse proxy for peertube, you may encounter playback issues. For specific issues and solutions, see:Use Pagoda Panel (nginx) to configure peertube (HLS) reverse proxy

📌 Content Structure Hints:
This content belongs to "Blog Knowledge MapThis is part of the document; you can view the full content path here: Blog Knowledge Map .
Share this article
All blog content is original; please indicate the source when reprinting! The blog's RSS address is:https://blog.tangwudi.com/feed, welcome to subscribe; if necessary, you can joinTelegram GroupDiscuss the problem together.

Comments

  1. Passing by is a good thing
    Windows Edge 131.0.0.0
    2 years ago
    2024-10-26 13:47:02

    Boss, is this your own machine?
    I plan to build one on my own machine.

    • Owner
      Passing by is a good thing
      Macintosh Chrome 130.0.0.0
      2 years ago
      2024-10-26 13:49:38

      Almost all the applications I build are built on my own machines, including peertube.

Send Comment Edit Comment


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠(ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ°Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
Emoticons
Emoji
Little Dinosaur
flower!
Previous
Next