/*
* Meviz - Various tools collection to work with multimedia.
* Copyright (C) 2012, 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.
break;
case MEDIUM:
- videoBitrate = 3500;
- audioBitrate = 128;
+ videoBitrate = 4000;
+ audioBitrate = 192;
break;
case HIGH:
// convert
final StringBuffer codecParams = new StringBuffer();
- codecParams.append("-acodec libmp3lame -vcodec libx264");
+ String videoCodec = "libx264 ";
+
+ if (options.forPortablePlayer) {
+ videoBitrate = 1000;
+ audioBitrate = 128;
+ videoCodec = "libxvid ";
+ codecParams.append("-s 640x480 ");
+ }
+
+ codecParams.append("-acodec libmp3lame -vcodec " + videoCodec);
- codecParams.append(" -b " + videoBitrate + "k");
- codecParams.append(" -b:a " + audioBitrate + "k");
+ codecParams.append("-b " + videoBitrate + "k ");
+ codecParams.append("-b:a " + audioBitrate + "k ");
if (options.deinterlace)
- codecParams.append(" -filter:v yadif");
+ codecParams.append("-filter:v yadif ");
return "avconv -i \"" + inputFile.getAbsolutePath() + "\" "
- + codecParams.toString() + " \"" + targetFile.getAbsolutePath()
+ + codecParams.toString() + "\"" + targetFile.getAbsolutePath()
+ "\"";
}
@Override
public List<String> getSourceFileExtensions() {
- return toList("mkv", "mts");
+ return toList("mkv", "mts", "mp4", "avi", "mpg", "mpeg", "vob");
}
@Override
public List<String> getTargetFileExtensions() {
- return toList("mp4");
+ return toList("mkv", "mts", "mp4", "avi", "mpg", "mpeg", "vob");
}
@Override