cmdList.add(scaled.getWidth() + "x" + scaled.getHeight());
}
- List<String> avfilterArgs = getAvfilterOptions(ov, addComment, commPath, addTcomment, tcommPath, isHD);
+ List<String> avfilterArgs = getAvfilterOptions(ov.getAvfilterOption());
+ if (!getFfmpeg().isVhookDisabled()) {
+ String vhookArg = getVhookArg(addComment, commPath, addTcomment, tcommPath, isHD);
+ if(StringUtils.isNotBlank(vhookArg)){
+ avfilterArgs.add(vhookArg);
+ }
+ }
if (!avfilterArgs.isEmpty()) {
cmdList.add("-vfilters");
}
}
- private List<String> getAvfilterOptions(FfmpegOption ov, boolean addComment, String commPath, boolean addTcomment,
- String tcommPath, boolean isHD) throws UnsupportedEncodingException {
+ private List<String> getAvfilterOptions(String avfilterOption) {
final List<String> avfilterArgs = new ArrayList<String>();
- final String avfilterOption = ov.getAvfilterOption();
if (StringUtils.isNotBlank(avfilterOption)) {
avfilterArgs.add(avfilterOption);
}
- final String vhookArg = (getFfmpeg().isVhookDisabled())
- ? null : getVhookArg(addComment, commPath, addTcomment, tcommPath, isHD);
- if (vhookArg != null) {
- avfilterArgs.add(vhookArg);
- }
return avfilterArgs;
}