use of org.fagu.fmv.cli.Console in project fmv by f-agu.
the class Bootstrap method main.
/**
* @param args
*/
public static void main(String[] args) throws Exception {
if (!FFMpeg.search().isFound()) {
System.out.println("FFMpeg not found !");
return;
}
if (!FFProbe.search().isFound()) {
System.out.println("FFProbe not found !");
return;
}
CommandLineParser parser = new GnuParser();
Options options = new Options();
options.addOption("c", "conf", true, "Conf properties");
CommandLine commandLine = parser.parse(options, args);
FMVCLIConfig fmvcliConfig;
if (commandLine.hasOption('c')) {
String conf = commandLine.getOptionValue('c');
fmvcliConfig = openFMVCLIConfig(conf);
} else {
fmvcliConfig = new FMVCLIConfig();
}
System.out.println("FMV " + FMV.getVersion());
System.out.println();
Project project;
String[] args2 = commandLine.getArgs();
if (args2.length > 0) {
project = loadProject(new File(args2[0]));
} else {
project = menu(System.out);
}
Console console = new Console(new Environnement(project, fmvcliConfig));
console.run();
}
Aggregations