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 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220
|
/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license that can
* be found in the License.html file in the root of the source tree.
*/
//---------------------------------------------------------------------------
#ifdef __BORLANDC__
#pragma hdrstop
#endif
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#include "Common/Core.h"
#include "Help.h"
#include "Config.h"
//---------------------------------------------------------------------------
//***************************************************************************
//
//***************************************************************************
//---------------------------------------------------------------------------
String Program_Name = __T("MediaInfo");
void Set_Program_Name(const String &Name)
{
Program_Name = Name;
#if defined(_MSC_VER)
Program_Name = Program_Name.substr(Program_Name.rfind('\\')+1);
Program_Name = Program_Name.substr(0, Program_Name.find('.'));
#else
Program_Name = Program_Name.substr(Program_Name.rfind('/')+1);
#endif
}
//---------------------------------------------------------------------------
int Help()
{
STRINGOUT(String(__T("Usage: \" [-Options...] FileName1 [Filename2...]\"")).insert(8, Program_Name));
TEXTOUT("");
TEXTOUT("Options:");
TEXTOUT("--Help, -h");
TEXTOUT(" Display this help and exit");
TEXTOUT("--Help-Output");
TEXTOUT(" Display help for Output= option");
TEXTOUT("--Help-AnOption");
TEXTOUT(" Display help for \"AnOption\"");
TEXTOUT("--Version");
TEXTOUT(" Display MediaInfo version and exit");
TEXTOUT("");
TEXTOUT("--Full, -f");
TEXTOUT(" Full information Display (all internal tags)");
TEXTOUT("--Output=HTML");
TEXTOUT(" Full information Display with HTML tags");
TEXTOUT("--Output=XML");
TEXTOUT(" Full information Display with XML tags");
TEXTOUT("--Output=OLDXML");
TEXTOUT(" Full information Display with XML tags using the older");
TEXTOUT(" MediaInfo schema");
TEXTOUT("--Output=JSON");
TEXTOUT(" Full information Display with JSON");
TEXTOUT("--Output=CSV");
TEXTOUT(" Full information Display with CSV");
TEXTOUT("--Output=EBUCore");
TEXTOUT(" Full information Display with EBUCore compliant XML tags");
TEXTOUT("--Output=EBUCore_JSON");
TEXTOUT(" Full information Display with EBUCore 1.8 compliant JSON");
TEXTOUT("--Output=PBCore");
TEXTOUT(" Full information Display with PBCore compliant XML tags");
TEXTOUT("--Output=PBCore2");
TEXTOUT(" Full information Display with PBCore 2.0 compliant XML tags");
TEXTOUT("--Output=Graph_Svg");
TEXTOUT(" Graph Display with SVG");
TEXTOUT("--Output=Graph_Dot");
TEXTOUT(" Graph Display with Graphviz DOT");
TEXTOUT("--Info_OutputFormats");
TEXTOUT(" Display list of more --Output= parameters");
TEXTOUT("--AcquisitionDataOutputMode=segmentParameter");
TEXTOUT(" Display Acquisition Data by segment then parameter (EBUCore");
TEXTOUT(" and NISO Z39.87 outputs)");
TEXTOUT("--AcquisitionDataOutputMode=parameterSegment");
TEXTOUT(" Display Acquisition Data by parameter then segment (EBUCore");
TEXTOUT(" and NISO Z39.87 outputs)");
TEXTOUT("--ExternalMetadata=...");
TEXTOUT(" Add external metadata to the output (EBUCore output)");
TEXTOUT("--ExternalMetadataConfig=...");
TEXTOUT(" Output template for external metadata (EBUCore output)");
TEXTOUT("--Info-Parameters");
TEXTOUT(" Display list of Inform= parameters");
TEXTOUT("");
TEXTOUT("--Language=raw");
TEXTOUT(" Display non-translated unique identifiers (internal text)");
TEXTOUT("--LegacyStreamDisplay=1");
TEXTOUT(" Display backward compatibility information for HD/HE audio and 3D/HDR video streams");
TEXTOUT("--Cover_Data=base64");
TEXTOUT(" Include cover images as base64 in HTML, XML and JSON output");
TEXTOUT("--Trace_Level=1, --Details=1");
TEXTOUT(" Output MediaTrace (https://mediaarea.net/MediaTrace).");
TEXTOUT(" Can be used with --Output=XML to output in MediaTrace XML.");
TEXTOUT("--ParseSpeed=...");
TEXTOUT(" Control the balance between parsing speed and the amount of information extracted.");
TEXTOUT(" Value ranges from 0 to 1 where 1 is full parsing and the slowest.");
TEXTOUT(" The default is 0.5.");
TEXTOUT("--inform_version=1");
TEXTOUT(" Add MediaInfoLib version to the text output");
TEXTOUT("--inform_timestamp=1");
TEXTOUT(" Add report creation timestamp to the text output");
TEXTOUT("--File_TestContinuousFileNames=0");
TEXTOUT(" Disable image sequence detection");
TEXTOUT("--File_Duplicate=...");
TEXTOUT(" Duplicate streams from a stream having multiple substreams (MPEG-TS only).");
TEXTOUT(" See https://mediaarea.net/en/MediaInfo/Support/SDK/Duplicate for how to use.");
TEXTOUT(" Example: --File_Duplicate=\"file://output_file.ts;program_number=1\" --File_IsSeekable=0");
TEXTOUT("--Enable_FFmpeg=1");
TEXTOUT(" Enable FFmpeg plugin");
TEXTOUT("--LogFile=...");
TEXTOUT(" Save the output in the specified file");
TEXTOUT("--BOM");
TEXTOUT(" Byte order mark for UTF-8 output");
TEXTOUT("");
TEXTOUT("--Ssl_CertificateFileName=...");
TEXTOUT(" File name of the SSL certificate.");
TEXTOUT(" The default format is \"PEM\" and can be changed");
TEXTOUT(" with --Ssl_CertificateFormat.");
TEXTOUT("--Ssl_CertificateFormat=...");
TEXTOUT(" File format of the SSL certificate.");
TEXTOUT(" Supported formats are \"PEM\" and \"DER\"");
TEXTOUT("--Ssl_PrivateKeyFileName=...");
TEXTOUT(" File name of the SSL private key.");
TEXTOUT(" The default format is \"PEM\" and can be changed");
TEXTOUT(" with --Ssl_PrivateKeyFormat.");
TEXTOUT(" Note: private key with a password is not supported.");
TEXTOUT("--Ssl_PrivateKeyFormat=...");
TEXTOUT(" File format of the SSL private key.");
TEXTOUT(" Supported formats are \"PEM\" and \"DER\"");
TEXTOUT("--Ssl_CertificateAuthorityFileName=...");
TEXTOUT(" File name of the SSL certificate authorities");
TEXTOUT(" to verify the peer with.");
TEXTOUT("--Ssl_CertificateAuthorityPath=...");
TEXTOUT(" Path of the SSL certificate authorities");
TEXTOUT(" to verify the peer with.");
TEXTOUT("--Ssl_CertificateRevocationListFileName=...");
TEXTOUT(" File name of the SSL certificate revocation list.");
TEXTOUT(" The format is \"PEM\"");
TEXTOUT("--Ssl_IgnoreSecurity=...");
TEXTOUT(" Does not verify the authenticity of the peer's certificate");
TEXTOUT(" Use it at your own risks");
TEXTOUT("--Ssh_PublicKeyFileName=...");
TEXTOUT(" File name of the SSH private key.");
TEXTOUT(" Default is $HOME/.ssh/id_rsa.pub or $HOME/.ssh/id_dsa.pub");
TEXTOUT(" if the HOME environment variable is set, and just");
TEXTOUT(" \"id_rsa.pub\" or \"id_dsa.pub\" in the current directory");
TEXTOUT(" if HOME is not set.");
TEXTOUT(" Note: you need to set both public and private key.");
TEXTOUT("--Ssh_PrivateKeyFileName=...");
TEXTOUT(" File name of the SSH private key.");
TEXTOUT(" Default is $HOME/.ssh/id_rsa or $HOME/.ssh/id_dsa");
TEXTOUT(" if the HOME environment variable is set, and just");
TEXTOUT(" \"id_rsa\" or \"id_dsa\" in the current directory");
TEXTOUT(" if HOME is not set.");
TEXTOUT(" Note: you need to set both public and private key.");
TEXTOUT(" Note: private key with a password is not supported.");
TEXTOUT("--Ssh_KnownHostsFileName=...");
TEXTOUT(" File name of the known hosts");
TEXTOUT(" The format is the OpenSSH file format (libssh2)");
TEXTOUT(" Default is $HOME/.ssh/known_hosts");
TEXTOUT(" if the HOME environment variable is set, and just");
TEXTOUT(" \"known_hosts\" in the current directory");
TEXTOUT(" if HOME is not set.");
TEXTOUT("--Ssh_IgnoreSecurity");
TEXTOUT(" Does not verify the authenticity of the peer");
TEXTOUT(" (you don't need to accept the key with ssh first)");
TEXTOUT(" Use it at your own risks");
return MI_OK;
}
//---------------------------------------------------------------------------
int Help_Nothing()
{
STRINGOUT(String(__T("Usage: \" [-Options...] FileName1 [Filename2...]\"")).insert(8, Program_Name));
STRINGOUT(String(__T("\" --Help\" for displaying more information")).insert(1, Program_Name));
return MI_OK;
}
//---------------------------------------------------------------------------
int Help_Output()
{
TEXTOUT("--Output=... Specify a template (BETA)");
STRINGOUT(String(__T("Usage: \" --Output=[xxx;]Text FileName\"")).insert(8, Program_Name));
TEXTOUT("");
TEXTOUT("xxx can be: General, Video, Audio, Text, Chapter, Image, Menu");
TEXTOUT("Text can be the template text, or a filename");
TEXTOUT(" Filename must be in the form file://filename");
TEXTOUT("");
TEXTOUT("See --Info-Parameters for available parameters in the text");
TEXTOUT("(Parameters must be surrounded by \"%\" sign)");
TEXTOUT("");
STRINGOUT(String(__T("Usage: \" --Output=Video;%AspectRatio% FileName\"")).insert(8, Program_Name));
TEXTOUT("");
STRINGOUT(String(__T("Usage: \" --Output=Video;file://Video.txt FileName\"")).insert(8, Program_Name));
TEXTOUT("and Video.txt contains ");
TEXTOUT("\"%DisplayAspectRatio%\" for Video Aspect Ratio.");
TEXTOUT("");
STRINGOUT(String(__T("Usage: \" --Output=file://Text.txt FileName\"")).insert(8, Program_Name));
TEXTOUT("and Text.txt contains");
TEXTOUT("\"Video;%DisplayAspectRatio%\" for Video Aspect Ratio.");
TEXTOUT("\"Audio;%Format%\" for Audio Format.");
return MI_ERROR;
}
//---------------------------------------------------------------------------
int Usage()
{
Help_Nothing();
return MI_ERROR;
}
|