Commit Graph

257 Commits (5576acf89dbb8b7168bfb16004617060af0fc8af)

Author SHA1 Message Date
Chocobozzz 26e3e98ff0
Support live session in server 2022-05-03 14:49:15 +02:00
Chocobozzz 4ec52d04dc
Add ability to save replay of permanent lives 2022-04-21 11:47:57 +02:00
Chocobozzz b211106695 Support video views/viewers stats in server
* Add "currentTime" and "event" body params to view endpoint
 * Merge watching and view endpoints
 * Introduce WatchAction AP activity
 * Add tables to store viewer information of local videos
 * Add endpoints to fetch video views/viewers stats of local videos
 * Refactor views/viewers handlers
 * Support "views" and "viewers" counters for both VOD and live videos
2022-04-15 09:49:35 +02:00
Chocobozzz 69d48ee30c
Don't clean mastodon rates
Workaround of https://github.com/mastodon/mastodon/issues/13571
2022-04-15 09:17:16 +02:00
Chocobozzz a219c9100b
Refactor AP context builder 2022-03-24 09:40:46 +01:00
Chocobozzz 7e98a7df7d
Remove activitypub helper
Put functions in lib/activitypub instead
2022-03-23 14:24:50 +01:00
Chocobozzz 92e66e04f7
Rename studio to editor 2022-03-22 17:24:32 +01:00
Chocobozzz 1808a1f8e4
Add video edition finished notification 2022-03-22 16:25:14 +01:00
Chocobozzz 57e4e1c1a9
Don't store remote rates of remote videos
In the future we'll stop to expose all available rates to improve users
privacy
2022-03-18 11:21:50 +01:00
Chocobozzz 52fe4b671a
Fix torrent creation 2022-03-16 18:35:05 +01:00
Chocobozzz f012319a64
Process video torrents in order
Prevent update before video torrent generation for example
2022-03-16 15:45:58 +01:00
Chocobozzz c729caf6cc Add basic video editor support 2022-02-28 10:42:19 +01:00
Chocobozzz 7630e1c893
Fix import timeout inconsistency 2022-02-09 11:54:18 +01:00
Chocobozzz a2caee9f51
Fix HLS re transcoding with object storage enabled 2022-02-01 14:19:44 +01:00
Chocobozzz 0f11ec8dd3
Prevent HLS transcoding after webtorrent transcoding 2022-02-01 11:27:38 +01:00
Chocobozzz d511df2890
Add ability to filter my imports by target URL 2022-01-19 14:58:16 +01:00
Chocobozzz 419b520ca4
Add ability to cancel & delete video imports 2022-01-19 14:31:05 +01:00
Chocobozzz ff4d2c73fd
Fix bull redis options 2022-01-14 15:06:33 +01:00
Chocobozzz cbe2f36d93
Fix audio transcoding with video only file 2022-01-06 17:55:37 +01:00
Chocobozzz 10a72a7e61
Fix tests 2021-12-28 14:12:57 +01:00
Chocobozzz f1569117f9
Cleanup unavailable remote AP resource 2021-12-28 11:37:05 +01:00
Chocobozzz d17c7b4e8c
Fix shared imports 2021-12-24 10:14:47 +01:00
Chocobozzz 5354af75b3
Fix video import transcoding 2021-12-23 13:40:47 +01:00
Chocobozzz dbd9fb44dd
Don't stuck state when move transcoding job failed 2021-12-23 11:13:06 +01:00
Chocobozzz 482b26231b
Fix audio only transcoding 2021-12-23 10:57:55 +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 9b293cd6a2
Update torrent metadata on video update 2021-12-08 11:07:19 +01:00
Chocobozzz 025d858e79
Fix pending transcoding with failed job 2021-12-03 14:40:29 +01:00
Chocobozzz fa7388f087
Fix transcoding job count inconsistency 2021-11-29 11:20:17 +01:00
Chocobozzz ad5db1044c
Add ability to run transcoding jobs 2021-11-18 15:20:57 +01:00
Chocobozzz b46cf4b920
Add ability to remove hls/webtorrent files 2021-11-18 09:04:30 +01:00
Chocobozzz 51353d9a03 Refactor video views
Introduce viewers attribute for live videos
Count views for live videos
Reduce delay to see the viewer update for lives
Add ability to configure video views buffer interval and view ip
expiration
2021-11-09 15:00:31 +01:00
Chocobozzz 221ee1adc9 Add transcoding fail message in client 2021-11-09 15:00:21 +01:00
kontrollanten 4e29f4fe23 video: add video stranscoding_failed state 2021-11-09 15:00:21 +01:00
kontrollanten e1ab52d7ec
Add migrate-to-object-storage script (#4481)
* add migrate-to-object-storage-script

closes #4467

* add migrate-to-unique-playlist-filenames script

* fix(migrate-to-unique-playlist-filenames): update master/segments256

run updateMasterHLSPlaylist and updateSha256VODSegments after
file rename.

* Improve move to object storage scripts

* PR remarks

Co-authored-by: Chocobozzz <me@florianbigard.com>
2021-11-09 11:05:35 +01:00
Rigel Kent 276250f0a3
prevent multiple post-process triggering of upload-resumable (#4175)
* prevent multiple post-process triggering of upload-resumable

* switch from 409 to 503 for upload being processed

* Improve resumable upload check

Co-authored-by: Chocobozzz <me@florianbigard.com>
2021-10-25 17:42:20 +02:00
Chocobozzz 62549e6c98
Rewrite youtube-dl import
Use python3 binary
Allows to use a custom youtube-dl release URL
Allows to use yt-dlp (youtube-dl fork)
Remove proxy config from configuration to use HTTP_PROXY and HTTPS_PROXY
env variables
2021-10-22 10:25:24 +02:00
Chocobozzz f0ab2aed3d
Fix lint 2021-10-14 14:14:57 +02:00
Chocobozzz e1a570abff
Fix user subscription follows count 2021-10-14 10:52:15 +02:00
Chocobozzz 9db437c815
Process slow followers in unicast job queue 2021-10-13 11:47:32 +02:00
Chocobozzz fb72d2e1c2
Fix infohash with object storage 2021-09-07 15:16:26 +02: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 5a298a5a3d
Better logs for transcoding 2021-08-26 10:01:42 +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 679c12e69c
Improve target bitrate calculation 2021-08-06 14:13:26 +02:00
Chocobozzz e83d06a702
Remove deprecated transcoding job names 2021-08-05 14:29:44 +02:00
Chocobozzz d26836cd95
Refactor notifier 2021-08-02 10:39:51 +02:00
Chocobozzz 764b1a14fc Use random names for VOD HLS playlists 2021-07-26 11:29:31 +02:00