X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Fmeviz%2Fencoder%2Fconverters%2FFfmpeg2theora.java;h=84bc4b7739259756c2faf254d4d8610da34ca1d4;hb=cf6e4ace4972f24f40f88ea12fcf99c763e4e40a;hp=4df8c32796ae218c86b59497a5af558fa69fd8fa;hpb=565d9c726de9b50709027f9455d39499a17f4b25;p=meviz.git diff --git a/src/main/java/eu/svjatoslav/meviz/encoder/converters/Ffmpeg2theora.java b/src/main/java/eu/svjatoslav/meviz/encoder/converters/Ffmpeg2theora.java index 4df8c32..84bc4b7 100755 --- a/src/main/java/eu/svjatoslav/meviz/encoder/converters/Ffmpeg2theora.java +++ b/src/main/java/eu/svjatoslav/meviz/encoder/converters/Ffmpeg2theora.java @@ -1,7 +1,7 @@ /* * Meviz - Various tools collection to work with multimedia. - * Copyright (C) 2012, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu - * + * Copyright (C) 2012 -- 2018, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu + * * This program is free software; you can redistribute it and/or * modify it under the terms of version 2 of the GNU General Public License * as published by the Free Software Foundation. @@ -9,34 +9,34 @@ package eu.svjatoslav.meviz.encoder.converters; +import eu.svjatoslav.meviz.encoder.EncodingOptions; + import java.io.File; import java.util.List; -import eu.svjatoslav.meviz.encoder.EncodingOptions; - public class Ffmpeg2theora extends AbstractConverter { - @Override - public String getCommand(final File inputFile, final File targetFile, - final EncodingOptions options) { - return "ffmpeg2theora \"" + inputFile.getAbsolutePath() + "\" -o \"" - + targetFile.getAbsolutePath() - + "\" --optimize --videobitrate 3000 --width 800"; - } - - @Override - public List getSourceFileExtensions() { - return toList("avi", "mp4"); - } - - @Override - public List getTargetFileExtensions() { - return toList("ogv"); - } - - @Override - public boolean isTerminalMandatory() { - return true; - } + @Override + public String getCommand(final File inputFile, final File targetFile, + final EncodingOptions options, String targetFormat) { + return "ffmpeg2theora \"" + inputFile.getAbsolutePath() + "\" -o \"" + + targetFile.getAbsolutePath() + + "\" --optimize --videobitrate 3000 --width 800"; + } + + @Override + public List getSourceFileExtensions() { + return toList("avi", "mp4", "m4v", "asf"); + } + + @Override + public List getTargetFileExtensions() { + return toList("ogv"); + } + + @Override + public boolean isTerminalMandatory() { + return true; + } }