From 5d9e4eaabe87ff1b115114b01075b9fabd2b0c5e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 5 Nov 2019 10:13:37 +0100 Subject: Add ability to enabled HLS in the admin panel --- .../edit-custom-config.component.html | 22 ++++++++++++++++++++++ .../edit-custom-config.component.ts | 5 ++++- config/default.yaml | 3 +-- config/production.yaml.example | 3 +-- server/initializers/checker-before-init.ts | 2 +- 5 files changed, 29 insertions(+), 6 deletions(-) diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html index 5e7ab03cd..e057e394e 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html +++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html @@ -491,6 +491,28 @@ + +
+ + + + Requires ffmpeg >= 4.1 and multiplies videos storage by 2! + +

Generate HLS playlists and fragmented MP4 files resulting in a better playback than with the current default player:

+
    +
  • Resolution change is smoother
  • +
  • Faster playback in particular with long videos
  • +
  • More stable playback (less bugs/infinite loading)
  • +
+
+
+
+
+
+
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts index 0a69f3481..f3fb849bb 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts +++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts @@ -166,7 +166,10 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit { threads: this.customConfigValidatorsService.TRANSCODING_THREADS, allowAdditionalExtensions: null, allowAudioFiles: null, - resolutions: {} + resolutions: {}, + hls: { + enabled: null + } }, autoBlacklist: { videos: { diff --git a/config/default.yaml b/config/default.yaml index 5ebfdeddb..b16ebe934 100644 --- a/config/default.yaml +++ b/config/default.yaml @@ -209,8 +209,7 @@ transcoding: 720p: false 1080p: false 2160p: false - # /!\ EXPERIMENTAL /!\ - # /!\ Requires ffmpeg >= 4 + # /!\ Requires ffmpeg >= 4.1 # Generate HLS playlists and fragmented MP4 files. Better playback than with WebTorrent: # * Resolution change is smoother # * Faster playback in particular with long videos diff --git a/config/production.yaml.example b/config/production.yaml.example index 96d676a35..d563c7cf2 100644 --- a/config/production.yaml.example +++ b/config/production.yaml.example @@ -223,8 +223,7 @@ transcoding: 720p: false 1080p: false 2160p: false - # /!\ EXPERIMENTAL /!\ - # /!\ Requires ffmpeg >= 4 + # /!\ Requires ffmpeg >= 4.1 # Generate HLS playlists and fragmented MP4 files. Better playback than with WebTorrent: # * Resolution change is smoother # * Faster playback in particular with long videos diff --git a/server/initializers/checker-before-init.ts b/server/initializers/checker-before-init.ts index a986c3e0e..d32ff9b81 100644 --- a/server/initializers/checker-before-init.ts +++ b/server/initializers/checker-before-init.ts @@ -21,7 +21,7 @@ function checkMissedConfig () { 'signup.enabled', 'signup.limit', 'signup.requires_email_verification', 'signup.filters.cidr.whitelist', 'signup.filters.cidr.blacklist', 'redundancy.videos.strategies', 'redundancy.videos.check_interval', - 'transcoding.enabled', 'transcoding.threads', 'transcoding.allow_additional_extensions', + 'transcoding.enabled', 'transcoding.threads', 'transcoding.allow_additional_extensions', 'transcoding.hls.enabled', 'import.videos.http.enabled', 'import.videos.torrent.enabled', 'auto_blacklist.videos.of_users.enabled', 'trending.videos.interval_days', 'instance.name', 'instance.short_description', 'instance.description', 'instance.terms', 'instance.default_client_route', -- cgit v1.2.3