Browse Source

Add ability to enabled HLS in the admin panel

Chocobozzz 1 month ago
parent
commit
5d9e4eaabe
No account linked to committer's email address

+ 22
- 0
client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html View File

@@ -491,6 +491,28 @@
491 491
               </my-peertube-checkbox>
492 492
             </div>
493 493
 
494
+            <ng-container formGroupName="hls">
495
+              <div class="form-group" >
496
+                <my-peertube-checkbox
497
+                  inputName="transcodingHlsEnabled" formControlName="enabled"
498
+                  i18n-labelText labelText="HLS support enabled"
499
+                >
500
+                  <ng-template ptTemplate="help">
501
+                    <ng-container i18n>
502
+                      <strong>Requires ffmpeg >= 4.1 and multiplies videos storage by 2!</strong>
503
+
504
+                      <p>Generate HLS playlists and fragmented MP4 files resulting in a better playback than with the current default player:</p>
505
+                      <ul>
506
+                        <li>Resolution change is smoother</li>
507
+                        <li>Faster playback in particular with long videos</li>
508
+                        <li>More stable playback (less bugs/infinite loading)</li>
509
+                      </ul>
510
+                    </ng-container>
511
+                  </ng-template>
512
+                </my-peertube-checkbox>
513
+              </div>
514
+            </ng-container>
515
+
494 516
             <div class="form-group">
495 517
               <label i18n for="transcodingThreads">Transcoding threads</label>
496 518
               <div class="peertube-select-container">

+ 4
- 1
client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts View File

@@ -166,7 +166,10 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit {
166 166
         threads: this.customConfigValidatorsService.TRANSCODING_THREADS,
167 167
         allowAdditionalExtensions: null,
168 168
         allowAudioFiles: null,
169
-        resolutions: {}
169
+        resolutions: {},
170
+        hls: {
171
+          enabled: null
172
+        }
170 173
       },
171 174
       autoBlacklist: {
172 175
         videos: {

+ 1
- 2
config/default.yaml View File

@@ -209,8 +209,7 @@ transcoding:
209 209
     720p: false
210 210
     1080p: false
211 211
     2160p: false
212
-  # /!\ EXPERIMENTAL /!\
213
-  # /!\ Requires ffmpeg >= 4
212
+  # /!\ Requires ffmpeg >= 4.1
214 213
   # Generate HLS playlists and fragmented MP4 files. Better playback than with WebTorrent:
215 214
   #     * Resolution change is smoother
216 215
   #     * Faster playback in particular with long videos

+ 1
- 2
config/production.yaml.example View File

@@ -223,8 +223,7 @@ transcoding:
223 223
     720p: false
224 224
     1080p: false
225 225
     2160p: false
226
-  # /!\ EXPERIMENTAL /!\
227
-  # /!\ Requires ffmpeg >= 4
226
+  # /!\ Requires ffmpeg >= 4.1
228 227
   # Generate HLS playlists and fragmented MP4 files. Better playback than with WebTorrent:
229 228
   #     * Resolution change is smoother
230 229
   #     * Faster playback in particular with long videos

+ 1
- 1
server/initializers/checker-before-init.ts View File

@@ -21,7 +21,7 @@ function checkMissedConfig () {
21 21
     'signup.enabled', 'signup.limit', 'signup.requires_email_verification',
22 22
     'signup.filters.cidr.whitelist', 'signup.filters.cidr.blacklist',
23 23
     'redundancy.videos.strategies', 'redundancy.videos.check_interval',
24
-    'transcoding.enabled', 'transcoding.threads', 'transcoding.allow_additional_extensions',
24
+    'transcoding.enabled', 'transcoding.threads', 'transcoding.allow_additional_extensions', 'transcoding.hls.enabled',
25 25
     'import.videos.http.enabled', 'import.videos.torrent.enabled', 'auto_blacklist.videos.of_users.enabled',
26 26
     'trending.videos.interval_days',
27 27
     'instance.name', 'instance.short_description', 'instance.description', 'instance.terms', 'instance.default_client_route',

Loading…
Cancel
Save