database , chat vod and shorts update error messages

This commit is contained in:
2026-07-31 16:56:40 +00:00
parent 736fb47e7a
commit d6503b7d92
5 changed files with 22 additions and 8 deletions
+7 -1
View File
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
import os
import linux
import tempfile
from pathlib import Path
@@ -20,11 +21,16 @@ def apply_gaussian_blur(frame, radius: int = 30):
# Return back as a numpy array for MoviePy
return np.array(blurred_image)
def fit_to_9_16_letterbox(input_path: str, top_text: str = "TOP TEXT", bottom_text: str = "BOTTOM TEXT", use_blur: bool = True):
def fit_to_9_16_letterbox(input_path: str, top_text: str = "TOP TEXT", bottom_text: str = "BOTTOM TEXT", use_blur: bool = True, force: bool = False):
input_file = Path(input_path)
output_suffix = "gaussian_9_16" if use_blur else "black_9_16"
output_path = input_file.parent / f"{input_file.stem}_{output_suffix}{input_file.suffix}"
if os.path.exists(output_path) and force is False:
print(f"❌ Error: Short video allready exists: {output_path}")
return
print("🧼 Sanitizing video metadata streams inside an automated safe context...")
with tempfile.NamedTemporaryFile(suffix=input_file.suffix, delete=False) as temp_file:
temp_path = temp_file.name