Skip to content

Instantly share code, notes, and snippets.

Process process = new ProcessBuilder(command).start();
while (true) {
try {
if (process.exitValue() == 0)
break;
}
catch (IllegalThreadStateException e) {
continue;
}
}
Process process = new ProcessBuilder(command).start();
process.waitFor();
return true;
builder.start();
return true;
builder.command(commend);
builder.start();
return "c:\\ffmpeg\\output\\a.avi";
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
public class ConvertVideo {
private static String inputPath = "";
private static String outputPath = "";
import java.io.File;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
public class ConvertVideo {
private final static String PATH = "c:\\ffmpeg\\input\\c.mp4";
public static void main(String[] args) {