s9s23 fleet rollout (his order): honest subtitle scale + layer order + ultrafast
Browse files863 unmodified lines8648658668678688698701161 unmodified lines2032203320342035203620372038168 unmodified lines220722082209221022112212221322142215221664 unmodified lines2281228222832284228522861402 unmodified lines3689369036913692369336943695221 unmodified lines3917391839193920392139223923392439253926392739283929393064 unmodified lines399539963997399839994000835 unmodified lines4836483748384839484048414842268 unmodified lines5111511251135114511551165117511851195120512151225123121 unmodified lines524552465247524852495250863 unmodified linesis_mm_text = (lang_key == "myanmar") or bool(re.search(r"[\u1000-\u109F]", clean_text))ratio_limits = {"myanmar": {"9:16": 9, "4:5": 9, "1:1": 10, "4:3": 11, "16:9": 12},"thai": {"9:16": 12, "4:5": 12, "1:1": 14, "4:3": 17, "16:9": 20},"chinese": {"9:16": 8, "4:5": 8, "1:1": 10, "4:3": 12, "16:9": 14},"japanese": {"9:16": 8, "4:5": 8, "1:1": 10, "4:3": 12, "16:9": 14},1161 unmodified linestarget_w = (target_w // 2) * 2target_h = (target_h // 2) * 2s_size = int(s_size * (target_h / 720.0))s_size = int(s_size * (2.13 if ratio_str in ("16:9", "4:3") else 1.44)) # s9s18: subtitle boost x2 landscape / x1.35 portrait (Ko gyi)m_y_val = to_float(mask_y, 80.0) / 100.0m_h_val = to_float(mask_h, 15.0) / 100.0168 unmodified linesv_complex += f"{current_v_node}zoompan=z='1/(1-({_zp:g}*if(lt(mod(ot\\,{_zi:g})\\,3)\\,sin(PI*mod(ot\\,{_zi:g})/3)\\,0)))':x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)':d=1:s={target_w}x{target_h}:fps={render_fps:g}[v_zoom];"current_v_node = "[v_zoom]"if mask_toggle == "on":v_complex += f"{current_v_node}split=2[main_vid][glass_src];[glass_src]crop={crop_w}:{crop_h}:{crop_x}:{crop_y},boxblur=12:2,drawbox=x=0:y=0:w=iw:h=ih:color=white@0.2:t=fill[glass_eff];[main_vid][glass_eff]overlay=x={crop_x}:y={crop_y}[v_glass];"current_v_node = "[v_glass]"mq_hex = marquee_color if re.fullmatch(r"[0-9A-Fa-f]{6}", str(marquee_color or "")) else "FFD700"if marquee_toggle == "on" and marquee_text:font_path = os.path.join(USER_FONT_DIR, "Zawgyi-One.ttf").replace("\\", "/")64 unmodified linesv_complex += f"[{ov_idx}:v]{fps_expr},setpts=PTS-STARTPTS,scale={w_pip}:{w_pip}:force_original_aspect_ratio=increase,crop={w_pip}:{w_pip},setsar=1,format=yuva420p[pip];{current_v_node}[pip]overlay={overlay_pos}:shortest=1[v_pip_out];"current_v_node = "[v_pip_out]"if sub_toggle == "on":safe_sub_file = sub_file.replace("\\", "/").replace(":", "\\:")v_complex += f"{current_v_node}subtitles='{safe_sub_file}'[v_sub];"1402 unmodified linestarget_w = (target_w // 2) * 2target_h = (target_h // 2) * 2s_size = int(s_size * (target_h / 720.0))s_size = int(s_size * (2.13 if ratio in ("16:9", "4:3") else 1.44)) # s9s18: subtitle boost x2 landscape / x1.35 portrait (Ko gyi)m_y_val = to_float(mask_y, 80.0) / 100.0m_h_val = to_float(mask_h, 15.0) / 100.0221 unmodified linesv_complex += f"{current_v_node}zoompan=z='1/(1-({_zp:g}*if(lt(mod(ot\\,{_zi:g})\\,3)\\,sin(PI*mod(ot\\,{_zi:g})/3)\\,0)))':x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)':d=1:s={target_w}x{target_h}:fps={render_fps:g}[v_zoom];"current_v_node = "[v_zoom]"if mask_toggle == "on":v_complex += (f"{current_v_node}split=2[main_vid][glass_src];"f"[glass_src]crop={crop_w}:{crop_h}:{crop_x}:{crop_y},boxblur=12:2,drawbox=x=0:y=0:w=iw:h=ih:color=white@0.2:t=fill[glass_eff];"f"[main_vid][glass_eff]overlay=x={crop_x}:y={crop_y}[v_glass];")current_v_node = "[v_glass]"mq_hex = marquee_color if re.fullmatch(r"[0-9A-Fa-f]{6}", str(marquee_color or "")) else "FFD700"if marquee_toggle == "on" and marquee_text:font_path = os.path.join(USER_FONT_DIR, "Zawgyi-One.ttf").replace("\\", "/")64 unmodified linesv_complex += f"[{ov_idx}:v]{fps_expr},setpts=PTS-STARTPTS,scale={w_pip}:{w_pip}:force_original_aspect_ratio=increase,crop={w_pip}:{w_pip},setsar=1,format=yuva420p[pip];{current_v_node}[pip]overlay={overlay_pos}:shortest=1[v_pip_out];"current_v_node = "[v_pip_out]"if sub_toggle == "on" or task_mode == "subtitles_only":safe_sub_file = sub_file.replace("\\", "/").replace(":", "\\:")v_complex += f"{current_v_node}subtitles='{safe_sub_file}'[v_sub];"835 unmodified liness_color = s_color.lstrip("#")ass_color = f"&H00{s_color[4:6]}{s_color[2:4]}{s_color[0:2]}&" if len(s_color) == 6 else "&H0000FFFF&"s_size = int(s_size * (target_h / 720.0))s_size = int(s_size * (2.13 if ratio in ("16:9", "4:3") else 1.44)) # s9s18: subtitle boost x2 landscape / x1.35 portrait (Ko gyi)try:m_h_val = float(mask_h) / 100.0 if mask_h else 0.15except Exception:268 unmodified linescrop_h = max(16, min(target_h, (crop_h // 2) * 2))crop_x = max(0, min(target_w - crop_w, (crop_x // 2) * 2))crop_y = max(0, min(target_h - crop_h, (crop_y // 2) * 2))v_complex += (f"{current_v_node}split=2[main_vid][glass_src];"f"[glass_src]crop={crop_w}:{crop_h}:{crop_x}:{crop_y},boxblur=12:2,drawbox=x=0:y=0:w=iw:h=ih:color=white@0.2:t=fill[glass_eff];"f"[main_vid][glass_eff]overlay=x={crop_x}:y={crop_y}[v_glass];")current_v_node = "[v_glass]"if wm_idx != -1:logo_opacity_value = number(logo_opacity, 100, 0, 100) / 100.0logo_size_value = number(logo_size, 5, 1, 100) / 100.0121 unmodified lines)current_v_node = "[v_marquee]"if str(sub_toggle).lower() == "on" and tts_sub_file and os.path.exists(tts_sub_file):safe_tts_sub = tts_sub_file.replace("\\", "/").replace(":", "\\:")v_complex += f"{current_v_node}subtitles='{safe_tts_sub}'[v_sub];"863 unmodified lines8648658668678688698701161 unmodified lines2032203320342035203620372038168 unmodified lines22072208220922102211221264 unmodified lines22772278227922802281228222832284228522861402 unmodified lines3689369036913692369336943695221 unmodified lines39173918391939203921392264 unmodified lines39873988398939903991399239933994399539963997399839994000835 unmodified lines4836483748384839484048414842268 unmodified lines511151125113511451155116121 unmodified lines52385239524052415242524352445245524652475248524952505251863 unmodified linesis_mm_text = (lang_key == "myanmar") or bool(re.search(r"[\u1000-\u109F]", clean_text))ratio_limits = {"myanmar": {"9:16": 8, "4:5": 9, "1:1": 10, "4:3": 11, "16:9": 12},"thai": {"9:16": 12, "4:5": 12, "1:1": 14, "4:3": 17, "16:9": 20},"chinese": {"9:16": 8, "4:5": 8, "1:1": 10, "4:3": 12, "16:9": 14},"japanese": {"9:16": 8, "4:5": 8, "1:1": 10, "4:3": 12, "16:9": 14},1161 unmodified linestarget_w = (target_w // 2) * 2target_h = (target_h // 2) * 2s_size = int(s_size * (target_h / 720.0))s_size = int(s_size * (2.13 if ratio_str in ("16:9", "4:3") else 2.16)) # s9s18: subtitle boost x2 landscape / x1.35 portrait (Ko gyi)m_y_val = to_float(mask_y, 80.0) / 100.0m_h_val = to_float(mask_h, 15.0) / 100.0168 unmodified linesv_complex += f"{current_v_node}zoompan=z='1/(1-({_zp:g}*if(lt(mod(ot\\,{_zi:g})\\,3)\\,sin(PI*mod(ot\\,{_zi:g})/3)\\,0)))':x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)':d=1:s={target_w}x{target_h}:fps={render_fps:g}[v_zoom];"current_v_node = "[v_zoom]"mq_hex = marquee_color if re.fullmatch(r"[0-9A-Fa-f]{6}", str(marquee_color or "")) else "FFD700"if marquee_toggle == "on" and marquee_text:font_path = os.path.join(USER_FONT_DIR, "Zawgyi-One.ttf").replace("\\", "/")64 unmodified linesv_complex += f"[{ov_idx}:v]{fps_expr},setpts=PTS-STARTPTS,scale={w_pip}:{w_pip}:force_original_aspect_ratio=increase,crop={w_pip}:{w_pip},setsar=1,format=yuva420p[pip];{current_v_node}[pip]overlay={overlay_pos}:shortest=1[v_pip_out];"current_v_node = "[v_pip_out]"if mask_toggle == "on":v_complex += f"{current_v_node}split=2[main_vid][glass_src];[glass_src]crop={crop_w}:{crop_h}:{crop_x}:{crop_y},boxblur=12:2,drawbox=x=0:y=0:w=iw:h=ih:color=white@0.2:t=fill[glass_eff];[main_vid][glass_eff]overlay=x={crop_x}:y={crop_y}[v_glass];"current_v_node = "[v_glass]"if sub_toggle == "on":safe_sub_file = sub_file.replace("\\", "/").replace(":", "\\:")v_complex += f"{current_v_node}subtitles='{safe_sub_file}'[v_sub];"1402 unmodified linestarget_w = (target_w // 2) * 2target_h = (target_h // 2) * 2s_size = int(s_size * (target_h / 720.0))s_size = int(s_size * (2.13 if ratio in ("16:9", "4:3") else 2.16)) # s9s18: subtitle boost x2 landscape / x1.35 portrait (Ko gyi)m_y_val = to_float(mask_y, 80.0) / 100.0m_h_val = to_float(mask_h, 15.0) / 100.0221 unmodified linesv_complex += f"{current_v_node}zoompan=z='1/(1-({_zp:g}*if(lt(mod(ot\\,{_zi:g})\\,3)\\,sin(PI*mod(ot\\,{_zi:g})/3)\\,0)))':x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)':d=1:s={target_w}x{target_h}:fps={render_fps:g}[v_zoom];"current_v_node = "[v_zoom]"mq_hex = marquee_color if re.fullmatch(r"[0-9A-Fa-f]{6}", str(marquee_color or "")) else "FFD700"if marquee_toggle == "on" and marquee_text:font_path = os.path.join(USER_FONT_DIR, "Zawgyi-One.ttf").replace("\\", "/")64 unmodified linesv_complex += f"[{ov_idx}:v]{fps_expr},setpts=PTS-STARTPTS,scale={w_pip}:{w_pip}:force_original_aspect_ratio=increase,crop={w_pip}:{w_pip},setsar=1,format=yuva420p[pip];{current_v_node}[pip]overlay={overlay_pos}:shortest=1[v_pip_out];"current_v_node = "[v_pip_out]"if mask_toggle == "on":v_complex += (f"{current_v_node}split=2[main_vid][glass_src];"f"[glass_src]crop={crop_w}:{crop_h}:{crop_x}:{crop_y},boxblur=12:2,drawbox=x=0:y=0:w=iw:h=ih:color=white@0.2:t=fill[glass_eff];"f"[main_vid][glass_eff]overlay=x={crop_x}:y={crop_y}[v_glass];")current_v_node = "[v_glass]"if sub_toggle == "on" or task_mode == "subtitles_only":safe_sub_file = sub_file.replace("\\", "/").replace(":", "\\:")v_complex += f"{current_v_node}subtitles='{safe_sub_file}'[v_sub];"835 unmodified liness_color = s_color.lstrip("#")ass_color = f"&H00{s_color[4:6]}{s_color[2:4]}{s_color[0:2]}&" if len(s_color) == 6 else "&H0000FFFF&"s_size = int(s_size * (target_h / 720.0))s_size = int(s_size * (2.13 if ratio in ("16:9", "4:3") else 2.16)) # s9s18: subtitle boost x2 landscape / x1.35 portrait (Ko gyi)try:m_h_val = float(mask_h) / 100.0 if mask_h else 0.15except Exception:268 unmodified linescrop_h = max(16, min(target_h, (crop_h // 2) * 2))crop_x = max(0, min(target_w - crop_w, (crop_x // 2) * 2))crop_y = max(0, min(target_h - crop_h, (crop_y // 2) * 2))if wm_idx != -1:logo_opacity_value = number(logo_opacity, 100, 0, 100) / 100.0logo_size_value = number(logo_size, 5, 1, 100) / 100.0121 unmodified lines)current_v_node = "[v_marquee]"if str(mask_toggle).lower() == "on":v_complex += (f"{current_v_node}split=2[main_vid][glass_src];"f"[glass_src]crop={crop_w}:{crop_h}:{crop_x}:{crop_y},boxblur=12:2,drawbox=x=0:y=0:w=iw:h=ih:color=white@0.2:t=fill[glass_eff];"f"[main_vid][glass_eff]overlay=x={crop_x}:y={crop_y}[v_glass];")current_v_node = "[v_glass]"if str(sub_toggle).lower() == "on" and tts_sub_file and os.path.exists(tts_sub_file):safe_tts_sub = tts_sub_file.replace("\\", "/").replace(":", "\\:")v_complex += f"{current_v_node}subtitles='{safe_tts_sub}'[v_sub];"
app.py+24-23