1
0
Fork 0

feat: 영상·오디오 Provider (FfmpegProvider) — FFmpeg 설치 시 활성화

FFMpegCore로 영상/오디오 변환·트랜스코딩·오디오 추출. ffmpeg/ffprobe가 없으면 NotReady로 비활성, PATH 또는 앱 폴더에 두면 자동 활성화(LGPL 분리 호출, 본체 미번들).

- 영상 mp4/mkv/webm/mov/avi/gif, 오디오 mp3/aac/m4a/opus/ogg/flac/wav N×M + 영상→오디오 추출
- ExternalToolDetector.TryFindFfmpeg (앱 폴더 + PATH 탐지)
- 진행률 best-effort (ffprobe duration 기반), 취소 전파
- 테스트 3개 + SSOT status 갱신 — 총 37개 통과
This commit is contained in:
Yun Chan 2026-06-01 13:24:50 +09:00
parent b76d51f3c1
commit 7235fc87f5
8 changed files with 182 additions and 13 deletions

View file

@ -49,6 +49,39 @@ internal static class ExternalToolDetector
}
}
/// <summary>
/// FFmpeg/ffprobe 바이너리 폴더를 찾는다. (1) 앱 전용 폴더(%LOCALAPPDATA%\Everything2Everything\ffmpeg),
/// (2) 시스템 PATH 순. ffmpeg.exe와 ffprobe.exe가 모두 있는 폴더만 유효.
/// </summary>
public static bool TryFindFfmpeg(out string ffmpegDirectory)
{
ffmpegDirectory = "";
var candidates = new List<string>();
var local = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
if (!string.IsNullOrEmpty(local))
candidates.Add(Path.Combine(local, "Everything2Everything", "ffmpeg"));
var pathEnv = Environment.GetEnvironmentVariable("PATH") ?? "";
foreach (var dir in pathEnv.Split(Path.PathSeparator))
if (!string.IsNullOrWhiteSpace(dir))
candidates.Add(dir.Trim());
foreach (var dir in candidates.Distinct())
{
try
{
if (File.Exists(Path.Combine(dir, "ffmpeg.exe")) && File.Exists(Path.Combine(dir, "ffprobe.exe")))
{
ffmpegDirectory = dir;
return true;
}
}
catch { /* 잘못된 경로 무시 */ }
}
return false;
}
public static bool IsH2OrestartInstalled()
{
try