00001
00002 using namespace std;
00003
00004 #include <QString>
00005
00006 #include "mythcorecontext.h"
00007 #include "commandlineparser.h"
00008
00009 MythTranscodeCommandLineParser::MythTranscodeCommandLineParser() :
00010 MythCommandLineParser(MYTH_APPNAME_MYTHTRANSCODE)
00011 { LoadArguments(); }
00012
00013 void MythTranscodeCommandLineParser::LoadArguments(void)
00014 {
00015 addHelp();
00016 addVersion();
00017 addJob();
00018 addRecording();
00019 addSettingsOverride();
00020 addLogging();
00021
00022 add(QStringList( QStringList() << "-p" << "--profile" ), "profile", "",
00023 "Transcoding profile.", "")
00024 ->SetGroup("Encoding");
00025 add(QStringList( QStringList() << "--allkeys" << "-k" ), "allkeys", false,
00026 "Specifies the outputfile should be entirely keyframes.", "")
00027 ->SetGroup("Encoding");
00028 add("--passthrough", "passthru", false,
00029 "Pass through raw, unprocessed audio.", "")
00030 ->SetGroup("Encoding");
00031 add(QStringList( QStringList() << "-ro" << "--recorderOptions" ), "recopt",
00032 "", "Comma separated list of recordingprofile overrides.", "")
00033 ->SetGroup("Encoding");
00034 add("--audiotrack", "audiotrack", 0, "Select specific audio track.", "")
00035 ->SetGroup("Encoding");
00036 add(QStringList( QStringList() << "-m" << "--mpeg2" ), "mpeg2", false,
00037 "Specifies that a lossless transcode should be used.", "")
00038 ->SetGroup("Encoding");
00039 add(QStringList( QStringList() << "-e" << "--ostream" ), "ostream", "",
00040 "Output stream type: dvd, ts", "")
00041 ->SetGroup("Encoding");
00042
00043
00044 add("--hls", "hls", false, "Generate HTTP Live Stream output.", "")
00045 ->SetGroup("Encoding");
00046
00047 add(QStringList( QStringList() << "-f" << "--fifodir" ), "fifodir", "",
00048 "Directory in which to write fifos to.", "")
00049 ->SetGroup("Frame Server");
00050 add("--fifoinfo", "fifoinfo", false,
00051 "Run in fifodir mode, but stop after displaying the "
00052 "fifo data format.", "")
00053 ->SetGroup("Frame Server");
00054 add("--fifosync", "fifosync", false, "Enforce fifo sync.", "")
00055 ->SetGroup("Frame Server");
00056 add("--cleancut", "cleancut", false,
00057 "Improve quality of cutting by performing it partially by dropping data. "
00058 "Works only in fifodir mode.", "")
00059 ->SetGroup("Frame Server")
00060 ->SetRequires("fifodir");
00061
00062 add(QStringList( QStringList() << "-l" << "--honorcutlist" ), "usecutlist",
00063 "", "Specifies whether to use the cutlist.",
00064 "Specifies whether transcode should honor the cutlist and "
00065 "remove the marked off commercials. Optionally takes a "
00066 "a cutlist as an argument when used with --infile.")
00067 ->SetGroup("Cutlist");
00068 add("--inversecut", "inversecut", false,
00069 "Inverses the cutlist, leaving only the marked off sections.", "")
00070 ->SetGroup("Cutlist")
00071 ->SetRequires("usecutlist");
00072
00073 add("--showprogress", "showprogress", false,
00074 "Display status info in stdout", "")
00075 ->SetGroup("Logging");
00076
00077 add(QStringList( QStringList() << "-i" << "--infile" ), "inputfile", "",
00078 "Input video for transcoding.", "");
00079 add(QStringList( QStringList() << "-o" << "--outfile" ), "outputfile", "",
00080 "Optional output file for transcoding.", "");
00081 add(QStringList( QStringList() << "-b" << "--buildindex" ), "reindex", false,
00082 "Build new keyframe index.", "");
00083 add("--video", "video", false,
00084 "Specifies video is not a recording.", "")
00085 ->SetRequires("inputfile");
00086 add("--queue", "queue", "",
00087 "Add a new transcoding job of the specified recording and "
00088 "profile to the jobqueue. Accepts an optional string to define "
00089 "the hostname.", "");
00090
00091
00092
00093
00094
00095
00096
00097 add("--width", "width", 0, "Output Video Width", "")
00098
00099 ->SetChildOf("hls");
00100 add("--height", "height", 0, "Output Video Height", "")
00101
00102 ->SetChildOf("hls");
00103 add("--bitrate", "bitrate", 800, "Output Video Bitrate (Kbits)", "")
00104
00105 ->SetChildOf("hls");
00106 add("--audiobitrate", "audiobitrate", 64, "Output Audio Bitrate (Kbits)", "")
00107
00108 ->SetChildOf("hls");
00109 add("--maxsegments", "maxsegments", 0, "Max HTTP Live Stream segments", "")
00110 ->SetChildOf("hls");
00111 add("--noaudioonly", "noaudioonly", 0, "Disable Audio-Only HLS Stream", "")
00112 ->SetChildOf("hls");
00113 add("--hlsstreamid", "hlsstreamid", -1, "Stream ID to process", "")
00114 ->SetChildOf("hls");
00115 }
00116