From e6a1fdc9da1b5efefd6bcd08430d55c1c5bd049a Mon Sep 17 00:00:00 2001 From: R0m1k3 Date: Thu, 19 Mar 2026 15:00:59 +0100 Subject: [PATCH] feat: Implement new FFmpeg service with FastAPI for video processing, TTS, and subtitle generation, including font management and debugging endpoints. --- ffmpeg-service/main.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/ffmpeg-service/main.py b/ffmpeg-service/main.py index cdc159b..d39e437 100644 --- a/ffmpeg-service/main.py +++ b/ffmpeg-service/main.py @@ -939,15 +939,10 @@ async def process_reel(request: ReelRequest, x_api_key: str = Header(None)): audio_mapped = True else: # No external audio added - if has_original_audio: - # Add audio fade out to original audio - fc_parts.append( - f"[0:a]afade=t=out:st={fade_start}:d={fade_duration}[aout]" - ) - audio_mapped = True - else: - # No audio at all - audio_mapped = False + # To prevent FFmpeg crashes with certain MP4 original audio codecs, + # we bypass the afade filter entirely and just map 0:a directly. + audio_mapped = False + # Apply Filter Complex cmd.extend(["-filter_complex", ";".join(fc_parts)])