Commit Graph

2306 Commits (c186a67f90203af6bfa434f026efdc99193bcd65)

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 134006b0d4
Update client dependencies 2021-08-11 11:49:01 +02:00
Chocobozzz 27db78400c
Fix backend channel name validator consistency 2021-08-05 13:54:35 +02:00
Chocobozzz ff4de38385
Filter videos by live in custom markup 2021-08-02 17:10:07 +02:00
Chocobozzz 3da38d6e9f
Fetch things in bulk for the homepage 2021-08-02 15:40:09 +02:00
Chocobozzz 171efc48e6
Merge branch 'release/3.3.0' into develop 2021-07-30 11:38:19 +02:00
Chocobozzz 3ce48a0cd0
Hide schedule privacy if private does not exist 2021-07-30 11:24:38 +02:00
Chocobozzz 916bf5283b
Fix empty search 2021-07-29 15:51:19 +02:00
Chocobozzz 7e8f19603b
Redirect to search page for origin instance 2021-07-29 15:35:41 +02:00
Chocobozzz af7fd04a67
Add ability to filter by host in search page 2021-07-29 15:19:22 +02:00
Chocobozzz 29837f8885
Add ability to search by host in server 2021-07-27 17:10:52 +02:00
Chocobozzz ac27887774
Merge branch 'release/3.3.0' into develop 2021-07-26 15:18:46 +02:00
Chocobozzz 84c6eadc33
Fix moderation embeds 2021-07-26 15:17:59 +02:00
Chocobozzz a00056c0c8
Fix description timestamp click 2021-07-26 15:14:17 +02:00
Chocobozzz 15a7eafb89
Refactor video links builders 2021-07-26 15:04:37 +02:00
Chocobozzz 9162fdd363
Refactor video links building 2021-07-26 14:12:50 +02:00
Chocobozzz d91714ca56
Fix privacy descriptions 2021-07-26 14:03:46 +02:00
Chocobozzz c4fa01f7c4
Merge branch 'release/3.3.0' into develop 2021-07-23 15:23:43 +02:00
Kimsible c1936140b9 Fix user-dropdown-indicator position on touchscreens 2021-07-23 15:23:22 +02:00
Chocobozzz c318541398
Add missing localization keys 2021-07-21 16:22:18 +02:00
Chocobozzz a24bd1ed41
Merge branch 'next' into develop 2021-07-21 15:51:30 +02:00
Kimsible 435990290a Correct privacymsg z-index to avoid hover dropdown on scroll 2021-07-21 15:33:59 +02:00
Chocobozzz c63830f154
Rename captions commands 2021-07-21 13:58:35 +02:00
Chocobozzz 4d029ef8ec
Add ability for instances to follow any actor 2021-07-21 13:35:31 +02:00
Chocobozzz 7f28f2ddba
Warning when using capitalized letter in login 2021-07-20 15:27:19 +02:00
Chocobozzz 01af646261
Channel deletion consistency 2021-07-20 15:27:19 +02:00
Chocobozzz c0e8b12e7f
Refactor requests 2021-07-20 15:27:18 +02:00
Chocobozzz 98fb490eb6
Fix signup button display 2021-07-20 13:49:46 +02:00
Chocobozzz f4e5ac1ffe
Fix user creation form 2021-07-16 16:26:20 +02:00
Chocobozzz a3f45a2ab3
Fix default privacy when plugins deleted private 2021-07-13 08:46:51 +02:00
Chocobozzz b980bcff7b
Fix privacy input altered by plugins 2021-07-12 14:48:57 +02:00
Chocobozzz 77d873c56d
Fix subscribe hotkey 2021-07-12 10:04:48 +02:00
Chocobozzz cf7f583098
Use show uuid for playlist miniatures 2021-07-05 09:27:53 +02:00
Chocobozzz c4238d68fb
Remove unused variable 2021-07-02 14:42:42 +02:00
Chocobozzz 787409e64a
Fix search module import 2021-07-02 08:49:54 +02:00
Chocobozzz f6c1251def
Use consistent margins 2021-07-01 18:05:08 +02:00
Chocobozzz 674d903b0e
Support accountHandle and channelHandle 2021-07-01 17:41:03 +02:00
Chocobozzz 8b61dcaf23
Homepage error handling 2021-07-01 17:28:47 +02:00
Chocobozzz c894a1ea72
Move watch attributes in a dedicated component 2021-06-30 09:49:45 +02:00
Chocobozzz 2453589a28
Move video alert in a dedicated component 2021-06-30 08:56:14 +02:00
Chocobozzz d4f0b2ecec
Relax watch CSS 2021-06-30 08:50:20 +02:00
Chocobozzz 8d64a72b4c
Refactor a little bit watch html 2021-06-29 18:08:59 +02:00
Chocobozzz 06a5557979
Move watch action buttons in a dedicated component 2021-06-29 18:01:02 +02:00
Chocobozzz 6ebdd12f88
Move privacy concerns in a dedicated component 2021-06-29 17:36:28 +02:00
Chocobozzz 911186dae4
Reorganize watch components 2021-06-29 17:18:39 +02:00
Chocobozzz b0c43e36db
Create a dedicated component for video description 2021-06-29 17:15:05 +02:00
Chocobozzz 6ea59f4154
Create a dedicated component for video rating 2021-06-29 17:00:30 +02:00
Chocobozzz 0ca454e3bd
Only display homepage when components are loaded 2021-06-29 16:16:12 +02:00
Chocobozzz 76b8d72e32
Playlist miniature consistent font size 2021-06-29 15:27:40 +02:00
Chocobozzz 24893b524c
Fix peertube container in markdown preview 2021-06-29 15:17:01 +02:00