MKV 만들기 · AI 자막: 목록의 동영상 파일이 사라졌으면 알아보기 쉬운 안내

"ffmpeg 오류 (코드 1) … No such file or directory" 대신 "동영상 파일이 없습니다 (옮겨졌거나 지워졌습니다)".
여러 개를 할 때는 그 동영상만 실패로 두고 다음으로 넘어간다 (지금과 같음).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
main
RyuJongJin 2026-10-03 04:56:31 +09:00
parent 07ec8cd4a5
commit 772fbabb62
1 changed files with 5 additions and 0 deletions

View File

@ -694,6 +694,7 @@ class AppController extends ChangeNotifier {
final wav = p.join(tmp, 'audio.wav');
_log('AI 자막 시작: ${v.fileName}');
try {
if (!await storage.exists(v.path)) throw MediaToolException(missingFileMessage);
// 2. 음성 추출 (전체의 5%)
if (v.info?.ofType('audio').isEmpty ?? false) {
throw const MediaToolException('음성 트랙이 없습니다.');
@ -1088,6 +1089,7 @@ class AppController extends ChangeNotifier {
final copies = <SubtitleEntry, String>{};
var started = false; // FFmpeg 가 출력 파일을 쓰기 시작했는지
try {
if (!await services.storage.exists(v.path)) throw MediaToolException(missingFileMessage);
// Android 의 FFmpeg (ffmpeg-kit) 에는 AV1 디코더가 없어 다시 인코딩할 수 없다 (원본 유지는 된다)
final vcodec = v.info?.ofType('video').firstOrNull?.codec;
if (Platform.isAndroid && encode.reencode && vcodec == 'av1') {
@ -1140,6 +1142,9 @@ class AppController extends ChangeNotifier {
bool _buildCancelled = false;
/// 목록에 넣은 뒤 파일이 옮겨지거나 지워졌을 때
static const missingFileMessage = '동영상 파일이 없습니다 (옮겨졌거나 지워졌습니다). 목록에서 빼고 다시 추가하세요.';
/// 지금 작업 중단 + 대기 중인 작업 모두 비우기
void cancel() {
if (pendingJobs.isNotEmpty) _log('대기 중인 작업 ${pendingJobs.length}개 취소');