Compare commits
No commits in common. "e1386b891e89f9b49abe408588d7d89c5cce4d4e" and "8c7893d9890b6a9039857b90938e309364f620b1" have entirely different histories.
e1386b891e
...
8c7893d989
|
|
@ -147,49 +147,6 @@ text_template_h_1 = {
|
|||
]
|
||||
}
|
||||
|
||||
autotext_template_v_1 = {
|
||||
"type": "text",
|
||||
"track": 4,
|
||||
"time": 0,
|
||||
"y": "87.9086%",
|
||||
"width": "100%",
|
||||
"height": "40%",
|
||||
"x_alignment": "50%",
|
||||
"y_alignment": "50%",
|
||||
"font_family": "Noto Sans",
|
||||
"font_weight": "700",
|
||||
"font_size": "8 vmin",
|
||||
"background_color": "rgba(216,216,216,0)",
|
||||
"background_x_padding": "33%",
|
||||
"background_y_padding": "7%",
|
||||
"background_border_radius": "28%",
|
||||
"transcript_source": "audio-music", # audio-music과 연동됨
|
||||
"transcript_effect": "karaoke",
|
||||
"fill_color": "#ffffff",
|
||||
"stroke_color": "rgba(51,51,51,1)",
|
||||
"stroke_width": "0.6 vmin"
|
||||
}
|
||||
autotext_template_h_1 = {
|
||||
"type": "text",
|
||||
"track": 4,
|
||||
"time": 0,
|
||||
"x": "10%",
|
||||
"y": "83.2953%",
|
||||
"width": "80%",
|
||||
"height": "15%",
|
||||
"x_anchor": "0%",
|
||||
"y_anchor": "0%",
|
||||
"x_alignment": "50%",
|
||||
"font_family": "Noto Sans",
|
||||
"font_weight": "700",
|
||||
"font_size": "5.9998 vmin",
|
||||
"transcript_source": "audio-music",
|
||||
"transcript_effect": "karaoke",
|
||||
"fill_color": "#ffffff",
|
||||
"stroke_color": "#333333",
|
||||
"stroke_width": "0.2 vmin"
|
||||
}
|
||||
|
||||
async def get_shared_client() -> httpx.AsyncClient:
|
||||
"""공유 HTTP 클라이언트를 반환합니다. 없으면 생성합니다."""
|
||||
global _shared_client
|
||||
|
|
@ -737,9 +694,6 @@ class CreatomateService:
|
|||
text_scene["elements"][0]["text"] = lyric_text
|
||||
return text_scene
|
||||
|
||||
def auto_lyric(self, auto_text_template : dict):
|
||||
text_scene = copy.deepcopy(auto_text_template)
|
||||
return text_scene
|
||||
|
||||
def get_text_template(self):
|
||||
match self.orientation:
|
||||
|
|
@ -748,10 +702,3 @@ class CreatomateService:
|
|||
case "horizontal":
|
||||
return text_template_h_1
|
||||
|
||||
def get_auto_text_template(self):
|
||||
match self.orientation:
|
||||
case "vertical":
|
||||
return autotext_template_v_1
|
||||
case "horizontal":
|
||||
return autotext_template_h_1
|
||||
|
||||
|
|
|
|||
|
|
@ -41,8 +41,6 @@ from app.video.schemas.video_schema import (
|
|||
)
|
||||
from app.video.worker.video_task import download_and_upload_video_to_blob
|
||||
|
||||
from config import creatomate_settings
|
||||
|
||||
logger = get_logger("video")
|
||||
|
||||
router = APIRouter(prefix="/video", tags=["Video"])
|
||||
|
|
@ -350,11 +348,6 @@ async def generate_video(
|
|||
f"[generate_video] timestamp[{i}]: lyric_line={ts.lyric_line}, start_time={ts.start_time}, end_time={ts.end_time}"
|
||||
)
|
||||
|
||||
# LYRIC AUTO 결정부
|
||||
if (creatomate_settings.DEBUG_AUTO_LYRIC):
|
||||
auto_text_template = creatomate_service.get_auto_text_template()
|
||||
final_template["source"]["elements"].append(creatomate_service.auto_lyric(auto_text_template))
|
||||
else :
|
||||
text_template = creatomate_service.get_text_template()
|
||||
for idx, aligned in enumerate(song_timestamp_list):
|
||||
caption = creatomate_service.lining_lyric(
|
||||
|
|
@ -365,7 +358,7 @@ async def generate_video(
|
|||
aligned.end_time,
|
||||
)
|
||||
final_template["source"]["elements"].append(caption)
|
||||
# END - LYRIC AUTO 결정부
|
||||
|
||||
# logger.debug(
|
||||
# f"[generate_video] final_template: {json.dumps(final_template, indent=2, ensure_ascii=False)}"
|
||||
# )
|
||||
|
|
|
|||
Loading…
Reference in New Issue