Commit Graph

24 Commits (0305db28c98fd6cf43a3c50ba92c76215e99d512)

Author SHA1 Message Date
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
Chocobozzz 31a911190b
Fix broadcast message log level 2021-05-25 11:35:29 +02:00
Chocobozzz 5b1a6d45b5
Merge branch 'release/3.2.0' into develop 2021-05-14 14:18:13 +02:00
Chocobozzz cb4bab61c1
Fix logger warning level 2021-05-14 14:17:53 +02:00
Chocobozzz 7d9ba5c089
Cleanup models directory organization 2021-05-11 11:32:31 +02:00
Chocobozzz ae71acca14
Check ffmepg version on startup 2021-03-24 18:18:40 +01:00
Chocobozzz 9129b7694d Allow to specify transcoding and import jobs concurrency 2021-02-08 15:38:45 +01:00
Chocobozzz fb7194043d Check live duration and size 2020-11-09 15:33:04 +01:00
Chocobozzz 5fb2e2888c First implem global search 2020-06-10 14:02:41 +02:00
Chocobozzz 72c33e716f Support broadcast messages 2020-05-29 09:32:12 +02:00
Chocobozzz 8dc8a34ee8 Avoir some circular dependencies 2020-05-04 16:21:39 +02:00
Chocobozzz 8c9e787526
Add ability to accept or not remote redundancies 2020-04-07 15:32:20 +02:00
Chocobozzz bdd428a6d9
Update dependencies 2020-02-28 16:21:34 +01:00
Chocobozzz 4c1c170934
Refactor email enabled function 2020-02-17 10:27:00 +01:00
Chocobozzz a15871560f
Move to eslint 2020-02-03 08:31:02 +01:00
Chocobozzz 2034c3aaa0
Add warning if videos directory is the same than redundancy 2019-12-10 14:31:08 +01:00
Chocobozzz d7a25329f9
Add ability to disable webtorrent
In favour of HLS
2019-11-25 10:59:43 +01:00
Chocobozzz 6dd9de95df
Move config in its own file 2019-04-11 13:45:39 +02:00
Chocobozzz 1ed9b8ee69
Fix email notification 2019-03-19 16:41:41 +01:00
Chocobozzz d85798c4e7
Better videos redundancy config error handling 2019-03-19 16:33:40 +01:00
Chocobozzz 539d3f4faa
BREAKING: update CSP configuration
Disable it by default and add ability to specify a custom report uri
2019-02-21 16:28:53 +01:00
Chocobozzz d3e56c0c4b
Implement contact form in the client 2019-01-10 11:32:38 +01:00
Chocobozzz d1105b97ef
Fix dnt route 2018-10-01 15:20:13 +02:00
Chocobozzz e5565833f6
Improve redundancy: add 'min_lifetime' configuration 2018-09-24 13:38:39 +02:00