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 add("--hls", "hls", false, "Generate HTTP Live Stream output.", "")
46 ->SetGroup("Encoding");
47
48 add(QStringList{"-f", "--fifodir"}, "fifodir", "",
49 "Directory in which to write fifos to.", "")
50 ->SetGroup("Frame Server");
51 add("--fifoinfo", "fifoinfo", false,
52 "Run in fifodir mode, but stop after displaying the "
53 "fifo data format.", "")
54 ->SetGroup("Frame Server");
55 add("--fifosync", "fifosync", false, "Enforce fifo sync.", "")
56 ->SetGroup("Frame Server");
57 add("--cleancut", "cleancut", false,
58 "Improve quality of cutting by performing it partially by dropping data. "
59 "Works only in fifodir mode.", "")
60 ->SetGroup("Frame Server")
61 ->SetRequires("fifodir");
62
63 add(QStringList{"-l", "--honorcutlist"}, "usecutlist",
64 "", "Specifies whether to use the cutlist. "
65 "(Takes an optional cutlist as argument when used with -i)",
66 "Specifies whether transcode should honor the cutlist and "
67 "remove the marked off commercials. Optionally takes a "
68 "a cutlist as an argument when used with --infile.")
69 ->SetGroup("Cutlist");
70 add("--inversecut", "inversecut", false,
71 "Inverses the cutlist, leaving only the marked off sections.", "")
72 ->SetGroup("Cutlist")
73 ->SetRequires("usecutlist");
74
75 add("--showprogress", "showprogress", false,
76 "Display status info in stdout", "")
77 ->SetGroup("Logging");
78
79 add(QStringList{"-i", "--infile"}, "inputfile", "",
80 "Input video for transcoding.", "");
81 add(QStringList{"-o", "--outfile"}, "outputfile", "",
82 "Optional output file for transcoding.", "");
83 add(QStringList{"-b", "--buildindex"}, "reindex", false,
84 "Build new keyframe index.", "");
85 add("--video", "video", false,
86 "Specifies video is not a recording.", "")
87 ->SetRequires("inputfile");
88 add("--queue", "queue", "",
89 "Add a new transcoding job of the specified recording and "
90 "profile to the jobqueue. Accepts an optional string to define "
91 "the hostname.", "");
92
93// add("--container", "container", "", "Output file container format", "")
94// ->SetChildOf("avf");
95// add("--acodec", "acodec", "", "Output file audio codec", "")
96// ->SetChildOf("avf");
97// add("--vcodec", "vcodec", "", "Output file video codec", "")
98// ->SetChildOf("avf");
99 add("--width", "width", 0, "Output Video Width", "")
100 ->SetChildOf("avf")
101 ->SetChildOf("hls");
102 add("--height", "height", 0, "Output Video Height", "")
103 ->SetChildOf("avf")
104 ->SetChildOf("hls");
105 add("--bitrate", "bitrate", 800, "Output Video Bitrate (Kbits)", "")
106 ->SetChildOf("avf")
107 ->SetChildOf("hls");
108 add("--audiobitrate", "audiobitrate", 64, "Output Audio Bitrate (Kbits)", "")
109 ->SetChildOf("avf")
110 ->SetChildOf("hls");
111 add("--maxsegments", "maxsegments", 0, "Max HTTP Live Stream segments", "")
112 ->SetChildOf("hls");
113 add("--noaudioonly", "noaudioonly", 0, "Disable Audio-Only HLS Stream", "")
114 ->SetChildOf("hls");
115 add("--hlsstreamid", "hlsstreamid", -1, "Stream ID to process", "")
116 ->SetChildOf("hls");
117 add(QStringList{"-d", "--delete"}, "delete", false,
118 "Delete original after successful transcoding", "")
119 ->SetGroup("Encoding");
120}
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