int videoBitrate = -1;
int audioBitrate = -1;
- switch (options.videoBitrate) {
+ switch (options.getVideoBitrate()) {
case LOW:
videoBitrate = 1000;
audioBitrate = 128;
break;
default:
- throw new RuntimeException("Video bitrate: " + options.videoBitrate
+ throw new RuntimeException("Video bitrate: " + options.getVideoBitrate()
+ " is not supported.");
}
String videoCodec = "libx264";
String audioCodec = "libmp3lame";
- if (options.videoBitrate == bitrate.COPY) {
+ if (options.getVideoBitrate() == bitrate.COPY) {
videoCodec = "copy";
audioCodec = "copy";
}
codecParams, videoCodec, audioCodec);
return "avconv -i \"" + inputFile.getAbsolutePath() + "\" "
- + codecParams.toString() + "\"" + targetFile.getAbsolutePath()
- + "\"";
+ + codecParams.toString() + "\"" + targetFile.getAbsolutePath()
+ + "\"";
}
@Override
@Override
public List<String> getTargetFileExtensions() {
- return toList("mkv", "mts", "mp4", "avi", "mpg", "mpeg", "vob");
+ return toList("mkv", "mts", "mp4", "avi", "mpg", "mpeg", "vob", "m4v");
}
@Override