1 <ng-container [formGroup]=
"form">
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">
7 <div class=
"callout callout-orange">
9 Estimating a server's capacity to transcode and stream videos isn't easy and we can't tune PeerTube automatically.
13 However, you may want to read
<a class=
"link-orange" target=
"_blank" rel=
"noopener noreferrer" href=
"https://docs.joinpeertube.org/admin-configuration?id=transcoding">our guidelines
</a> before tweaking the following values.
19 <div class=
"row mt-4"> <!-- transcoding grid -->
20 <div class=
"col-12 col-lg-4 col-xl-3">
21 <div i18n
class=
"inner-form-title">TRANSCODING
</div>
22 <div i18n
class=
"inner-form-description">
23 Process uploaded videos so that they are in a streamable form that any device can play. Though costly in
24 resources, this is a critical part of PeerTube, so tread carefully.
28 <div class=
"col-12 col-lg-8 col-xl-9">
30 <ng-container formGroupName=
"transcoding">
32 <div class=
"col-12 col-xl-11">
33 <my-peertube-checkbox inputName=
"transcodingEnabled" formControlName=
"enabled" [recommended]=
"true">
34 <ng-template ptTemplate=
"label">
35 <ng-container i18n
>Transcoding enabled
</ng-container>
38 <ng-container ngProjectAs=
"extra">
40 <div class=
"callout callout-light pt-2 pb-0">
41 <label i18n
>Input formats
</label>
43 <div class=
"form-group" [ngClass]=
"getTranscodingDisabledClass()">
45 inputName=
"transcodingAllowAdditionalExtensions" formControlName=
"allowAdditionalExtensions"
46 i18n-labelText
labelText=
"Allow additional extensions"
48 <ng-container ngProjectAs=
"description">
49 <span i18n
>Allows users to upload videos with additional extensions than .mp4, .ogv and .webm (for example: .avi, .mov, .mkv etc).
</span>
51 </my-peertube-checkbox>
54 <div class=
"form-group" [ngClass]=
"getTranscodingDisabledClass()">
56 inputName=
"transcodingAllowAudioFiles" formControlName=
"allowAudioFiles"
57 i18n-labelText
labelText=
"Allow audio files upload"
59 <ng-container ngProjectAs=
"description">
60 <div i18n
>Allows users to upload .mp3, .ogg, .wma, .flac, .aac, or .ac3 audio files.
</div>
61 <div i18n
>The file will be merged in a still image video with the preview file on upload.
</div>
63 </my-peertube-checkbox>
67 <div class=
"callout callout-light pt-2 mt-2 pb-0">
68 <label i18n
>Output formats
</label>
70 <ng-container formGroupName=
"webtorrent">
71 <div class=
"form-group" [ngClass]=
"getTranscodingDisabledClass()">
73 inputName=
"transcodingWebTorrentEnabled" formControlName=
"enabled"
74 i18n-labelText
labelText=
"WebTorrent enabled"
76 <ng-template ptTemplate=
"help">
78 <p i18n
>If you also enabled HLS support, it will multiply videos storage by
2</p>
81 </my-peertube-checkbox>
85 <ng-container formGroupName=
"hls">
86 <div class=
"form-group" [ngClass]=
"getTranscodingDisabledClass()">
88 inputName=
"transcodingHlsEnabled" formControlName=
"enabled"
89 i18n-labelText
labelText=
"HLS with P2P support enabled"
92 <ng-template ptTemplate=
"help">
94 <strong>Requires ffmpeg
>=
4.1</strong>
96 <p>Generate HLS playlists and fragmented MP4 files resulting in a better playback than with plain WebTorrent:
</p>
98 <li>Resolution change is smoother
</li>
99 <li>Faster playback especially with long videos
</li>
100 <li>More stable playback (less bugs/infinite loading)
</li>
103 <p>If you also enabled WebTorrent support, it will multiply videos storage by
2</p>
106 </my-peertube-checkbox>
110 <div class=
"form-group" [ngClass]=
"getTranscodingDisabledClass()">
111 <label i18n
>Resolutions to generate per enabled format
</label>
113 <div class=
"ms-2 d-flex flex-column">
114 <my-peertube-checkbox
115 inputName=
"transcodingAlwaysTranscodeOriginalResolution" formControlName=
"alwaysTranscodeOriginalResolution"
116 i18n-labelText
labelText=
"Always transcode original resolution"
118 </my-peertube-checkbox>
120 <span class=
"mt-3 mb-2 small muted" i18n
>
121 The original file resolution will be the default target if no option is selected.
124 <ng-container formGroupName=
"resolutions">
125 <div class=
"form-group" *
ngFor=
"let resolution of resolutions">
126 <my-peertube-checkbox
127 [inputName]=
"getResolutionKey(resolution.id)" [formControlName]=
"resolution.id"
128 labelText=
"{{ resolution.label }}"
130 <ng-template *
ngIf=
"resolution.description" ptTemplate=
"help">
131 <div [innerHTML]=
"resolution.description"></div>
133 </my-peertube-checkbox>
141 </my-peertube-checkbox>
144 <div class=
"form-group mt-4" [ngClass]=
"getTranscodingDisabledClass()">
145 <label i18n
for=
"transcodingThreads">Transcoding threads
</label>
147 <span class=
"small muted ms-1">
148 <ng-container *
ngIf=
"getTotalTranscodingThreads().atMost" i18n
>
149 will claim at most {{ getTotalTranscodingThreads().value }} {{ getTotalTranscodingThreads().unit }} with live transcoding
152 <ng-container *
ngIf=
"!getTotalTranscodingThreads().atMost" i18n
>
153 will claim at least {{ getTotalTranscodingThreads().value }} {{ getTotalTranscodingThreads().unit }} with live transcoding
157 <my-select-custom-value
158 id=
"transcodingThreads"
159 [items]=
"transcodingThreadOptions"
160 formControlName=
"threads"
162 ></my-select-custom-value>
164 <div *
ngIf=
"formErrors.transcoding.threads" class=
"form-error">{{ formErrors.transcoding.threads }}
</div>
167 <div class=
"form-group" [ngClass]=
"getTranscodingDisabledClass()">
168 <label i18n
for=
"transcodingConcurrency">Transcoding jobs concurrency
</label>
169 <span class=
"small muted ms-1" i18n
>allows to transcode multiple files in parallel. ⚠️ Requires a PeerTube restart
</span>
171 <div class=
"number-with-unit">
172 <input type=
"number" name=
"transcodingConcurrency" formControlName=
"concurrency" />
173 <span i18n
>jobs in parallel
</span>
176 <div *
ngIf=
"formErrors.transcoding.concurrency" class=
"form-error">{{ formErrors.transcoding.concurrency }}
</div>
179 <div class=
"form-group" [ngClass]=
"getTranscodingDisabledClass()">
180 <label i18n
for=
"transcodingProfile">Transcoding profile
</label>
181 <span class=
"small muted ms-1" i18n
>new transcoding profiles can be added by PeerTube plugins
</span>
184 id=
"transcodingProfile"
185 formControlName=
"profile"
186 [items]=
"transcodingProfiles"
188 ></my-select-options>
190 <div *
ngIf=
"formErrors.transcoding.profile" class=
"form-error">{{ formErrors.transcoding.profile }}
</div>
198 <div class=
"row mt-2"> <!-- video studio grid -->
199 <div class=
"col-12 col-lg-4 col-xl-3">
200 <div i18n
class=
"inner-form-title">VIDEO STUDIO
</div>
201 <div i18n
class=
"inner-form-description">
202 Allows your users to edit their video (cut, add intro/outro, add a watermark etc)
206 <div class=
"col-12 col-lg-8 col-xl-9">
208 <ng-container formGroupName=
"videoStudio">
209 <div class=
"form-group" [ngClass]=
"getTranscodingDisabledClass()">
210 <my-peertube-checkbox
211 inputName=
"videoStudioEnabled" formControlName=
"enabled"
212 i18n-labelText
labelText=
"Enable video studio"
214 <ng-container ngProjectAs=
"description" *
ngIf=
"!isTranscodingEnabled()">
215 <span i18n
>⚠️ You need to enable transcoding first to enable video studio
</span>
217 </my-peertube-checkbox>