FFmpeg添加机器人通知

This commit is contained in:
Yutousama 2021-04-22 04:57:55 +08:00
parent 680b7ff8b9
commit d6b0cc9fc3

View File

@ -161,11 +161,17 @@ public class SaveLive {
""
);
System.out.println(exec);
boolean isPrint=false;
Process process=AppTools.exec(exec);
InputStream inputStream = process.getErrorStream();
byte[] bytes = new byte[2048];
while (inputStream.read(bytes) > -1) {
System.out.println(new String(bytes,StandardCharsets.UTF_8));
//System.out.println(new String(bytes,StandardCharsets.UTF_8));
if(!isPrint){
com.yutou.bilibili.Tools.Log.i("开始录制:" + roomId);
QQBotManager.getInstance().sendMessage(roomId + " 已启动录制");
isPrint=true;
}
}
System.out.println("----------------stop ffmpeg");
inputStream.close();