Commit Graph

27 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 2e46eb9715
Refactor search filters 2021-05-03 16:42:15 +02:00
Chocobozzz 74d249bc13
Add ability to cleanup remote AP interactions 2021-03-03 10:08:08 +01:00
Chocobozzz 8795d6f254
Fix broken local actors
Some channels can't federate because they don't have public/private
keys, maybe because the generation failed for various reasons
2021-02-26 14:22:25 +01:00
Chocobozzz 6d22ea006b
Fix jobs type list order 2021-02-19 08:26:59 +01:00
Chocobozzz 83e7467041
Add refresh button in jobs list 2021-01-26 10:00:23 +01:00
Chocobozzz 6939cbac48 Safely remove webtorrent files
Only remove them on max quality HLS playlist generation
2021-01-25 14:38:52 +01:00
Chocobozzz 77d7e851dc Add priority to transcoding jobs
(1 = highest priority)

100 for new resolutions
10 for original file optimization

Add a malus for transcoding jobs depending on how many uploads the user did in the
last 7 days
2021-01-25 14:38:52 +01:00
Chocobozzz ed4bc63141
Fix job table colspan 2021-01-21 16:01:30 +01:00
Chocobozzz 3b01f4c0ac
Support progress for ffmpeg tasks 2021-01-21 14:42:43 +01:00
Chocobozzz a11a782f5c
Fix duplicate entry in job list page 2021-01-11 15:39:15 +01:00
Rigel Kent 040d6896a3
add display of logs matching any state 2020-12-13 19:27:25 +01:00
Chocobozzz 97969c4edf Add check constraints live tests 2020-11-09 15:33:04 +01:00
Chocobozzz a5cf76afa3 Add watch messages if live has not started 2020-11-09 15:33:04 +01:00
Rigel Kent 7f0d856169 jobs/logs view select and empty state visual improvements 2020-09-28 13:25:50 +02:00
Chocobozzz 66357162f8
Migrate to $localize
* Remove i18n polyfill to translate things in components
 * Reduce bundle sizes
 * Improve runtime perf
 * Reduce a lot the time to make a full client build
 * Reduce client build complexity
 * We don't need a service to translate things anymore (so we will be able to translate title pages etc)

Unfortunately we may loose some translations in the migration process.
I'll put a message on weblate to notify translators
2020-08-14 10:28:30 +02:00
Rigel Kent 4504f09f6e deal with refresh token in embed 2020-08-06 15:08:58 +02:00
Chocobozzz 67ed6552b8 Reorganize client shared modules 2020-06-23 16:00:49 +02:00
Rigel Kent 0251197e24 Factorize rest-table and fix/simplify SQL 2020-05-01 16:41:02 +02:00
Chocobozzz 8e11a1b37c
Fix sort in admin tables 2020-04-08 10:49:26 +02:00
Chocobozzz b764380ac2 Add ability to list redundancies 2020-01-28 11:35:26 +01:00
Julien Maulny 4271212172
Enhance jobs list displaying on smaller screens 2020-01-06 15:10:19 +01:00
Rigel Kent 88a7f93f8e add loop setting for playlists, and use sessionStorage 2019-12-13 09:13:43 +01:00
Chocobozzz 1061c73fde
Add ability to filter per job type 2019-12-04 14:49:59 +01:00
Chocobozzz 41b15c8921
Update client dependencies 2019-07-25 11:00:45 +02:00
Chocobozzz 2c22613c2f
Add logs page in client 2019-04-11 10:14:08 +02:00
Chocobozzz fd8710b897
Add logs endpoint 2019-04-10 16:38:32 +02:00