目录
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
public class JavaFFmepegTest extends Thread {
private String theFmpgCmdLine = "";
public String getTheFmpgCmdLine() {
return theFmpgCmdLine;
}
public void setTheFmpgCmdLine(String theFmpgCmdLine) {
this.theFmpgCmdLine = theFmpgCmdLine;
}
/// 线程的run方法:线程的入口函数
public void run() {
// 在run方法中编写需要执行的操作
openFFmpegExe();
System.out.println("fmpg thread over");
}
//调用其他的可执行文件,例如:自己制作的exe,或是 下载 安装的软件.
//转码命令:
//推流命令:
private void openFFmpegExe() {
if(theFmpgCmdLine == null || theFmpgCmdLine.equals("")){
return;
}