1
0
Fork 0
peertube/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.compon...

223 lines
9.8 KiB
HTML
Raw Normal View History

2021-02-10 10:06:32 +00:00
<ng-container [formGroup]="form">
2022-06-08 14:14:24 +00:00
<div class="row mt-4"> <!-- transcoding grid -->
<div class="col-12 col-lg-4 col-xl-3"></div>
<div class="col-12 col-lg-8">
2021-02-10 10:06:32 +00:00
2022-06-14 11:54:54 +00:00
<div class="callout callout-orange">
2021-02-10 10:06:32 +00:00
<span i18n>
Estimating a server's capacity to transcode and stream videos isn't easy and we can't tune PeerTube automatically.
</span>
2022-06-15 12:59:25 +00:00
2021-02-10 10:06:32 +00:00
<span i18n>
2023-02-23 08:46:43 +00:00
However, you may want to read <a class="link-orange" target="_blank" rel="noopener noreferrer" href="https://docs.joinpeertube.org/admin/configuration#vod-transcoding">our guidelines</a> before tweaking the following values.
2021-02-10 10:06:32 +00:00
</span>
</div>
</div>
</div>
2022-06-08 14:14:24 +00:00
<div class="row mt-4"> <!-- transcoding grid -->
<div class="col-12 col-lg-4 col-xl-3">
2021-02-10 10:06:32 +00:00
<div i18n class="inner-form-title">TRANSCODING</div>
<div i18n class="inner-form-description">
Process uploaded videos so that they are in a streamable form that any device can play. Though costly in
resources, this is a critical part of PeerTube, so tread carefully.
</div>
</div>
2022-06-08 14:14:24 +00:00
<div class="col-12 col-lg-8 col-xl-9">
2021-02-10 10:06:32 +00:00
<ng-container formGroupName="transcoding">
2022-06-08 14:14:24 +00:00
<div class="col-12 col-xl-11">
2021-02-10 10:06:32 +00:00
<my-peertube-checkbox inputName="transcodingEnabled" formControlName="enabled" [recommended]="true">
<ng-template ptTemplate="label">
<ng-container i18n>Transcoding enabled</ng-container>
</ng-template>
<ng-container ngProjectAs="extra">
<div class="callout callout-light pt-2 pb-0">
<label i18n>Input formats</label>
2021-02-10 10:27:36 +00:00
<div class="form-group" [ngClass]="getTranscodingDisabledClass()">
2021-02-10 10:06:32 +00:00
<my-peertube-checkbox
inputName="transcodingAllowAdditionalExtensions" formControlName="allowAdditionalExtensions"
i18n-labelText labelText="Allow additional extensions"
>
<ng-container ngProjectAs="description">
<span i18n>Allows users to upload videos with additional extensions than .mp4, .ogv and .webm (for example: .avi, .mov, .mkv etc).</span>
2021-02-10 10:06:32 +00:00
</ng-container>
</my-peertube-checkbox>
</div>
2021-02-10 10:27:36 +00:00
<div class="form-group" [ngClass]="getTranscodingDisabledClass()">
2021-02-10 10:06:32 +00:00
<my-peertube-checkbox
inputName="transcodingAllowAudioFiles" formControlName="allowAudioFiles"
i18n-labelText labelText="Allow audio files upload"
>
<ng-container ngProjectAs="description">
<div i18n>Allows users to upload .mp3, .ogg, .wma, .flac, .aac, or .ac3 audio files.</div>
<div i18n>The file will be merged in a still image video with the preview file on upload.</div>
</ng-container>
</my-peertube-checkbox>
</div>
</div>
<div class="callout callout-light pt-2 mt-2 pb-0">
<label i18n>Output formats</label>
<ng-container formGroupName="webtorrent">
2021-02-10 10:27:36 +00:00
<div class="form-group" [ngClass]="getTranscodingDisabledClass()">
2021-02-10 10:06:32 +00:00
<my-peertube-checkbox
inputName="transcodingWebTorrentEnabled" formControlName="enabled"
i18n-labelText labelText="WebTorrent enabled"
>
<ng-template ptTemplate="help">
2021-02-10 10:27:36 +00:00
<ng-container>
<p i18n>If you also enabled HLS support, it will multiply videos storage by 2</p>
2021-02-10 10:06:32 +00:00
</ng-container>
</ng-template>
</my-peertube-checkbox>
</div>
</ng-container>
<ng-container formGroupName="hls">
2021-02-10 10:27:36 +00:00
<div class="form-group" [ngClass]="getTranscodingDisabledClass()">
2021-02-10 10:06:32 +00:00
<my-peertube-checkbox
inputName="transcodingHlsEnabled" formControlName="enabled"
i18n-labelText labelText="HLS with P2P support enabled"
[recommended]="true"
>
<ng-template ptTemplate="help">
<ng-container i18n>
<strong>Requires ffmpeg >= 4.1</strong>
<p>Generate HLS playlists and fragmented MP4 files resulting in a better playback than with plain WebTorrent:</p>
<ul>
<li>Resolution change is smoother</li>
<li>Faster playback especially with long videos</li>
<li>More stable playback (less bugs/infinite loading)</li>
</ul>
<p>If you also enabled WebTorrent support, it will multiply videos storage by 2</p>
</ng-container>
</ng-template>
</my-peertube-checkbox>
</div>
</ng-container>
2021-02-10 10:27:36 +00:00
<div class="form-group" [ngClass]="getTranscodingDisabledClass()">
2022-09-13 10:01:05 +00:00
<label i18n>Resolutions to generate</label>
2021-02-10 10:06:32 +00:00
2022-06-15 12:59:25 +00:00
<div class="ms-2 d-flex flex-column">
<my-peertube-checkbox
inputName="transcodingAlwaysTranscodeOriginalResolution" formControlName="alwaysTranscodeOriginalResolution"
i18n-labelText labelText="Always transcode original resolution"
>
</my-peertube-checkbox>
<span class="mt-3 mb-2 small muted" i18n>
2022-06-15 12:59:25 +00:00
The original file resolution will be the default target if no option is selected.
</span>
2021-02-10 10:06:32 +00:00
<ng-container formGroupName="resolutions">
<div class="form-group" *ngFor="let resolution of resolutions">
<my-peertube-checkbox
[inputName]="getResolutionKey(resolution.id)" [formControlName]="resolution.id"
labelText="{{ resolution.label }}"
>
<ng-template *ngIf="resolution.description" ptTemplate="help">
<div [innerHTML]="resolution.description"></div>
</ng-template>
</my-peertube-checkbox>
</div>
</ng-container>
</div>
</div>
</div>
</ng-container>
</my-peertube-checkbox>
</div>
2021-02-10 10:27:36 +00:00
<div class="form-group mt-4" [ngClass]="getTranscodingDisabledClass()">
2021-02-10 10:06:32 +00:00
<label i18n for="transcodingThreads">Transcoding threads</label>
2022-06-15 12:59:25 +00:00
<span class="small muted ms-1">
2021-02-10 10:27:36 +00:00
<ng-container *ngIf="getTotalTranscodingThreads().atMost" i18n>
will claim at most {{ getTotalTranscodingThreads().value }} {{ getTotalTranscodingThreads().unit }} with live transcoding
</ng-container>
<ng-container *ngIf="!getTotalTranscodingThreads().atMost" i18n>
will claim at least {{ getTotalTranscodingThreads().value }} {{ getTotalTranscodingThreads().unit }} with live transcoding
</ng-container>
2021-02-10 10:06:32 +00:00
</span>
<my-select-custom-value
id="transcodingThreads"
[items]="transcodingThreadOptions"
formControlName="threads"
[clearable]="false"
></my-select-custom-value>
<div *ngIf="formErrors.transcoding.threads" class="form-error">{{ formErrors.transcoding.threads }}</div>
</div>
2022-06-08 14:14:24 +00:00
<div class="form-group" [ngClass]="getTranscodingDisabledClass()">
2021-02-10 10:06:32 +00:00
<label i18n for="transcodingConcurrency">Transcoding jobs concurrency</label>
2022-06-15 12:59:25 +00:00
<span class="small muted ms-1" i18n>allows to transcode multiple files in parallel. ⚠️ Requires a PeerTube restart</span>
2021-02-10 10:06:32 +00:00
<div class="number-with-unit">
<input type="number" name="transcodingConcurrency" formControlName="concurrency" />
<span i18n>jobs in parallel</span>
</div>
<div *ngIf="formErrors.transcoding.concurrency" class="form-error">{{ formErrors.transcoding.concurrency }}</div>
</div>
2022-06-08 14:14:24 +00:00
<div class="form-group" [ngClass]="getTranscodingDisabledClass()">
2021-02-10 10:06:32 +00:00
<label i18n for="transcodingProfile">Transcoding profile</label>
2022-06-15 12:59:25 +00:00
<span class="small muted ms-1" i18n>new transcoding profiles can be added by PeerTube plugins</span>
2021-02-10 10:06:32 +00:00
<my-select-options
id="transcodingProfile"
formControlName="profile"
2021-04-08 12:41:15 +00:00
[items]="transcodingProfiles"
2021-02-10 10:06:32 +00:00
[clearable]="false"
2021-02-10 10:27:36 +00:00
></my-select-options>
2021-02-10 10:06:32 +00:00
<div *ngIf="formErrors.transcoding.profile" class="form-error">{{ formErrors.transcoding.profile }}</div>
</div>
</ng-container>
</div>
</div>
2022-02-11 09:51:33 +00:00
2022-06-08 14:14:24 +00:00
<div class="row mt-2"> <!-- video studio grid -->
<div class="col-12 col-lg-4 col-xl-3">
2022-03-22 15:58:49 +00:00
<div i18n class="inner-form-title">VIDEO STUDIO</div>
2022-02-11 09:51:33 +00:00
<div i18n class="inner-form-description">
Allows your users to edit their video (cut, add intro/outro, add a watermark etc)
</div>
</div>
2022-06-08 14:14:24 +00:00
<div class="col-12 col-lg-8 col-xl-9">
2022-02-11 09:51:33 +00:00
2022-03-22 15:58:49 +00:00
<ng-container formGroupName="videoStudio">
2022-02-11 09:51:33 +00:00
<div class="form-group" [ngClass]="getTranscodingDisabledClass()">
<my-peertube-checkbox
2022-03-22 15:58:49 +00:00
inputName="videoStudioEnabled" formControlName="enabled"
i18n-labelText labelText="Enable video studio"
2022-02-11 09:51:33 +00:00
>
<ng-container ngProjectAs="description" *ngIf="!isTranscodingEnabled()">
2022-03-22 15:58:49 +00:00
<span i18n>⚠️ You need to enable transcoding first to enable video studio</span>
2022-02-11 09:51:33 +00:00
</ng-container>
</my-peertube-checkbox>
</div>
</ng-container>
</div>
</div>
2021-02-10 10:06:32 +00:00
</ng-container>