use of org.fagu.fmv.core.exec.filter.FadeAudioVideoFilterExec in project fmv by f-agu.
the class FadeAudioVideo method run.
/**
* @see org.fagu.fmv.cli.Command#run(java.lang.String[])
*/
@Override
public void run(String[] args) {
if (args.length != 4) {
help();
return;
}
// TEST
Optional<Identifiable> identifiableOpt = BaseIdentifiable.findById(project, args[1]);
if (!identifiableOpt.isPresent()) {
println("not found: " + args[1]);
return;
}
FadeType fadeType = FadeType.valueOf(args[0].toUpperCase());
Time startTime = Time.parse(args[2]);
Duration duration = Duration.parse(args[2]);
Identifiable identifiable = identifiableOpt.get();
FadeAudioVideoFilterExec filterExec = new FadeAudioVideoFilterExec(project, fadeType, startTime, duration);
filterExec.add(identifiable);
}
use of org.fagu.fmv.core.exec.filter.FadeAudioVideoFilterExec in project fmv by f-agu.
the class Console method startConsole.
/**
* @param consoleReader
* @throws IOException
*/
private void startConsole(ConsoleReader consoleReader) throws IOException {
List<Executable> executables = project.getExecutables();
if (!executables.isEmpty()) {
return;
}
consoleReader.println("Create a default structure");
GenericExecutable rootExec = new GenericExecutable(project);
FadeAudioVideoFilterExec fadeOut = new FadeAudioVideoFilterExec(project, FadeType.OUT, Time.valueOf(200), Duration.valueOf(3));
rootExec.add(fadeOut);
FadeAudioVideoFilterExec fadeIn = new FadeAudioVideoFilterExec(project, FadeType.IN, Time.valueOf(0), Duration.valueOf(2));
fadeOut.add(fadeIn);
GenericFilterExec audioMerge = new GenericFilterExec(project, "amerge");
fadeIn.add(audioMerge);
ConcatExecutable concat = new ConcatExecutable(project);
audioMerge.add(concat);
project.modified();
}
Aggregations