Search in sources :

Example 1 with GenericExecutable

use of org.fagu.fmv.core.exec.executable.GenericExecutable 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();
}
Also used : GenericFilterExec(org.fagu.fmv.core.exec.filter.GenericFilterExec) ConcatExecutable(org.fagu.fmv.core.exec.executable.ConcatExecutable) FadeAudioVideoFilterExec(org.fagu.fmv.core.exec.filter.FadeAudioVideoFilterExec) ConcatExecutable(org.fagu.fmv.core.exec.executable.ConcatExecutable) Executable(org.fagu.fmv.core.exec.Executable) GenericExecutable(org.fagu.fmv.core.exec.executable.GenericExecutable) GenericExecutable(org.fagu.fmv.core.exec.executable.GenericExecutable)

Example 2 with GenericExecutable

use of org.fagu.fmv.core.exec.executable.GenericExecutable in project fmv by f-agu.

the class Append method appendImage.

/**
 * @param sourceNum
 * @param args
 */
private void appendImage(int sourceNum, String[] args) {
    if (args.length != 3) {
        getPrinter().println("usage: append <num-source> <duration>");
        return;
    }
    Duration duration = Duration.parse(args[1]);
    ConcatExecutable concatExecutable = getConcatExecutable();
    if (concatExecutable == null) {
        return;
    }
    GenericExecutable genericExecutable = new GenericExecutable(project);
    genericExecutable.add(new SourceSource(project, sourceNum));
}
Also used : ConcatExecutable(org.fagu.fmv.core.exec.executable.ConcatExecutable) Duration(org.fagu.fmv.utils.time.Duration) SourceSource(org.fagu.fmv.core.exec.source.SourceSource) GenericExecutable(org.fagu.fmv.core.exec.executable.GenericExecutable)

Aggregations

ConcatExecutable (org.fagu.fmv.core.exec.executable.ConcatExecutable)2 GenericExecutable (org.fagu.fmv.core.exec.executable.GenericExecutable)2 Executable (org.fagu.fmv.core.exec.Executable)1 FadeAudioVideoFilterExec (org.fagu.fmv.core.exec.filter.FadeAudioVideoFilterExec)1 GenericFilterExec (org.fagu.fmv.core.exec.filter.GenericFilterExec)1 SourceSource (org.fagu.fmv.core.exec.source.SourceSource)1 Duration (org.fagu.fmv.utils.time.Duration)1