Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
5d36c40508 | |||
12f81cb014 | |||
8c0c52c736 |
4
pom.xml
4
pom.xml
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>tech.bitgoblin</groupId>
|
<groupId>tech.bitgoblin</groupId>
|
||||||
<artifactId>dragoon</artifactId>
|
<artifactId>dragoon</artifactId>
|
||||||
<version>0.3.9</version>
|
<version>0.3.11</version>
|
||||||
|
|
||||||
<name>Dragoon</name>
|
<name>Dragoon</name>
|
||||||
<url>https://www.bitgoblin.tech</url>
|
<url>https://www.bitgoblin.tech</url>
|
||||||
@ -238,7 +238,7 @@
|
|||||||
</mappings>
|
</mappings>
|
||||||
<requires>
|
<requires>
|
||||||
<require>java-17-openjdk</require>
|
<require>java-17-openjdk</require>
|
||||||
<require>ffmpeg</require>
|
<require>ffmpeg-free</require>
|
||||||
</requires>
|
</requires>
|
||||||
<preinstallScriptlet>
|
<preinstallScriptlet>
|
||||||
<script>echo "installing ${project.name} now"</script>
|
<script>echo "installing ${project.name} now"</script>
|
||||||
|
@ -63,18 +63,21 @@ public class Transcoder {
|
|||||||
String filename = Paths.get(filePath).getFileName().toString();
|
String filename = Paths.get(filePath).getFileName().toString();
|
||||||
String outputPath = Paths.get(this.repo.getOutputPath(), String.format("%s.mov", filename)).toString();
|
String outputPath = Paths.get(this.repo.getOutputPath(), String.format("%s.mov", filename)).toString();
|
||||||
|
|
||||||
String cmd = String.format("%s -i %s -y -f %s -c:v %s -vf %s -profile:v %s -c:a %s %s",
|
String cmd = String.format("%s -i INPUT_FILE -y -f %s -c:v %s -vf %s -profile:v %s -c:a %s OUTPUT_FILE",
|
||||||
this.ffmpeg_path, // FFMPEG binary path
|
this.ffmpeg_path, // FFMPEG binary path
|
||||||
sourceFile.toString(), // input file
|
|
||||||
this.config.getString("transcoder.video_format"), // video container format
|
this.config.getString("transcoder.video_format"), // video container format
|
||||||
this.config.getString("transcoder.video_codec"), // video codec
|
this.config.getString("transcoder.video_codec"), // video codec
|
||||||
this.config.getString("transcoder.video_parameters"), // video format
|
this.config.getString("transcoder.video_parameters"), // video format
|
||||||
this.config.getString("transcoder.video_profile"), // video profile
|
this.config.getString("transcoder.video_profile"), // video profile
|
||||||
this.config.getString("transcoder.audio_codec"), // audio codec
|
this.config.getString("transcoder.audio_codec") // audio codec
|
||||||
outputPath // output file path
|
|
||||||
);
|
);
|
||||||
|
|
||||||
ProcessBuilder pb = new ProcessBuilder(cmd.split("\\s+"));
|
String[] cmdArr = cmd.split("\\s+");
|
||||||
|
cmdArr[2] = sourceFile.toString();
|
||||||
|
cmdArr[cmdArr.length - 1] = outputPath;
|
||||||
|
System.out.println(String.join(" ", cmdArr));
|
||||||
|
|
||||||
|
ProcessBuilder pb = new ProcessBuilder(cmdArr);
|
||||||
pb.inheritIO(); // use the java processes' input and output streams
|
pb.inheritIO(); // use the java processes' input and output streams
|
||||||
try {
|
try {
|
||||||
Process process = pb.start();
|
Process process = pb.start();
|
||||||
|
Reference in New Issue
Block a user