]>
Commit | Line | Data |
---|---|---|
5f46d28c C |
1 | <ng-container [formGroup]="form"> |
2 | ||
4c8749cb C |
3 | <div class="row mt-4"> <!-- transcoding grid --> |
4 | <div class="col-12 col-lg-4 col-xl-3"></div> | |
5 | <div class="col-12 col-lg-8"> | |
5f46d28c C |
6 | |
7 | <div class="callout callout-info"> | |
8 | <span i18n> | |
9 | Estimating a server's capacity to transcode and stream videos isn't easy and we can't tune PeerTube automatically. | |
10 | </span> | |
11 | <span i18n> | |
12 | However, you may want to read our guidelines before tweaking the following values. | |
13 | </span> | |
14 | ||
15 | <div class="callout-container"> | |
9817060f | 16 | <a class="callout-link" target="_blank" rel="noopener noreferrer" href="https://docs.joinpeertube.org/admin-configuration?id=transcoding" i18n> |
70e33515 C |
17 | Read guidelines |
18 | </a> | |
5f46d28c C |
19 | </div> |
20 | </div> | |
21 | </div> | |
22 | </div> | |
23 | ||
4c8749cb C |
24 | <div class="row mt-4"> <!-- transcoding grid --> |
25 | <div class="col-12 col-lg-4 col-xl-3"> | |
5f46d28c C |
26 | <div i18n class="inner-form-title">TRANSCODING</div> |
27 | <div i18n class="inner-form-description"> | |
28 | Process uploaded videos so that they are in a streamable form that any device can play. Though costly in | |
29 | resources, this is a critical part of PeerTube, so tread carefully. | |
30 | </div> | |
31 | </div> | |
32 | ||
4c8749cb | 33 | <div class="col-12 col-lg-8 col-xl-9"> |
5f46d28c C |
34 | |
35 | <ng-container formGroupName="transcoding"> | |
36 | ||
4c8749cb | 37 | <div class="col-12 col-xl-11"> |
5f46d28c C |
38 | <my-peertube-checkbox inputName="transcodingEnabled" formControlName="enabled" [recommended]="true"> |
39 | <ng-template ptTemplate="label"> | |
40 | <ng-container i18n>Transcoding enabled</ng-container> | |
41 | </ng-template> | |
42 | ||
43 | <ng-container ngProjectAs="extra"> | |
44 | ||
45 | <div class="callout callout-light pt-2 pb-0"> | |
46 | <label i18n>Input formats</label> | |
47 | ||
70e33515 | 48 | <div class="form-group" [ngClass]="getTranscodingDisabledClass()"> |
5f46d28c C |
49 | <my-peertube-checkbox |
50 | inputName="transcodingAllowAdditionalExtensions" formControlName="allowAdditionalExtensions" | |
51 | i18n-labelText labelText="Allow additional extensions" | |
52 | > | |
53 | <ng-container ngProjectAs="description"> | |
e78acf81 | 54 | <span i18n>Allows users to upload videos with additional extensions than .mp4, .ogv and .webm (for example: .avi, .mov, .mkv etc).</span> |
5f46d28c C |
55 | </ng-container> |
56 | </my-peertube-checkbox> | |
57 | </div> | |
58 | ||
70e33515 | 59 | <div class="form-group" [ngClass]="getTranscodingDisabledClass()"> |
5f46d28c C |
60 | <my-peertube-checkbox |
61 | inputName="transcodingAllowAudioFiles" formControlName="allowAudioFiles" | |
62 | i18n-labelText labelText="Allow audio files upload" | |
63 | > | |
64 | <ng-container ngProjectAs="description"> | |
65 | <div i18n>Allows users to upload .mp3, .ogg, .wma, .flac, .aac, or .ac3 audio files.</div> | |
66 | <div i18n>The file will be merged in a still image video with the preview file on upload.</div> | |
67 | </ng-container> | |
68 | </my-peertube-checkbox> | |
69 | </div> | |
70 | </div> | |
71 | ||
72 | <div class="callout callout-light pt-2 mt-2 pb-0"> | |
73 | <label i18n>Output formats</label> | |
74 | ||
75 | <ng-container formGroupName="webtorrent"> | |
70e33515 | 76 | <div class="form-group" [ngClass]="getTranscodingDisabledClass()"> |
5f46d28c C |
77 | <my-peertube-checkbox |
78 | inputName="transcodingWebTorrentEnabled" formControlName="enabled" | |
79 | i18n-labelText labelText="WebTorrent enabled" | |
80 | > | |
81 | <ng-template ptTemplate="help"> | |
70e33515 C |
82 | <ng-container> |
83 | <p i18n>If you also enabled HLS support, it will multiply videos storage by 2</p> | |
5f46d28c C |
84 | </ng-container> |
85 | </ng-template> | |
86 | </my-peertube-checkbox> | |
87 | </div> | |
88 | </ng-container> | |
89 | ||
90 | <ng-container formGroupName="hls"> | |
70e33515 | 91 | <div class="form-group" [ngClass]="getTranscodingDisabledClass()"> |
5f46d28c C |
92 | <my-peertube-checkbox |
93 | inputName="transcodingHlsEnabled" formControlName="enabled" | |
94 | i18n-labelText labelText="HLS with P2P support enabled" | |
95 | [recommended]="true" | |
96 | > | |
97 | <ng-template ptTemplate="help"> | |
98 | <ng-container i18n> | |
99 | <strong>Requires ffmpeg >= 4.1</strong> | |
100 | ||
101 | <p>Generate HLS playlists and fragmented MP4 files resulting in a better playback than with plain WebTorrent:</p> | |
102 | <ul> | |
103 | <li>Resolution change is smoother</li> | |
104 | <li>Faster playback especially with long videos</li> | |
105 | <li>More stable playback (less bugs/infinite loading)</li> | |
106 | </ul> | |
107 | ||
108 | <p>If you also enabled WebTorrent support, it will multiply videos storage by 2</p> | |
109 | </ng-container> | |
110 | </ng-template> | |
111 | </my-peertube-checkbox> | |
112 | </div> | |
113 | </ng-container> | |
114 | ||
70e33515 | 115 | <div class="form-group" [ngClass]="getTranscodingDisabledClass()"> |
5f46d28c C |
116 | <label i18n>Resolutions to generate per enabled format</label> |
117 | ||
4c8749cb | 118 | <div class="ms-2 mt-2 d-flex flex-column"> |
5f46d28c C |
119 | <ng-container formGroupName="resolutions"> |
120 | <div class="form-group" *ngFor="let resolution of resolutions"> | |
121 | <my-peertube-checkbox | |
122 | [inputName]="getResolutionKey(resolution.id)" [formControlName]="resolution.id" | |
123 | labelText="{{ resolution.label }}" | |
124 | > | |
125 | <ng-template *ngIf="resolution.description" ptTemplate="help"> | |
126 | <div [innerHTML]="resolution.description"></div> | |
127 | </ng-template> | |
128 | </my-peertube-checkbox> | |
129 | </div> | |
130 | ||
b788e691 | 131 | <span class="mb-2 muted" i18n> |
5f46d28c C |
132 | The original file resolution will be the default target if no option is selected. |
133 | </span> | |
134 | </ng-container> | |
135 | </div> | |
136 | </div> | |
137 | </div> | |
138 | ||
139 | </ng-container> | |
140 | </my-peertube-checkbox> | |
141 | </div> | |
142 | ||
70e33515 | 143 | <div class="form-group mt-4" [ngClass]="getTranscodingDisabledClass()"> |
5f46d28c | 144 | <label i18n for="transcodingThreads">Transcoding threads</label> |
4c8749cb | 145 | <span class="muted ms-1"> |
70e33515 C |
146 | <ng-container *ngIf="getTotalTranscodingThreads().atMost" i18n> |
147 | will claim at most {{ getTotalTranscodingThreads().value }} {{ getTotalTranscodingThreads().unit }} with live transcoding | |
148 | </ng-container> | |
149 | ||
150 | <ng-container *ngIf="!getTotalTranscodingThreads().atMost" i18n> | |
151 | will claim at least {{ getTotalTranscodingThreads().value }} {{ getTotalTranscodingThreads().unit }} with live transcoding | |
152 | </ng-container> | |
5f46d28c C |
153 | </span> |
154 | ||
155 | <my-select-custom-value | |
156 | id="transcodingThreads" | |
157 | [items]="transcodingThreadOptions" | |
158 | formControlName="threads" | |
159 | [clearable]="false" | |
160 | ></my-select-custom-value> | |
161 | ||
162 | <div *ngIf="formErrors.transcoding.threads" class="form-error">{{ formErrors.transcoding.threads }}</div> | |
163 | </div> | |
164 | ||
4c8749cb | 165 | <div class="form-group" [ngClass]="getTranscodingDisabledClass()"> |
5f46d28c | 166 | <label i18n for="transcodingConcurrency">Transcoding jobs concurrency</label> |
4c8749cb | 167 | <span class="muted ms-1" i18n>allows to transcode multiple files in parallel. ⚠️ Requires a PeerTube restart</span> |
5f46d28c C |
168 | |
169 | <div class="number-with-unit"> | |
170 | <input type="number" name="transcodingConcurrency" formControlName="concurrency" /> | |
171 | <span i18n>jobs in parallel</span> | |
172 | </div> | |
173 | ||
174 | <div *ngIf="formErrors.transcoding.concurrency" class="form-error">{{ formErrors.transcoding.concurrency }}</div> | |
175 | </div> | |
176 | ||
4c8749cb | 177 | <div class="form-group" [ngClass]="getTranscodingDisabledClass()"> |
5f46d28c | 178 | <label i18n for="transcodingProfile">Transcoding profile</label> |
4c8749cb | 179 | <span class="muted ms-1" i18n>new transcoding profiles can be added by PeerTube plugins</span> |
5f46d28c C |
180 | |
181 | <my-select-options | |
182 | id="transcodingProfile" | |
183 | formControlName="profile" | |
b06f1ead | 184 | [items]="transcodingProfiles" |
5f46d28c | 185 | [clearable]="false" |
70e33515 C |
186 | ></my-select-options> |
187 | ||
5f46d28c C |
188 | <div *ngIf="formErrors.transcoding.profile" class="form-error">{{ formErrors.transcoding.profile }}</div> |
189 | </div> | |
190 | ||
191 | </ng-container> | |
192 | ||
193 | </div> | |
194 | </div> | |
c729caf6 | 195 | |
4c8749cb C |
196 | <div class="row mt-2"> <!-- video studio grid --> |
197 | <div class="col-12 col-lg-4 col-xl-3"> | |
92e66e04 | 198 | <div i18n class="inner-form-title">VIDEO STUDIO</div> |
c729caf6 C |
199 | <div i18n class="inner-form-description"> |
200 | Allows your users to edit their video (cut, add intro/outro, add a watermark etc) | |
201 | </div> | |
202 | </div> | |
203 | ||
4c8749cb | 204 | <div class="col-12 col-lg-8 col-xl-9"> |
c729caf6 | 205 | |
92e66e04 | 206 | <ng-container formGroupName="videoStudio"> |
c729caf6 C |
207 | <div class="form-group" [ngClass]="getTranscodingDisabledClass()"> |
208 | <my-peertube-checkbox | |
92e66e04 C |
209 | inputName="videoStudioEnabled" formControlName="enabled" |
210 | i18n-labelText labelText="Enable video studio" | |
c729caf6 C |
211 | > |
212 | <ng-container ngProjectAs="description" *ngIf="!isTranscodingEnabled()"> | |
92e66e04 | 213 | <span i18n>⚠️ You need to enable transcoding first to enable video studio</span> |
c729caf6 C |
214 | </ng-container> |
215 | </my-peertube-checkbox> | |
216 | </div> | |
217 | </ng-container> | |
218 | </div> | |
219 | </div> | |
5f46d28c | 220 | </ng-container> |