mirror of
https://github.com/R0m1k3/Socialflow.git
synced 2026-10-11 17:26:45 +02:00
feat: Implement new FFmpeg service with FastAPI for video processing, TTS, and subtitle generation, including font management and debugging endpoints.
This commit is contained in:
1 parent
3a5acd425c
commit
e6a1fdc9da
1 file changed
+3
-8
@@ -939,16 +939,11 @@ async def process_reel(request: ReelRequest, x_api_key: str = Header(None)):
|
|||||||
audio_mapped = True
|
audio_mapped = True
|
||||||
else:
|
else:
|
||||||
# No external audio added
|
# No external audio added
|
||||||
if has_original_audio:
|
# To prevent FFmpeg crashes with certain MP4 original audio codecs,
|
||||||
# Add audio fade out to original audio
|
# we bypass the afade filter entirely and just map 0:a directly.
|
||||||
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
|
audio_mapped = False
|
||||||
|
|
||||||
|
|
||||||
# Apply Filter Complex
|
# Apply Filter Complex
|
||||||
cmd.extend(["-filter_complex", ";".join(fc_parts)])
|
cmd.extend(["-filter_complex", ";".join(fc_parts)])
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user