Commit Graph

48 Commits (83002a823465fe03a8d82833cb2e073a383405a8)

Author SHA1 Message Date
Chocobozzz 83002a8234
Update server dependencies 2023-05-22 17:11:31 +02:00
Chocobozzz 0c9668f779 Implement remote runner jobs in server
Move ffmpeg functions to @shared
2023-05-09 08:57:34 +02:00
Chocobozzz 44df702502
More robust updateTorrentMetadata 2022-10-26 10:55:12 +02:00
Chocobozzz 9ab330b90d Use private ACL for private videos in s3 2022-10-24 14:48:24 +02:00
Chocobozzz 3545e72c68 Put private videos under a specific subdirectory 2022-10-24 14:48:24 +02:00
Chocobozzz c729caf6cc Add basic video editor support 2022-02-28 10:42:19 +01:00
Chocobozzz f304a1580b
Fix build 2021-12-17 13:58:07 +01:00
Chocobozzz c55e3d7227
Move test functions outside extra-utils 2021-12-17 12:24:03 +01:00
lutangar 06aad80165 chore(refactor): remove shared folder dependencies to the server
Many files from the `shared` folder were importing files from the `server` folder.
When attempting to use Typescript project references to describe dependencies,
it highlighted a circular dependency beetween `shared` <-> `server`.

The Typescript project forbid such usages.
Using project references greatly improve performance by rebuilding only
the updated project and not all source files.
> see https://www.typescriptlang.org/docs/handbook/project-references.html
2021-12-16 10:08:43 +01:00
Chocobozzz 38d69d6501
Update torrents info name on video update 2021-12-08 16:12:49 +01:00
Chocobozzz 9b293cd6a2
Update torrent metadata on video update 2021-12-08 11:07:19 +01:00
Chocobozzz ad5db1044c
Add ability to run transcoding jobs 2021-11-18 15:20:57 +01:00
Chocobozzz 02b286f890
More robust webtorrent redundancy download
Avoid issues with inconsistencies between magnet infohash and torrent
infohash, blocking webtorrent upload that will timeout
2021-09-06 16:19:49 +02:00
Chocobozzz 41fb13c330
esModuleInterop to true 2021-08-27 15:12:22 +02:00
Chocobozzz e111a5a3a1
Don't throw when there is no error 2021-08-26 15:51:37 +02:00
Chocobozzz 095094872a
Remove too much log for webtorrent download 2021-08-26 15:28:51 +02:00
Chocobozzz 0bae66632a
More logs for webtorrent download 2021-08-26 15:19:11 +02:00
Chocobozzz f645af4396
Remove useless condition 2021-08-18 09:33:48 +02:00
Chocobozzz 1f6125be8b
Optimize torrent URL update 2021-08-18 09:14:51 +02:00
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 764b1a14fc Use random names for VOD HLS playlists 2021-07-26 11:29:31 +02:00
Chocobozzz 8efc27bf14 Cleanup 2021-02-18 13:38:09 +01:00
Chocobozzz d9a2a03196 Don't guess remote tracker URL 2021-02-18 13:38:09 +01:00
Chocobozzz 90a8bd305d Dissociate video file names and video uuid 2021-02-18 13:38:09 +01:00
Chocobozzz ba5a8d89bb
Update server dependencies 2021-02-03 09:45:08 +01:00
Chocobozzz 26d6bf6533
Split types and typings 2020-06-18 10:46:27 +02:00
Chocobozzz 8dc8a34ee8 Avoir some circular dependencies 2020-05-04 16:21:39 +02:00
Chocobozzz a15871560f
Move to eslint 2020-02-03 08:31:02 +01:00
Chocobozzz b764380ac2 Add ability to list redundancies 2020-01-28 11:35:26 +01:00
Chocobozzz d441f2ed78
Add disable webtorrent migration 2019-11-25 10:59:45 +01:00
Chocobozzz d7a25329f9
Add ability to disable webtorrent
In favour of HLS
2019-11-25 10:59:43 +01:00
Chocobozzz 30ff39e7f0 Move createTorrent in webtorrent utils 2019-07-24 10:58:16 +02:00
Chocobozzz 6dd9de95df
Move config in its own file 2019-04-11 13:45:39 +02:00
Chocobozzz 6040f87d14
Add tmp and redundancy directories 2018-12-04 16:04:15 +01:00
Chocobozzz cf9166cf2f
Add timeout on youtube dl to cleaup files 2018-10-01 12:00:05 +02:00
Chocobozzz e37c85e933
Delete each file on failed import 2018-10-01 10:52:58 +02:00
Chocobozzz d0b52b5285
Correctly delete directories on import 2018-09-28 09:08:12 +02:00
Chocobozzz a71de50bbc
Correctly fix the webtorrent redundancy bug 2018-09-26 08:50:21 +02:00
Chocobozzz 69fa54a0b2
Dirty webtorrent fix to wait FS sync 2018-09-25 19:42:05 +02:00
Chocobozzz c922d14220
Fix redundancy bug with old peertube torrent 2018-09-25 17:49:50 +02:00
Chocobozzz dae4a1c0f8
Improve webtorrent import error message when the torrent has multiple
files
2018-09-17 17:50:51 +02:00
Chocobozzz c48e82b5e0 Basic video redundancy implementation 2018-09-13 14:05:49 +02:00
Chocobozzz 62689b942b
Correctly migrate to fs-extra 2018-08-27 16:23:34 +02:00
Rigel Kent c9d5c64f98 replace fs by fs-extra to prevent EMFILE error 2018-08-27 16:03:57 +02:00
Chocobozzz 541006e355 Correct webtorrent download cleanup 2018-08-08 09:30:31 +02:00
Chocobozzz 3e17515e29 Add torrent tests 2018-08-08 09:30:31 +02:00
Chocobozzz 990b6a0b0c Import torrents with webtorrent 2018-08-08 09:30:31 +02:00
Chocobozzz ce33919c24 Import magnets with webtorrent 2018-08-08 09:30:31 +02:00