-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOptions.cs
40 lines (28 loc) · 1.59 KB
/
Options.cs
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
namespace FFMP;
using CommandLine;
public class Options
{
[Option('t', "threads", Default = 2, HelpText = "Number of threads to use. Default is 2.")]
public int ThreadCount { get; set; }
[Option("codec", HelpText = "Codec to use for video processing, e.g., 'libx265'.")]
public string Codec { get; set; } = string.Empty;
[Option("preset", HelpText = "Preset to use for FFmpeg encoding, e.g., 'fast'.")]
public string Preset { get; set; } = string.Empty;
[Option('d', "directory", HelpText = "Directory containing files to process.")]
public string? InputDirectory { get; set; }
[Option('f', "file", HelpText = "Path to a file containing a list of input files.")]
public string? InputFile { get; set; }
[Option("overwrite", Default = false, HelpText = "Overwrite files if they already exist.")]
public bool Overwrite { get; set; }
[Option("verbose", Default = false, HelpText = "Enable verbose logging.")]
public bool Verbose { get; set; }
[Option("delete", Default = false, HelpText = "Delete the source file after processing.")]
public bool DeleteSource { get; set; }
[Option("output-pattern",
HelpText = "Pattern for output file paths. Use {{name}}, {{ext}}, and {{dir}} placeholders.")]
public string OutputPattern { get; set; } = string.Empty;
[Option("convert", Default = false, HelpText = "Enable conversion mode.")]
public bool Convert { get; set; }
[Value(0, HelpText = "Arguments to pass directly to FFmpeg after '--'.")]
public IEnumerable<string> FFmpegArguments { get; set; } = Enumerable.Empty<string>();
}