Fix FFMpeg remux stop for server recordings on windows

This commit is contained in:
0xb00bface 2020-09-29 15:39:01 +02:00
parent 1c55593e7f
commit 7bb0e8fe5d
1 changed files with 3 additions and 2 deletions

View File

@ -46,8 +46,9 @@ public class Remux extends AbstractPostProcessor {
File remuxedFile = new File(rec.getPostProcessedFile().getAbsolutePath() + '.' + fileExt); File remuxedFile = new File(rec.getPostProcessedFile().getAbsolutePath() + '.' + fileExt);
argsPlusFile[argsPlusFile.length - 1] = remuxedFile.getAbsolutePath(); argsPlusFile[argsPlusFile.length - 1] = remuxedFile.getAbsolutePath();
String[] cmdline = OS.getFFmpegCommand(argsPlusFile); String[] cmdline = OS.getFFmpegCommand(argsPlusFile);
LOG.info(Arrays.toString(cmdline)); File executionDir = rec.getPostProcessedFile().isDirectory() ? rec.getPostProcessedFile() : rec.getPostProcessedFile().getParentFile();
Process ffmpeg = Runtime.getRuntime().exec(cmdline, new String[0], rec.getPostProcessedFile().getParentFile()); LOG.info("Executing {} in working directory {}", Arrays.toString(cmdline), executionDir);
Process ffmpeg = Runtime.getRuntime().exec(cmdline, new String[0], executionDir);
setupLogging(ffmpeg, rec); setupLogging(ffmpeg, rec);
rec.setPostProcessedFile(remuxedFile); rec.setPostProcessedFile(remuxedFile);
if (inputFile.getName().equals("playlist.m3u8")) { if (inputFile.getName().equals("playlist.m3u8")) {