NullParameter recursiveParameter = parser.createNullParameter(
"Enable recursive mode.").addAliases("-r", "--recursive");
+ NullParameter forPortableParameter = parser.createNullParameter(
+ "Encode for portable player.").addAliases("-p", "--portable");
+
StringParameter inputPatternParameter = parser
.createStringParameter("File input pattern.")
.addAliases("-i", "--input-pattern").setMandatory();
parser.parse(args);
- if (recursiveParameter.isParameterSpecified())
- options.recursive = true;
+ options.recursive = recursiveParameter.isParameterSpecified();
- if (deinterlaceParameter.isParameterSpecified())
- options.deinterlace = true;
+ options.deinterlace = deinterlaceParameter.isParameterSpecified();
- if (testParameter.isParameterSpecified())
- options.testOnly = true;
+ options.testOnly = testParameter.isParameterSpecified();
if (outputFormatParameter.isParameterSpecified())
options.outputFormats.addAll(outputFormatParameter
options.inputPatterns.addAll(inputPatternParameter
.getArgumentsAsStrings());
+ options.forPortablePlayer = forPortableParameter.isParameterSpecified();
+
if (videoBitrateParameter.isParameterSpecified())
try {
options.videoBitrate = videoBitrateParameter.getValue();