private JTextField outputOptionField = new JTextField();
private final JLabel avfilterOptionLabel = new JLabel();
private final JTextField avfilterOptionField = new JTextField();
- private final JCheckBox resizeCheckBox = new JCheckBox("次のサイズに収まるようリサイズ");
+ private final JCheckBox resizeCheckBox = new JCheckBox("次のサイズに収まるよう縮小(-s)");
private final JLabel resizeWidthLabel = new JLabel("横");
private final JTextField resizeWidthField = new NumberFormattedTextField();
private final JLabel resizeHeightLabel = new JLabel("縦");
import saccubus.converter.profile.GeneralSetting;
import saccubus.converter.profile.NgSetting;
import saccubus.net.TextProgressListener;
+import yukihane.mediainfowrapper.Info;
+import yukihane.mediainfowrapper.MediaInfo;
+import yukihane.mediainfowrapper.Size;
import yukihane.swf.Cws2Fws;
/**
}
}
+ if (ov.isResize()) {
+ final Info info = MediaInfo.getInfo(new File("bin", "MediaInfo"), videoFile);
+ final Size scaled = (ov.isAdjustRatio()) ? MediaInfo.adjustSize(info, ov.getResizeWidth(), ov.
+ getResizeHeight()) : new Size(info.getWidth(), info.getHeight());
+ cmdList.add("-s");
+ cmdList.add(scaled.getWidth() + "x" + scaled.getHeight());
+ }
+
List<String> avfilterArgs = getAvfilterOptions(ov, addComment, commPath, addTcomment, tcommPath);
if (!avfilterArgs.isEmpty()) {
private static final String PROP_RESIZE_WIDTH = "CMD_RESIZE_WIDTH";
private static final String PROP_RESIZE_HEIGHT = "CMD_RESIZE_HEIGHT";
private static final String PROP_ADJUST_RATIO = "CMD_ADJUST_RATIO";
- private static final String PROP_PADDING ="CMD_PADDING";
+ private static final String PROP_PADDING = "CMD_PADDING";
private final File ffmpeg;
private final File vhook;
private final File optionFile;
String out = prop.getProperty(PROP_CMDLINE_OUT,
"-f ipod -g 150 -qcomp 0.7 -qmin 20 -qmax 30 -qdiff 4 -subq 6 -me_range 16 -i_qfactor 0.714286");
String avfilter = prop.getProperty(PROP_CMDLINE_AVFILTER, "");
- boolean resize = Boolean.getBoolean(prop.getProperty(PROP_RESIZE,"false"));
+ boolean resize = Boolean.getBoolean(prop.getProperty(PROP_RESIZE, "false"));
String width = prop.getProperty(PROP_RESIZE_WIDTH, "512");
String height = prop.getProperty(PROP_RESIZE_HEIGHT, "384");
- boolean adjust = Boolean.getBoolean(prop.getProperty(PROP_ADJUST_RATIO,"false"));
+ boolean adjust = Boolean.getBoolean(prop.getProperty(PROP_ADJUST_RATIO, "false"));
boolean pad = Boolean.getBoolean(prop.getProperty(PROP_PADDING, "false"));
FfmpegOption opt = new FfmpegOption(ext, main, in, out, avfilter, resize, width, height, adjust, pad);