2 * Meviz - Various tools collection to work with multimedia.
3 * Copyright (C) 2012 -- 2018, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of version 2 of the GNU General Public License
7 * as published by the Free Software Foundation.
10 package eu.svjatoslav.meviz.encoder.converters;
12 import eu.svjatoslav.meviz.encoder.EncodingOptions;
15 import java.util.List;
17 public class AvconvAudio extends AbstractConverter {
19 private static final String[] SUPPORTED_FORMATS = new String[]{"ogg", "wav", "mp3", "m4a", "flac"};
22 public String getCommand(final File inputFile, final File targetFile,
23 final EncodingOptions options, String targetFormat) {
25 final String codecParams = "-b:a 192k";
27 return "avconv -i \"" + inputFile.getAbsolutePath() + "\" "
28 + codecParams + " \"" + targetFile.getAbsolutePath() + "\"";
32 public List<String> getSourceFileExtensions() {
33 return toList(SUPPORTED_FORMATS);
37 public List<String> getTargetFileExtensions() {
38 return toList(SUPPORTED_FORMATS);
42 public boolean isTerminalMandatory() {