优化选项检查

This commit is contained in:
nilaoda 2022-08-23 00:03:45 +08:00
parent 9a9a92c1c1
commit 561e2a6aa8
2 changed files with 6 additions and 1 deletions

View File

@ -242,7 +242,7 @@ namespace N_m3u8DL_RE.Common.Resource
( (
zhCN: "所有工作完成时尝试使用ffmpeg混流分离的音视频(默认容器: mkv)", zhCN: "所有工作完成时尝试使用ffmpeg混流分离的音视频(默认容器: mkv)",
zhTW: "所有工作完成時嘗試使用ffmpeg混流分離的影音(默認容器: mkv)", zhTW: "所有工作完成時嘗試使用ffmpeg混流分離的影音(默認容器: mkv)",
enUS: "When all works is done, try to use ffmpeg to mux the separated streams.(Default: mkv)" enUS: "When all works is done, try to use ffmpeg to mux the separated streams.(Default container: mkv)"
), ),
["cmd_muxToMp4"] = new TextContainer ["cmd_muxToMp4"] = new TextContainer
( (

View File

@ -55,6 +55,11 @@ namespace N_m3u8DL_RE
throw new ArgumentException("Can't use mkvmerge to make mp4!"); throw new ArgumentException("Can't use mkvmerge to make mp4!");
} }
if (option.MuxToMp4 && !option.MuxAfterDone)
{
throw new ArgumentException("Can't enable MuxToMp4 when MuxAfterDone is false!");
}
//预先检查ffmpeg //预先检查ffmpeg
if (option.FFmpegBinaryPath == null) if (option.FFmpegBinaryPath == null)
option.FFmpegBinaryPath = GlobalUtil.FindExecutable("ffmpeg"); option.FFmpegBinaryPath = GlobalUtil.FindExecutable("ffmpeg");