1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
|
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="EncodingProfile.cs" company="HandBrake Project (http://handbrake.fr)">
// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
// </copyright>
// <summary>
// Defines the EncodingProfile type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.Interop.Model.Encoding
{
using System.Collections.Generic;
using HandBrake.Interop.Model;
/// <summary>
/// The encoding profile.
/// </summary>
public class EncodingProfile
{
/// <summary>
/// Initializes a new instance of the <see cref="EncodingProfile"/> class.
/// </summary>
public EncodingProfile()
{
this.Cropping = new Cropping();
}
#region Destination and Output Settings
/// <summary>
/// Gets or sets the container name.
/// </summary>
public string ContainerName { get; set; }
/// <summary>
/// Gets or sets the preferred extension.
/// </summary>
public OutputExtension PreferredExtension { get; set; }
/// <summary>
/// Gets or sets a value indicating whether include chapter markers.
/// </summary>
public bool IncludeChapterMarkers { get; set; }
/// <summary>
/// Gets or sets a value indicating whether large file.
/// </summary>
public bool LargeFile { get; set; }
/// <summary>
/// Gets or sets a value indicating whether optimize.
/// </summary>
public bool Optimize { get; set; }
/// <summary>
/// Gets or sets a value indicating whether i pod 5 g support.
/// </summary>
public bool IPod5GSupport { get; set; }
#endregion
#region Picture Settings
/// <summary>
/// Gets or sets the width.
/// </summary>
public int Width { get; set; }
/// <summary>
/// Gets or sets the height.
/// </summary>
public int Height { get; set; }
/// <summary>
/// Gets or sets the max width.
/// </summary>
public int MaxWidth { get; set; }
/// <summary>
/// Gets or sets the max height.
/// </summary>
public int MaxHeight { get; set; }
/// <summary>
/// Gets or sets the scale method.
/// </summary>
public ScaleMethod ScaleMethod { get; set; }
/// <summary>
/// Gets or sets the cropping type.
/// </summary>
public CroppingType CroppingType { get; set; }
/// <summary>
/// Gets or sets the cropping.
/// </summary>
public Cropping Cropping { get; set; }
/// <summary>
/// Gets or sets the anamorphic.
/// </summary>
public Anamorphic Anamorphic { get; set; }
/// <summary>
/// Gets or sets a value indicating whether use display width.
/// </summary>
public bool UseDisplayWidth { get; set; }
/// <summary>
/// Gets or sets the display width.
/// </summary>
public int DisplayWidth { get; set; }
/// <summary>
/// Gets or sets a value indicating whether keep display aspect.
/// </summary>
public bool KeepDisplayAspect { get; set; }
/// <summary>
/// Gets or sets the pixel aspect x.
/// </summary>
public int PixelAspectX { get; set; }
/// <summary>
/// Gets or sets the pixel aspect y.
/// </summary>
public int PixelAspectY { get; set; }
/// <summary>
/// Gets or sets the modulus.
/// </summary>
public int Modulus { get; set; }
#endregion
#region Filters
/// <summary>
/// Gets or sets the deinterlace.
/// </summary>
public Deinterlace Deinterlace { get; set; }
/// <summary>
/// Gets or sets the custom deinterlace.
/// </summary>
public string CustomDeinterlace { get; set; }
/// <summary>
/// Gets or sets the decomb.
/// </summary>
public Decomb Decomb { get; set; }
/// <summary>
/// Gets or sets the custom decomb.
/// </summary>
public string CustomDecomb { get; set; }
/// <summary>
/// Gets or sets the detelecine.
/// </summary>
public Detelecine Detelecine { get; set; }
/// <summary>
/// Gets or sets the custom detelecine.
/// </summary>
public string CustomDetelecine { get; set; }
/// <summary>
/// Gets or sets the denoise.
/// </summary>
public Denoise Denoise { get; set; }
/// <summary>
/// Gets or sets the custom denoise.
/// </summary>
public string CustomDenoise { get; set; }
/// <summary>
/// Gets or sets the deblock.
/// </summary>
public int Deblock { get; set; }
/// <summary>
/// Gets or sets a value indicating whether grayscale.
/// </summary>
public bool Grayscale { get; set; }
#endregion
#region Video
/// <summary>
/// Gets or sets the video encoder.
/// </summary>
public string VideoEncoder { get; set; }
/// <summary>
/// Gets or sets the x 264 options.
/// </summary>
public string X264Options { get; set; }
/// <summary>
/// Gets or sets the x 264 profile.
/// </summary>
public string X264Profile { get; set; }
/// <summary>
/// Gets or sets the x 264 preset.
/// </summary>
public string X264Preset { get; set; }
/// <summary>
/// Gets or sets the x 264 tunes.
/// </summary>
public List<string> X264Tunes { get; set; }
/// <summary>
/// Gets or sets the x 265 profile.
/// </summary>
public string X265Profile { get; set; }
/// <summary>
/// Gets or sets the x 265 preset.
/// </summary>
public string X265Preset { get; set; }
/// <summary>
/// Gets or sets the x 265 tunes.
/// </summary>
public List<string> X265Tunes { get; set; }
/// <summary>
/// Gets or sets the x 265 level.
/// </summary>
public List<string> X265Level { get; set; }
/// <summary>
/// Gets or sets the qsv preset.
/// </summary>
public string QsvPreset { get; set; }
/// <summary>
/// Gets or sets a value indicating whether qsv decode.
/// </summary>
public bool QsvDecode { get; set; }
/// <summary>
/// Gets or sets the h 264 level.
/// </summary>
public string H264Level { get; set; }
/// <summary>
/// Gets or sets the video encode rate type.
/// </summary>
public VideoEncodeRateType VideoEncodeRateType { get; set; }
/// <summary>
/// Gets or sets the quality.
/// </summary>
public double Quality { get; set; }
/// <summary>
/// Gets or sets the target size.
/// </summary>
public int TargetSize { get; set; }
/// <summary>
/// Gets or sets the video bitrate.
/// </summary>
public int VideoBitrate { get; set; }
/// <summary>
/// Gets or sets a value indicating whether two pass.
/// </summary>
public bool TwoPass { get; set; }
/// <summary>
/// Gets or sets a value indicating whether turbo first pass.
/// </summary>
public bool TurboFirstPass { get; set; }
/// <summary>
/// Gets or sets the framerate.
/// </summary>
public double Framerate { get; set; }
/// <summary>
/// Gets or sets a value indicating whether constant framerate.
/// </summary>
public bool ConstantFramerate { get; set; }
#endregion
#region Audio
/// <summary>
/// Gets or sets the audio encodings.
/// </summary>
public List<AudioEncoding> AudioEncodings { get; set; }
/// <summary>
/// Gets or sets the audio encoder fallback.
/// </summary>
public string AudioEncoderFallback { get; set; }
#endregion
/// <summary>
/// The clone.
/// </summary>
/// <returns>
/// The <see cref="EncodingProfile"/>.
/// </returns>
public EncodingProfile Clone()
{
var profile = new EncodingProfile
{
ContainerName = this.ContainerName,
PreferredExtension = this.PreferredExtension,
IncludeChapterMarkers = this.IncludeChapterMarkers,
LargeFile = this.LargeFile,
Optimize = this.Optimize,
IPod5GSupport = this.IPod5GSupport,
Width = this.Width,
Height = this.Height,
MaxWidth = this.MaxWidth,
MaxHeight = this.MaxHeight,
ScaleMethod = this.ScaleMethod,
CroppingType = this.CroppingType,
Cropping = this.Cropping.Clone(),
Anamorphic = this.Anamorphic,
UseDisplayWidth = this.UseDisplayWidth,
DisplayWidth = this.DisplayWidth,
KeepDisplayAspect = this.KeepDisplayAspect,
PixelAspectX = this.PixelAspectX,
PixelAspectY = this.PixelAspectY,
Modulus = this.Modulus,
Deinterlace = this.Deinterlace,
CustomDeinterlace = this.CustomDeinterlace,
Decomb = this.Decomb,
CustomDecomb = this.CustomDecomb,
Detelecine = this.Detelecine,
CustomDetelecine = this.CustomDetelecine,
Denoise = this.Denoise,
CustomDenoise = this.CustomDenoise,
Deblock = this.Deblock,
Grayscale = this.Grayscale,
VideoEncoder = this.VideoEncoder,
X264Options = this.X264Options,
X264Profile = this.X264Profile,
X264Preset = this.X264Preset,
X264Tunes = this.X264Tunes,
QsvPreset = this.QsvPreset,
QsvDecode = this.QsvDecode,
H264Level = this.H264Level,
VideoEncodeRateType = this.VideoEncodeRateType,
Quality = this.Quality,
TargetSize = this.TargetSize,
VideoBitrate = this.VideoBitrate,
TwoPass = this.TwoPass,
TurboFirstPass = this.TurboFirstPass,
Framerate = this.Framerate,
ConstantFramerate = this.ConstantFramerate,
AudioEncodings = new List<AudioEncoding>(this.AudioEncodings),
AudioEncoderFallback = this.AudioEncoderFallback
};
return profile;
}
}
}
|