MythTV master
mythtranscode_commandlineparser.cpp
Go to the documentation of this file.
1#include <QString>
2
4
6
10
12{
13 addHelp();
14 addVersion();
15 addJob();
18 addLogging();
19
20 add(QStringList{"-p", "--profile"}, "profile", "",
21 "Transcoding profile.", "")
22 ->SetGroup("Encoding");
23 add(QStringList{"--allkeys", "-k"}, "allkeys", false,
24 "Specifies the outputfile should be entirely keyframes.", "")
25 ->SetGroup("Encoding");
26 add("--passthrough", "passthru", false,
27 "Pass through raw, unprocessed audio.", "")
28 ->SetGroup("Encoding");
29 add(QStringList{"-ro", "--recorderOptions"}, "recopt",
30 "", "Comma separated list of recordingprofile overrides.", "")
31 ->SetGroup("Encoding");
32 add("--audiotrack", "audiotrack", 0, "Select specific audio track.", "")
33 ->SetGroup("Encoding");
34 add("--allaudiotracks", "allaudio", 0,
35 "Keep all audio tracks including those marked with 0 channels.", "")
36 ->SetGroup("Encoding");
37 add(QStringList{"-m", "--mpeg2"}, "mpeg2", false,
38 "Specifies that a lossless transcode should be used.", "")
39 ->SetGroup("Encoding");
40 add(QStringList{"-e", "--ostream"}, "ostream", "",
41 "Output stream type: ps, dvd, ts (Default: ps)", "")
42 ->SetGroup("Encoding");
43 add("--avf", "avf", false, "Generate libavformat output file.", "")
44 ->SetGroup("Encoding");
45
46 add(QStringList{"-f", "--fifodir"}, "fifodir", "",
47 "Directory in which to write fifos to.", "")
48 ->SetGroup("Frame Server");
49 add("--fifoinfo", "fifoinfo", false,
50 "Run in fifodir mode, but stop after displaying the "
51 "fifo data format.", "")
52 ->SetGroup("Frame Server");
53 add("--fifosync", "fifosync", false, "Enforce fifo sync.", "")
54 ->SetGroup("Frame Server");
55 add("--cleancut", "cleancut", false,
56 "Improve quality of cutting by performing it partially by dropping data. "
57 "Works only in fifodir mode.", "")
58 ->SetGroup("Frame Server")
59 ->SetRequires("fifodir");
60
61 add(QStringList{"-l", "--honorcutlist"}, "usecutlist",
62 "", "Specifies whether to use the cutlist. "
63 "(Takes an optional cutlist as argument when used with -i)",
64 "Specifies whether transcode should honor the cutlist and "
65 "remove the marked off commercials. Optionally takes a "
66 "a cutlist as an argument when used with --infile.")
67 ->SetGroup("Cutlist");
68 add("--inversecut", "inversecut", false,
69 "Inverses the cutlist, leaving only the marked off sections.", "")
70 ->SetGroup("Cutlist")
71 ->SetRequires("usecutlist");
72
73 add("--showprogress", "showprogress", false,
74 "Display status info in stdout", "")
75 ->SetGroup("Logging");
76
77 add(QStringList{"-i", "--infile"}, "inputfile", "",
78 "Input video for transcoding.", "");
79 add(QStringList{"-o", "--outfile"}, "outputfile", "",
80 "Optional output file for transcoding.", "");
81 add(QStringList{"-b", "--buildindex"}, "reindex", false,
82 "Build new keyframe index.", "");
83 add("--video", "video", false,
84 "Specifies video is not a recording.", "")
85 ->SetRequires("inputfile");
86 add("--queue", "queue", "",
87 "Add a new transcoding job of the specified recording and "
88 "profile to the jobqueue. Accepts an optional string to define "
89 "the hostname.", "");
90
91// add("--container", "container", "", "Output file container format", "")
92// ->SetChildOf("avf");
93// add("--acodec", "acodec", "", "Output file audio codec", "")
94// ->SetChildOf("avf");
95// add("--vcodec", "vcodec", "", "Output file video codec", "")
96// ->SetChildOf("avf");
97 add("--width", "width", 0, "Output Video Width", "")
98 ->SetChildOf("avf");
99 add("--height", "height", 0, "Output Video Height", "")
100 ->SetChildOf("avf");
101 add("--bitrate", "bitrate", 800, "Output Video Bitrate (Kbits)", "")
102 ->SetChildOf("avf");
103 add("--audiobitrate", "audiobitrate", 64, "Output Audio Bitrate (Kbits)", "")
104 ->SetChildOf("avf");
105 add(QStringList{"-d", "--delete"}, "delete", false,
106 "Delete original after successful transcoding", "")
107 ->SetGroup("Encoding");
108}
CommandLineArg * SetRequires(const QString &opt)
Set argument as requiring given option.
CommandLineArg * SetChildOf(const QString &opt)
Set argument as child of given parent.
CommandLineArg * SetGroup(const QString &group)
Parent class for defining application command line parsers.
void addVersion(void)
Canned argument definition for –version.
void addSettingsOverride(void)
Canned argument definition for –override-setting and –override-settings-file.
void addRecording(void)
Canned argument definition for –chanid and –starttime.
void addLogging(const QString &defaultVerbosity="general", LogLevel_t defaultLogLevel=LOG_INFO)
Canned argument definition for all logging options, including –verbose, –logpath, –quiet,...
CommandLineArg * add(const QString &arg, const QString &name, bool def, QString help, QString longhelp)
void addHelp(void)
Canned argument definition for –help.
void addJob(void)
Canned argument definition for –jobid.
static constexpr const char * MYTH_APPNAME_MYTHTRANSCODE
Definition: mythappname.h:12