ActivityPub federated video streaming platform using P2P directly in the web browser https://joinpeertube.org/
 
 
 
 
 
 
Go to file
Jelle Besseling 0305db28c9
Add support for saving video files to object storage (#4290)
* Add support for saving video files to object storage

* Add support for custom url generation on s3 stored files

Uses two config keys to support url generation that doesn't directly go
to (compatible s3). Can be used to generate urls to any cache server or
CDN.

* Upload files to s3 concurrently and delete originals afterwards

* Only publish after move to object storage is complete

* Use base url instead of url template

* Fix mistyped config field

* Add rudenmentary way to download before transcode

* Implement Chocobozzz suggestions

https://github.com/Chocobozzz/PeerTube/pull/4290#issuecomment-891670478

The remarks in question:
    Try to use objectStorage prefix instead of s3 prefix for your function/variables/config names
    Prefer to use a tree for the config: s3.streaming_playlists_bucket -> object_storage.streaming_playlists.bucket
    Use uppercase for config: S3.STREAMING_PLAYLISTS_BUCKETINFO.bucket -> OBJECT_STORAGE.STREAMING_PLAYLISTS.BUCKET (maybe BUCKET_NAME instead of BUCKET)
    I suggest to rename moveJobsRunning to pendingMovingJobs (or better, create a dedicated videoJobInfo table with a pendingMove & videoId columns so we could also use this table to track pending transcoding jobs)
    https://github.com/Chocobozzz/PeerTube/pull/4290/files#diff-3e26d41ca4bda1de8e1747af70ca2af642abcc1e9e0bfb94239ff2165acfbde5R19 uses a string instead of an integer
    I think we should store the origin object storage URL in fileUrl, without base_url injection. Instead, inject the base_url at "runtime" so admins can easily change this configuration without running a script to update DB URLs

* Import correct function

* Support multipart upload

* Remove import of node 15.0 module stream/promises

* Extend maximum upload job length

Using the same value as for redundancy downloading seems logical

* Use dynamic part size for really large uploads

Also adds very small part size for local testing

* Fix decreasePendingMove query

* Resolve various PR comments

* Move to object storage after optimize

* Make upload size configurable and increase default

* Prune webtorrent files that are stored in object storage

* Move files after transcoding jobs

* Fix federation

* Add video path manager

* Support move to external storage job in client

* Fix live object storage tests

Co-authored-by: Chocobozzz <me@florianbigard.com>
2021-08-17 08:26:20 +02:00
.github Add support for saving video files to object storage (#4290) 2021-08-17 08:26:20 +02:00
client Add support for saving video files to object storage (#4290) 2021-08-17 08:26:20 +02:00
config Add support for saving video files to object storage (#4290) 2021-08-17 08:26:20 +02:00
scripts Add support for saving video files to object storage (#4290) 2021-08-17 08:26:20 +02:00
server Add support for saving video files to object storage (#4290) 2021-08-17 08:26:20 +02:00
shared Add support for saving video files to object storage (#4290) 2021-08-17 08:26:20 +02:00
support Add support for saving video files to object storage (#4290) 2021-08-17 08:26:20 +02:00
.dockerignore Fix docker build 2019-09-16 10:52:26 +02:00
.editorconfig add .editorconfig to maintain consistent coding styles (#429) 2018-03-29 11:07:51 +02:00
.eslintrc.json Refactor a little bit controllers 2021-05-12 16:57:31 +02:00
.gitignore Update embed webpack config 2021-05-27 16:00:13 +02:00
.gitlab-ci.yml Disable openapi generation 2021-08-11 14:58:37 +02:00
.gitpod.yml Fix PostreSQL initialization for Gitpod 2020-12-06 13:58:00 +01:00
CHANGELOG.md Update changelog 2021-07-20 15:08:21 +02:00
CODE_OF_CONDUCT.md Update my email 2020-11-12 16:29:32 +01:00
CREDITS.md Replace local menu icon 2021-05-28 14:56:42 +02:00
FAQ.md Update FAQ.md 2021-08-11 10:46:14 +02:00
LICENSE Change licence to AGPL 2017-02-24 18:26:09 +01:00
README.md (doc) move irc webchat link to web.libera.chat 2021-06-15 09:51:13 +02:00
SECURITY.md Update my email 2020-11-12 16:29:32 +01:00
engines.yaml Move engines outside package.json 2021-05-10 09:55:46 +02:00
package.json Add support for saving video files to object storage (#4290) 2021-08-17 08:26:20 +02:00
server.ts Register plugins when peertube server is ready 2021-07-21 15:56:49 +02:00
tsconfig.json Introduce abuse command 2021-07-20 15:27:17 +02:00
yarn.lock Add support for saving video files to object storage (#4290) 2021-08-17 08:26:20 +02:00

README.md

PeerTube

Website | Join an instance | Create an instance | Chat with us | Donate

Be part of a network of multiple small federated, interoperable video hosting providers. Follow video creators and create videos. No vendor lock-in. All on a platform that is community-owned and ad-free.

Developed with ❤ by Framasoft

Framasoft logo

Client

Server
test suite status JavaScript Style Guide


screenshot

Introduction

PeerTube is a free, decentralized and federated video platform developed as an alternative to other platforms that centralize our data and attention, such as YouTube, Dailymotion or Vimeo. 🎬

To learn more:

Features

All features for viewers | All features for content creators | All features for administrators

Video streaming, even in live!

Just upload your videos, and be sure they will stream anywhere. Add a description, some tags and your video will be discoverable by the entire video fediverse, not just your instance. You can even embed a player on your favorite website!

You are used to hosting live events? We got you covered too! Start livestreaming from your favorite client, and even host permanent streams!


Keep in touch with video creators

Follow your favorite channels from PeerTube or really any other place. No need to have an account on the instance you watched a video to follow its author, you can do all of that from the Fediverse (Mastodon, Pleroma, and plenty others), or just with good ol' RSS.


An interface to call home

Be it as a user or an instance administrator, you can decide what your experience will be like. Don't like the colors? They are easy to change. Don't want to list videos of an instance but let your users subscribe to them? Don't like the regular web client? All of that can be changed, and much more. No UX dark pattern, no mining your data, no video recommendation bullshit™.


Communities that help each other

In addition to visitors using WebTorrent to share the load among them, instances can help each other by caching one another's videos. This way even small instances have a way to show content to a wider audience, as they will be shouldered by friend instances (more about that in our redundancy guide).

Content creators can get help from their viewers in the simplest way possible: a support button showing a message linking to their donation accounts or really anything else. No more pay-per-view and advertisements that hurt visitors and incentivize alter creativity (more about that in our FAQ).

🙌 Contributing

You don't need to be a programmer to help!

You can give us your feedback, report bugs, help us translate PeerTube, write documentation, and more. Check out the contributing guide to know how, it takes less than 2 minutes to get started. 😉

You can also join the cheerful bunch that makes our community:

Feel free to reach out if you have any questions or ideas! 💬

📦 Create your own instance

See the production guide, which is the recommended way to install or upgrade PeerTube. For hardware requirements, see Should I have a big server to run PeerTube? in the FAQ.

See the community packages, which cover various platforms (including YunoHost and Docker).

📖 Documentation

If you have a question, please try to find the answer in the FAQ first.

User documentation

See the user documentation.

Admin documentation

See how to create your own instance.

See the more general admin documentation.

Tools documentation

Learn how to import/upload videos from CLI or admin your PeerTube instance with the tools documentation.

Technical documentation

See the architecture blueprint for a more detailed explanation of the architectural choices.

See our REST API documentation:

See our ActivityPub documentation.

License

Copyright (C) 2015-2021 PeerTube Contributors (see CREDITS.md)

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.