OSDN Git Service

出力動画に拡張子がつかない問題に対処
[coroid/inqubus.git] / frontend / src / saccubus / worker / impl / convert / Convert.java
index 6cc39f6..1d472d9 100644 (file)
@@ -74,16 +74,17 @@ public class Convert extends Worker<ConvertResult, ConvertProgress> {
 
         final GeneralProfile gene = profile.getGeneralProfile();
         final OutputProfile outprof = profile.getOutputProfile();
-        final OutputNamePattern pattern = new OutputNamePattern(outprof.getFileName());
+        final OutputNamePattern outputPattern = new OutputNamePattern(outprof.getFileName());
         final String id = outprof.getVideoId();
-        pattern.setId(isNotEmpty(id) ? id : "");
+        outputPattern.setId(isNotEmpty(id) ? id : "");
         final String title = outprof.getTitile();
-        pattern.setTitle(isNotEmpty(title) ? title : "");
+        outputPattern.setTitle(isNotEmpty(title) ? title : "");
         final String fileName = getBaseName(videoFile.getPath());
-        pattern.setFileName(fileName);
-        pattern.setReplaceFrom(gene.getReplaceFrom());
-        pattern.setReplaceFrom(gene.getReplaceTo());
-        final File outputFile = new File(outprof.getDir(), pattern.createFileName());
+        outputPattern.setFileName(fileName);
+        outputPattern.setReplaceFrom(gene.getReplaceFrom());
+        outputPattern.setReplaceFrom(gene.getReplaceTo());
+        final File outputFile = new File(outprof.getDir(),
+                outputPattern.createFileName() + profile.getFfmpegOption().getExtOption());
 
         File transformedComment = null;
         File transformedOwner = null;