The decentralized platform for organizing video hosting and video broadcasting PeerTube 6.0 was released. PeerTube offers a vendor-independent alternative to YouTube, Dailymotion and Vimeo, using a content distribution network based on P2P communication and linking visitor browsers. The developments of the project are distributed under the AGPLv3 license.
Main innovations:
- The ability to post password-protected videos has been added. A password can be set when uploading, importing, or updating, after which only users with the password will be able to access the content. Multiple passwords can be set via the REST API (for example, each user can be assigned a separate password) and passwords can be revoked.
- Thumbnails are now displayed when moving the mouse pointer over the playback position slider, allowing for visual navigation through the stream. The storyboard with thumbnails is generated during video upload or import, meaning thumbnail support will only be available for new videos uploaded after upgrading the node to PeerTube 6.0. To generate thumbnails for older videos, the administrator should run the command "npm run create-generate-storyboard-job."
- We've added the ability to upload a new version of a video. This can be used to update a video, for example, after fixing an error or adding missing information. After an update, the old version of the video is permanently lost, and the updated version becomes available via the old link (comments and statistics are also preserved). Since this feature can be abused, such as by inserting ads after review, administrators must explicitly enable support for uploading updates on their platform.
- We've added the ability to attach a table of contents to videos, allowing you to view a list of episodes and quickly navigate between them. To define episodes, a "chapters" tab has been added to the settings page, allowing you to define the start time and descriptions of key moments in the video. Episodes are also automatically imported when importing videos from YouTube.
- We continued implementing changes and optimizations based on stress testing of live broadcasts and traditional video streaming with several thousand concurrent participants. For example, we optimized HTTP unicast processing in workflows, ActivityPub request validation, recommendation processing, SQL queries filtered by tags, and bulk requests for /videos/{id}/views. We added the ability to disable HTTP logging.
- Support for the WebTorrent protocol has been removed, and development is focused on using the HLS (HTTP Live Streaming) protocol with WebRTC for P2P.
- The video player's performance has been improved, with automatic window size selection based on the video's aspect ratio, settings memorization, and no longer re-arranges when changing videos.
- Improved support for search engine optimizers (SEO).
- Facilities for people with disabilities have been expanded.
The PeerTube platform was initially based on the WebTorrent BitTorrent client, which ran in a browser and utilized WebRTC technology to establish a direct P2P communication channel between browsers. WebTorrent was later replaced by the HLS (HTTP Live Streaming) protocol in conjunction with WebRTC, allowing for adaptive stream management depending on bandwidth. To unify disparate servers The ActivityPub protocol is used to integrate videos into a shared federated network, where visitors participate in content delivery and can subscribe to channels and receive notifications about new videos. The project's web interface is built using the Angular framework.
The PeerTube federated network is formed as a community of small servers connected to each other. hosting Videos, each with its own administrator and its own rules. Each video server acts as a BitTorrent tracker, hosting the server's user accounts and their videos. User IDs are formed in the form "@username@serverdomain." Data transfer during viewing occurs directly from the browsers of other visitors viewing the content.
If no one is watching the video, the return is organized by the server to which the video was originally uploaded (the WebSeed protocol is used). In addition to distributing traffic between users watching videos, PeerTube also allows hosts launched by authors to host videos for the first time to cache other authors' videos, forming a distributed network of not only clients, but also servers, as well as providing fault tolerance. There is support for live streaming with content delivery in P2P mode (typical programs such as OBS can be used to control streaming).
To start broadcasting via PeerTube, the user only needs to upload a video, a description, and a set of tags to one of the servers. After that, the movie will be available on the entire federated network, and not just from the primary download server. To work with PeerTube and participate in the distribution of content, a regular browser is enough and no additional software is required. Users can track activity in selected video channels by subscribing to feeds of interest on federated social networks (such as Mastodon and Pleroma) or via RSS. To distribute video using P2P communications, the user can also add a special widget with a built-in web player to his site.
Currently, 1122 servers are operational for hosting content, maintained by various volunteers and organizations. If a user is not satisfied with the rules for hosting videos on a particular PeerTube server, they can connect to another server or launch their own. A pre-configured Docker image (chocobozzz/peertube) is provided for quick server deployment.
Source: opennet.ru
