-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOptions.cs
More file actions
79 lines (56 loc) · 4.46 KB
/
Options.cs
File metadata and controls
79 lines (56 loc) · 4.46 KB
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
using CommandLine;
namespace BlinkClipsMerger
{
/// <summary>
/// The parsed options from command line arguments.
/// </summary>
internal class Options
{
[Option('q', "quite", HelpText = "Hide unnecessary messages to console.")]
public bool Quiet { get; set; }
[Option('y', "overwrite", HelpText = "Overwrite existing output files.")]
public bool Overwrite { get; set; }
[Option('g', "group-by-month", HelpText = "Merge clips based on the captured month instead of date.")]
public bool GroupByMonth { get; set; }
[Option('m', "ffmpeg", HelpText = "Specify the path to \"ffmpeg\" executable if FFmpeg is not configurated in system PATH variable.")]
public string FFMpegExecutablePath { get; set; }
[Option('p', "ffprobe", HelpText = "Specify the path to \"ffprobe\" executable if FFmpeg is not configurated in system PATH variable.")]
public string FFProbeExecutablePath { get; set; }
[Option('t', "filename-template", HelpText = "The template string for generating output file name. Default value is \"{0}_{1:yyyy-MM-dd}.mp4\" where {0} is the camera name and {1} is the capture time (standard .NET date/time format can be applied). If -g option is used without -t, the default template \"{0}_{1:yyyy-MM}.mp4\" will be used.")]
public string FileNameTemplate { get; set; }
[Option('d', "title-duration", Default = 2, HelpText = "The duration (in seconds) of title image.")]
public int TitleDuration { get; set; }
[Option('r', "video-frame-rate", Default = double.NaN, HelpText = "Override the output video frame rate. It will increase the overall processing time significantly.")]
public double VideoFrameRate { get; set; }
[Option('c', "video-codec", HelpText = "Override the output video codec. It will increase the overall processing time significantly.")]
public string VideoCodec { get; set; }
[Option('s', "video-codec-preset", HelpText = "The video codec preset to be used for output files, such as \"fast\" / \"faster\" / \"ultrafast\". It will affect the output quality but not all video codec supported.")]
public string VideoCodecPreset { get; set; }
[Option('i', "ignore-duration", Default = 1, HelpText = "Ignore clips that having duration (in seconds) lesser than specified value. It should help to skip corrupted clips.")]
public int IgnoreDuration { get; set; }
[Option('f', "camera-filter", HelpText = "The camera name regex filter. Such as -f \"^Gar\" will match Garden and Garage clips.")]
public string CameraFilter { get; set; }
[Option("start-date", HelpText = "Filter out the clips captured before this start date. The date should be in yyyy-MM-dd format.")]
public string StartDate { get; set; }
[Option("end-date", HelpText = "Filter out the clips captured after this end date. The date should be in yyyy-MM-dd format.")]
public string EndDate { get; set; }
[Option("thread-culture", HelpText = "The custom thread culture to be used for date/time formatting. Such as zh-TW for Taiwan.")]
public string ThreadCulture { get; set; }
[Option("font-family", Default = "sans-serif", HelpText = "The font family used in titles.")]
public string FontFamily { get; set; }
[Option("font-size", Default = 144, HelpText = "The font size of titles.")]
public float FontSize { get; set; }
[Option("date-format", Default = "yyyy-MM-dd", HelpText = "The date format of title that using standard .NET date/time formatting string.")]
public string DateFormat { get; set; }
[Option("time-format", Default = "HH:mm:ss", HelpText = "The time format of title that using standard .NET date/time formatting string.")]
public string TimeFormat { get; set; }
[Option("title-foreground", Default = "#ffffff", HelpText = "Foreground color of title.")]
public string TitleForeground { get; set; }
[Option("title-background", Default = "#000000", HelpText = "Background color of title.")]
public string TitleBackground { get; set; }
[Value(0, Required = true, MetaName = "<input directory>", HelpText = "Path to the Blink clips source directory")]
public string InputDirectory { get; set; }
[Value(1, Required = true, MetaName = "<output directory>", HelpText = "Path to the video output directory")]
public string OutputDirectory { get; set; }
}
}