diff --git a/server/app.py b/server/app.py
index 05237cf..8db4cc9 100644
--- a/server/app.py
+++ b/server/app.py
@@ -221,6 +221,11 @@ async def stream(job_id: str) -> StreamingResponse:
return
try:
if job.get("paste_state"): # ๐ ๋ถ์ฌ๋ฃ๊ธฐ ํญ(์ ํ๋ฆ) โ ์ด๋ฏธ ๋ถ์๋ ์ํ๋ก ๋๋ํํธ๋ง
+ # paste_draft ๋ manifest ๋ฅผ ๋ด์ง ์๋๋ค(analyze ์ชฝ์ด ์ด๋ฏธ ๋๋ ์คํ
๋ค๊ณผ
+ # ๋ณ๊ฐ ์คํธ๋ฆผ์ด๋ผ ์ฌ๊ธฐ์ ์๋ก ๋ด์ผ ํจ) โ ์ ๋ด๋ฉด step ์ด๋ฒคํธ๋ง ํ๋ก ์์
+ # ํ๋ฉด์ ์งํ ํ์๊ฐ ์์ ์ ๋ฌ๋ค.
+ yield _sse({"type": "manifest",
+ "steps": [{"id": "draft", "label": "ํ
ํ๋ฆฟ ๋๋ํํธ ์์ฑ"}]})
stream_iter = paste_draft(
job["paste_state"],
video_scale=job.get("video_scale", 1.0),
@@ -726,11 +731,15 @@ async def paste_stream(aid: str) -> StreamingResponse:
return
payload = a["payload"]
warnings: list[str] = []
- yield _sse({"type": "manifest", "steps": pipeline_paste_steps(True) +
+ # draft ์คํ
์ ์ด ๋จ๊ณ(analyze)์์ ์ ๋๋ค โ /paste/build ๋ ๋ณ๋ ์คํธ๋ฆผ์ผ๋ก ์คํ๋๋ฏ๋ก
+ # ์ฌ๊ธฐ manifest ์ ๋ฃ์ผ๋ฉด ์์ํ start ๊ฐ ์ ์ ํ๋ฉด์ ๋๊ธฐ ์ํ๋ก ๋ฉ์ถฐ ๋ณด์ธ๋ค.
+ yield _sse({"type": "manifest", "steps":
+ [s for s in pipeline_paste_steps(True) if s["id"] != "draft"] +
[{"id": "comments", "label": "๋๊ธ ์์ง (h-lab)"},
{"id": "recommend", "label": "์ปท๋ณ ๋๊ธ ์ถ์ฒ"}]})
com_task = asyncio.create_task(
asyncio.to_thread(hlab.fetch_comments, payload["url"]))
+ yield _sse({"type": "step", "id": "comments", "status": "start"})
state = None
try:
async for ev in paste_analyze(payload, "paste_" + aid,
@@ -767,12 +776,21 @@ async def paste_stream(aid: str) -> StreamingResponse:
# orig = ์๋ณธ ์์ ์๊ฐ(โญ ๋ถ:์ด ๋งค์นญ์ฉ). ์์ผ๋ฉด ์นด๋๊ฐ ํต์งธ๋ก ์ด๊ธ๋๋ค.
places = state["card_places"]
orig = [(s, e) for s, e, _, _ in state["cuts"]]
- cuts, need, ai_failed = await asyncio.to_thread(
- recommend.cuts_from_state, places, orig, state["bottom_caps"], comments)
- if ai_failed:
- warnings.append("AI ์ถ์ฒ ์คํจ(Gemini ์๋ต ์์) โ ๋ถ:์ดยท์๋ง๋จ์ดยท์ข์์๋ก ๋ฐฐ์ ํ์ต๋๋ค")
+ # ์์ ๋ฐ ์์ธ๊ฐ ๋๋ฉด(๊ฐ์ธ์ง ์์์ ๋) SSE ๊ฐ error ์ด๋ฒคํธ๋ ์์ด ๋๊ธฐ๊ณ
+ # PSTATES ๋ ์ ๋จ์ build ๊ฐ 404 ๋๋ค โ ์ถ์ฒ ์คํจ๊ฐ ๊ฒํ ํ๋ฉด ์์ฒด๋ฅผ ๋ง์ผ๋ฉด ์ ๋๋ค.
+ try:
+ cuts, need, ai_failed = await asyncio.to_thread(
+ recommend.cuts_from_state, places, orig, state["bottom_caps"], comments)
+ if ai_failed:
+ warnings.append("AI ์ถ์ฒ ์คํจ(Gemini ์๋ต ์์) โ ๋ถ:์ดยท์๋ง๋จ์ดยท์ข์์๋ก ๋ฐฐ์ ํ์ต๋๋ค")
+ except Exception as exc: # noqa: BLE001
+ # cuts=None(๋น ๋ฆฌ์คํธ ์๋)์ด์ด์ผ ํ๋ฉด์ด "์ปท 0๊ฐ"๋ก ๋น์ง ์๊ณ โญ/โ ํด๋ฐฑ
+ # ํ๋ฉด(์๋/๊ตฌ๊ฐ ํญ๊ณผ ๋์ผํ hl.cuts ์์ ๊ฒฝ๋ก)์ผ๋ก ๋์ด๊ฐ๋ค.
+ cuts, need = None, max(1, int(state["timeline_dur"] // 3))
+ warnings.append(f"์ปท๋ณ ์ถ์ฒ ์คํจ โ ์ปท ์ ๋ณด ์์ด ์งํํฉ๋๋ค ({type(exc).__name__}: {exc})")
yield _sse({"type": "step", "id": "recommend", "status": "done",
- "detail": f"{len(cuts)}์ปท ยท ์นด๋ {need}์ฅ"})
+ "detail": (f"{len(cuts)}์ปท ยท ์นด๋ {need}์ฅ" if cuts is not None
+ else f"ํด๋ฐฑ ยท ์นด๋ {need}์ฅ")})
PSTATES[aid] = {"state": state, "places": places, "orig": orig, "payload": payload}
no_ts = [c for c in comments if not c["times"]]
@@ -800,6 +818,7 @@ async def paste_build(
bg_white: str = Form(""),
cards_fixed: str = Form(""),
asr_bottom: str = Form("1"),
+ comments_dir: str = Form(""),
) -> JSONResponse:
"""๐ ๋ถ์ฌ๋ฃ๊ธฐ ํญ(์ ํ๋ฆ) 3๋จ๊ณ โ ๋ณด๊ดํ ์ํ๋ก ๋๋ํํธ๋ง ๋ง๋ ๋ค(๋ค์ด๋ก๋ยท๋ฐ์์ฐ๊ธฐ ๋ค์ ์ ํจ)."""
st = PSTATES.get(aid)
@@ -830,7 +849,9 @@ async def paste_build(
sig = (aid + "|" + card_cuts + "|" + video_scale + "|" + flip + "|" + scene + "|"
+ bg_white + "|" + cards_fixed + "|" + asr_bottom + "|" + str(len(cards)))
h = hashlib.sha1(sig.encode()).hexdigest()[:12]
- cdir = ""
+ # ์นด๋๊ฐ ์ค๋ฉด ํด๋ ์ง์ ๋ณด๋ค ์ฐ์ (/youtube ์ ๊ฐ์ ๊ท์น). ์นด๋๋ฅผ ํ๋๋ ์ ๊ณจ๋์ผ๋ฉด
+ # ํ๋ฉด์์ ๋์ด์จ ํด๋ ๊ฒฝ๋ก๋ฅผ ๊ทธ๋๋ก ์จ์ ์์ (ํด๋ ์ง์ ) ๋์์ผ๋ก ํ์ํธํํ๋ค.
+ cdir = comments_dir.strip()
if cards:
cdir = os.path.join(COMMENTS_DIR, h)
if os.path.isdir(cdir): # ์ฌ๋น๋ ์ ์ด์ ์นด๋ ์์ฌ ์ ๊ฑฐ
diff --git a/server/static/auto.js b/server/static/auto.js
index 729cda1..8899c56 100644
--- a/server/static/auto.js
+++ b/server/static/auto.js
@@ -21,8 +21,10 @@ function timeAgo(iso){
function esc(s){const d=document.createElement("div");d.textContent=String(s==null?"":s);return d.innerHTML;}
function fmtT(sec){const m=Math.floor(sec/60),s=Math.floor(sec%60);return m+":"+String(s).padStart(2,"0");}
let YT_HL=null; // ์ ํ๋ธ ๊ตฌ๊ฐ ํญ์ ๊ฐ์ ํ์ด๋ผ์ดํธ {id:"yt", need}
+let PASTE_HL=null; // ๐ ๋ถ์ฌ๋ฃ๊ธฐ ํญ์ ๊ฐ์ ํ์ด๋ผ์ดํธ {id:"paste", need, cuts, paste:{cuts}}
function hlById(id){
if(id==="yt") return YT_HL;
+ if(id==="paste") return PASTE_HL;
return A.highlights.find(h=>h.id===id);
}
@@ -910,6 +912,148 @@ window.ytCC={
},
};
+/* โโ ๐ ๋ถ์ฌ๋ฃ๊ธฐ ํญ: ๋ถ์ โ ๊ฒํ โ ์์ฑ โโ
+ ์๋ ํญ๊ณผ ๊ฐ์ ํ๋ฆ(analyzeโSSEโonResultโbuild)์ด์ง๋ง ํธ์ง์์ด ํ๋๋ฟ์ด๋ผ
+ ID ํญ์ด ์๋ค โ ํจ๋ ํ๋(panelId="paste")๋ง renderCutPanel ๋ก ๊ทธ๋ฆฐ๋ค. */
+let PASTE_AID=null;
+function pasteLog(m){
+ const d=document.createElement("div");
+ d.style.cssText="font-family:var(--mono);font-size:12px;color:var(--muted2);margin-top:4px;white-space:pre-wrap;";
+ d.textContent=m;$("#pasteLog").appendChild(d);
+}
+function renderPSteps(steps){
+ $("#pasteSteps").innerHTML=steps.map(s=>
+ '
').join("");
+ $("#pasteSteps").style.display="block";
+}
+function updatePStep(ev){
+ const el=$("#pst-"+ev.id);if(!el)return;
+ if(ev.status==="start"){el.classList.add("active");}
+ else if(ev.status==="done"){el.classList.remove("active");el.classList.add("done");
+ if(ev.detail){const d=el.querySelector(".sdetail");d.hidden=false;d.textContent=ev.detail;}}
+}
+function pasteDone(){$("#pasteGo").disabled=false;$("#pasteGo").textContent="๋๊ธ ๋งค์นญ ์์";}
+function pasteFail(m){pasteLog("โ ๏ธ "+m);pasteDone();}
+
+/* ์ปท๋ณ ์ถ์ฒ ๊ฒฐ๊ณผ๋ฅผ renderCutPanel ๋ก ๊ทธ๋ฆฐ๋ค. hlbox-paste ๋ wrapOfยทclearSearchยท
+ expandAllCutsยทrefreshSel ์ด ์ ๋ถ "#hlbox-"+panelId ๋ก ์ฐพ์ผ๋ฏ๋ก id๋ฅผ ์ ํํ ๋ง์ถฐ์ผ ํ๋ค
+ (yt ํญ์ #hlbox-yt ์ ๋์ผํ ๋ฐฉ์). */
+function onPasteResult(ev){
+ byIdx={};(ev.comments||[]).forEach(c=>{byIdx[c.idx]=c;});
+ (ev.warnings||[]).forEach(w=>pasteLog("โ ๏ธ "+w));
+ PASTE_HL={id:"paste",need:ev.need,cuts:ev.cuts,paste:{cuts:ev.cutRanges}};
+ sel["paste"]=[];selCut["paste"]={};
+ // ์ปท๋ณ ์ถ์ฒ ์คํจ ์(ev.cuts=null) ์๋ ํญ ํด๋ฐฑ๊ณผ ๋์ผํ๊ฒ ๋งค์นญ ๋๊ธ๋ก ์๋ ์ ํ
+ if(ev.cuts){
+ ev.cuts.forEach(cu=>{
+ for(const p of (cu.picks||[]))
+ if(byIdx[p.idx]!==undefined&&!sel["paste"].includes(p.idx)){
+ sel["paste"].push(p.idx);selCut["paste"][p.idx]=cu.i;
+ }
+ });
+ }else{
+ sel["paste"]=(ev.matched||[]).slice(0,ev.need).filter(i=>byIdx[i]!==undefined);
+ }
+ const area=$("#pasteReview");area.innerHTML="";
+ const box=document.createElement("div");
+ box.className="hlbox show";box.id="hlbox-paste";
+ box.innerHTML='์ปท '+(ev.cuts||[]).length+"๊ฐ ยท ์ด "+
+ (ev.total!=null?ev.total:0)+"์ด ยท ์นด๋ "+ev.need+"์ฅ ํ์ ยท "+
+ '
'+
+ '';
+ renderCutPanel(box,"paste",
+ {cuts:ev.cuts,matched:ev.matched,candidates:ev.candidates,cutRanges:ev.cutRanges},
+ {unit:"์ปท"});
+ area.appendChild(box);
+ refreshSel("paste");
+ $("#pasteBuild").style.display="block";
+}
+
+function pasteAnalyze(){
+ const txt=$("#pjson").value.trim();
+ if(!txt){alert("ํธ์ง์ JSON์ ๋ถ์ฌ๋ฃ์ผ์ธ์.");return;}
+ const btn=$("#pasteGo");
+ btn.disabled=true;btn.textContent="๋ถ์ ์คโฆ";
+ $("#pasteReview").innerHTML="";$("#pasteSummary").style.display="none";
+ $("#pasteBuild").style.display="none";$("#pasteLog").innerHTML="";
+ $("#pasteBoard").style.display="none";$("#pasteBoard").innerHTML="";
+ const fd=new FormData();fd.append("data",txt);
+ fetch("/paste/analyze",{method:"POST",body:fd}).then(r=>r.json()).then(res=>{
+ if(res.error){pasteFail(res.error);return;}
+ PASTE_AID=res.analysis_id;
+ const es=new EventSource("/paste/stream/"+PASTE_AID);
+ es.onmessage=(m)=>{
+ const ev=JSON.parse(m.data);
+ if(ev.type==="manifest") renderPSteps(ev.steps);
+ else if(ev.type==="step") updatePStep(ev);
+ else if(ev.type==="log") pasteLog(ev.msg);
+ else if(ev.type==="result"){es.close();onPasteResult(ev);pasteDone();}
+ else if(ev.type==="error"){es.close();pasteFail(ev.message);}
+ };
+ es.onerror=()=>{es.close();pasteFail("์ฐ๊ฒฐ์ด ๋๊ฒผ์ต๋๋ค.");};
+ }).catch(e=>pasteFail("์์ฒญ ์คํจ: "+e));
+}
+
+/* โโ ์์ฑ โ ์๋ ํญ buildAll์ ์บก์ฒ ๋ฃจํ๋ฅผ ๊ทธ๋๋ก ๋ฐ๋ฅธ๋ค(์บก์ฒ ํจ์ 3์ข
๋ฐฉ์ด ํฌํจ). โโ
+ ์นด๋๋ฅผ ํ๋๋ ๋ชป ๋ณด๋ด๋ฉด(๊ณ ๋ฅด์ง ์์๊ฑฐ๋ ์บก์ฒ ์ ๋ถ ์คํจ) ์์ ์ฒ๋ผ ํด๋ ์ง์ ์ผ๋ก
+ ํ์ํธํํ๋ค โ comments_dir ํ๋๋ฅผ ๊ทธ๋๋ก ๋๊ธด๋ค. */
+async function pasteBuildAll(){
+ if(!PASTE_AID) return;
+ const btn=$("#pasteBuild");
+ btn.disabled=true;
+ $("#pasteBoard").innerHTML=''+
+ '๐ ๋ถ์ฌ๋ฃ๊ธฐโณ ๋๊ธฐ'+
+ '
';
+ $("#pasteBoard").style.display="block";
+ $("#pasteBoard").scrollIntoView({behavior:"smooth",block:"nearest"});
+ clearSearch("paste"); // ๊ฒ์ ์ค์ด๋ฉด ์นด๋๊ฐ DOM์์ ๋น ์ ธ ์บก์ฒ๊ฐ ๋๋ฝ๋จ
+ expandAllCuts("paste"); // ์ ํ ์ปท ์น์
์ ์นด๋๋ ๋น ์ด๋ฏธ์ง๋ก ์บก์ฒ๋๋ค
+ const pbox=$("#hlbox-paste");
+ if(pbox) pbox.classList.remove("selonly"); // ๋ฐฐ์ ์ ๋ ์๋ฅ์ด๊ฐ ์จ๋ ๊ฒ ๋ฐฉ์ง
+ await nextFrame();
+ boardSet("paste","๐ ์งํ","","active");
+ try{
+ const fd=new FormData();
+ fd.append("aid",PASTE_AID);
+ fd.append("video_scale",$("#vscale").value||"144");
+ fd.append("flip",$("#flip").checked?"1":"0");
+ fd.append("scene",$("#scene").checked?"1":"0");
+ fd.append("bg_white",$("#bgwhite").checked?"1":"0");
+ fd.append("asr_bottom",$("#asrbottom").checked?"1":"0");
+ const cmap=selCut["paste"]||{};
+ const selList=sel["paste"]||[];
+ let n=0; const sentCuts=[];
+ for(const idx of selList){
+ const ci=cmap[idx];
+ const w=wrapOf("paste",idx,ci);
+ if(!w) continue;
+ if(PASTE_HL.cuts&&ci===undefined) continue; // ์ปท ์์ ๋ชจ๋ฅด๋ ์นด๋๋ ๊ฑด๋๋
+ boardSet("paste",null,"์นด๋ ์บก์ฒ ์คโฆ "+(++n)+"/"+selList.length,"active");
+ try{
+ const blob=await captureCard(w);
+ // โ append ์ push ๋ ๋ฐ๋์ ์์ผ๋ก โ ํ๋๋ง ๋๋ฉด ์นด๋๊ฐ ํต์งธ๋ก ์๋ฑํ ์ปท์ ๋ถ๋๋ค
+ fd.append("cards",blob,String(n).padStart(3,"0")+".png");
+ sentCuts.push(ci);
+ }catch(e){n--;boardSet("paste",null,"์นด๋ 1์ฅ ์บก์ฒ ์คํจ(๊ฑด๋๋)","active");}
+ }
+ if(PASTE_HL.cuts) fd.append("card_cuts",JSON.stringify(sentCuts));
+ if(n===0) fd.append("comments_dir",$("#cdir").value.trim()); // ์นด๋ ์์ โ ํด๋ ์ง์ ํ์ํธํ
+ boardSet("paste",null,"๋น๋ ์์ฒญ ์คโฆ","active");
+ const res=await(await fetch("/paste/build",{method:"POST",body:fd})).json();
+ if(res.error) throw new Error(res.error);
+ const r=await streamJob(res.job_id,"paste");
+ boardSet("paste","โ
์๋ฃ",(r&&r.draft_name)?r.draft_name:"","");
+ const s=$("#pasteSummary");s.style.display="block";
+ s.textContent="์๋ฃ โ CapCut ํ๋ก์ ํธ ๋ชฉ๋ก์์ ๋๋ํํธ๋ฅผ ์ฌ์ธ์.";
+ if($("#autoopen")&&$("#autoopen").checked) fetch("/open-capcut",{method:"POST"});
+ }catch(e){
+ boardSet("paste","โ ์คํจ",String(e.message||e),"err");
+ }
+ btn.disabled=false;btn.textContent="๋ค์ ๋ง๋ค๊ธฐ";
+}
+
/* โโ โ ์ง์นจยท๋ชจ๋ธ ์ค์ โโ */
async function loadPrompts(){
try{
@@ -945,5 +1089,7 @@ document.addEventListener("DOMContentLoaded",()=>{
$("#pSave").addEventListener("click",()=>savePrompts(false));
$("#pReset").addEventListener("click",()=>savePrompts(true));
if($("#ytccBtn")) $("#ytccBtn").addEventListener("click",ytMatch);
+ if($("#pasteGo")) $("#pasteGo").addEventListener("click",pasteAnalyze);
+ if($("#pasteBuild")) $("#pasteBuild").addEventListener("click",pasteBuildAll);
});
})();
diff --git a/server/static/index.html b/server/static/index.html
index dc48226..109b1de 100644
--- a/server/static/index.html
+++ b/server/static/index.html
@@ -162,7 +162,7 @@
.comment-card.mosaic .cc-avatar{filter:blur(6px);}
.comment-card.mosaic .cc-author{filter:blur(5px);}
/* ๊ฒํ ํ๋ฉด โ ๋ณธ๋ฌธ 600px ์ ์ง, ๊ฒํ ์์ญ๋ง ์์ด๋ ๋ธ๋ ์ดํฌ์์(๋๊ธ ์นด๋ 3~4์ด) */
- #autoReview,#autoSummary,#ytccArea{--rw:min(1240px,calc(100vw - 40px));
+ #autoReview,#autoSummary,#ytccArea,#pasteReview,#pasteSummary{--rw:min(1240px,calc(100vw - 40px));
width:var(--rw);margin-left:calc((100% - var(--rw))/2);}
/* ID ํญ ๋ฐ โ ์คํฌ๋กคํด๋ ์์ ๋ถ์ด ์์ */
.idtabs{position:sticky;top:0;z-index:40;display:flex;gap:6px;flex-wrap:wrap;
@@ -393,8 +393,16 @@
style="width:100%;box-sizing:border-box;background:var(--surf2);color:var(--text);border:1px solid var(--border);border-radius:8px;padding:11px;font-family:var(--mono);font-size:12.5px;line-height:1.5;resize:vertical;"
placeholder='{
"url": "https://www.youtube.com/watch?v=โฆ",
"title_top": "์๋ธ์ ๋ชฉ", "title_main": "๋ฉ์ธ์ ๋ชฉ", "channel": "@์ฑ๋",
"cuts": [
{"start":"0:01.0","end":"0:03.5","bottom":"ํ๋จ ์๋ง\n๋ ์ค","effect":"๊ด์ํ๊ฐ"},
{"start":"2:33.5","end":"2:36.5","bottom":"๋ค์ ์ปท ์๋ง","effect":"๊ณตํฌ์ํต๊ณ"}
]
}'>
- ํ URL์ ์ฌ๋ฌ ์ปท + ์๋ง์ ๊ทธ๋๋ก ์ฌ์ฉํฉ๋๋ค(๋ฌด์์ปทยท๋ฐ์์ฐ๊ธฐ ์์). ์ปท์ ์์๋๋ก ์ด์ด๋ถ๊ณ , ๋ฐฐ์น ์๊ฐ์ ์๋ ๊ณ์ฐ๋ผ์. bottom=ํ๋จ์๋ง, effect=์ค์ ํจ๊ณผ์๋ง(ํ๋จ ๋ฐ๋ก ์).
+ ํ URL์ ์ฌ๋ฌ ์ปท + ์๋ง์ ๊ทธ๋๋ก ์ฌ์ฉํฉ๋๋ค. ์ปท์ ์์๋๋ก ์ด์ด๋ถ๊ณ , ๋ฐฐ์น ์๊ฐ์ ์๋ ๊ณ์ฐ๋ผ์. bottom=ํ๋จ์๋ง, effect=์ค์ ํจ๊ณผ์๋ง(ํ๋จ ๋ฐ๋ก ์). ๋ฌด์ ์ ๊ฑฐยท๋ฐ์์ฐ๊ธฐ(Whisper)๋ ๋๊ธ ๋งค์นญ์ ์ํด ํญ์ ์ ์ฉ๋ฉ๋๋ค.
+
+
+
+
+
+
+
+
@@ -500,7 +508,7 @@
๋ฐฐ๊ฒฝ ํฐ์ (์์๋ ๋ ยท๋น ๊ณณ์ ํฐ์์ผ๋ก)
-
+
@@ -575,7 +583,9 @@ function setMode(m){
$("#commonFields").style.display="grid";
$("#titleGroup").style.display=(m==="paste"||m==="auto")?"none":"block";
$("#cdirField").style.display=m==="auto"?"none":"block";
- $("#run").style.display=m==="auto"?"none":"block"; // ์๋ ํญ์ ์์ฒด ๋ฒํผ ์ฌ์ฉ
+ $("#run").style.display=(m==="auto"||m==="paste")?"none":"block"; // ์๋ยท๋ถ์ฌ๋ฃ๊ธฐ ํญ์ ์์ฒด ๋ฒํผ ์ฌ์ฉ
+ // ๋ถ์ฌ๋ฃ๊ธฐ ํญ์ ๋๊ธ ๋งค์นญ์ ์ํด ๋ฌด์ ์ ๊ฑฐ๊ฐ ํญ์ ์ผ์ง๋ค โ ๋ ์ ์๋ ๊ฒ์ฒ๋ผ ๋ณด์ด๋ฉด ์ ๋จ
+ $("#rmsilenceField").style.display=m==="paste"?"none":"block";
}
$("#tab-file").addEventListener("click",()=>setMode("file"));
$("#tab-yt").addEventListener("click",()=>setMode("yt"));
@@ -611,7 +621,8 @@ yt:`
โถ ์ ํ๋ธ ๊ตฌ๊ฐ ํญ ์ฌ์ฉ๋ฒ
paste:`
๐ ๋ถ์ฌ๋ฃ๊ธฐ ํญ ์ฌ์ฉ๋ฒ
- LLM(AI Studio ๋ฑ)์๊ฒ ์๋ ํ์์ JSON ํ๋๋ฅผ ๋ฐ์ ๋ถ์ฌ๋ฃ๊ธฐ
-- ํธ์ง ์์ โ ์ปท ์ ๋ฐ ๋ค์ด๋ก๋ยท๋ณํฉ โ ์๋ง โ CapCut
+- ๋๊ธ ๋งค์นญ ์์ โ ์ปท ์ ๋ฐ ๋ค์ด๋ก๋ยท๋ณํฉ โ ๋ฌด์ ์ ๊ฑฐ โ ๋ฐ์์ฐ๊ธฐ โ h-lab ๋๊ธ ๋งค์นญ
+- ์ปท๋ง๋ค ์ถ์ฒ๋ ๋๊ธ ์นด๋๋ฅผ ํ์ธยท์ ํํ๊ณ ์ ํํ ์นด๋๋ก ๋๋ํํธ ๋ง๋ค๊ธฐ
{
"url": "https://www.youtube.com/watch?v=์ค์ ID",
@@ -625,10 +636,11 @@ paste:`๐ ๋ถ์ฌ๋ฃ๊ธฐ ํญ ์ฌ์ฉ๋ฒ
- url์ ์ค์ ์์ ์ฃผ์ โ LLM์ด ์ง์ด๋ธ ID๋ ์คํจ
- ๋ฐฐ์น ์๊ฐ์ ๋ฃ์ง ๋ง์ธ์ โ ์ปท ์์๋๋ก ์๋ ๊ณ์ฐ
+- ๋ฌด์ ์ ๊ฑฐยท๋ฐ์์ฐ๊ธฐ(Whisper)๋ ๋๊ธ ๋งค์นญ์ ์ํด ํญ์ ์ ์ฉ๋ฉ๋๋ค(๋ ์ ์์)
- ํ๋จ ์๋ง ์๋ ์์ฑ(Whisper) ์ผ์ง: bottom ๋ฌด์, ์ค์ ๋ง ํ์ด๋ฐ ์๋ง ์์ฑ(์ถ์ฒ)
-- ๋๋ฉด: bottom ์ฌ์ฉ, \\n ์ ์๊ฐ ๋ฐ์ฉ ๋๋ ์์คโ์๋ซ์ค
-- effect: ์ค์ ๋
น์ ํจ๊ณผ์๋ง ยท ๋๊ธ ์นด๋: ํด๋ ์ง์ ์ 3์ด๋ง๋ค 1์ฅ
-- ๋ฌด์ ์ ๊ฑฐ ์ผ๋ฉด ์ปท ์์ ๋ฌด์๊น์ง ์ปท(์๋ง ์๋ ๋ณด์ )
+- ๋๋ฉด(๋๋ํํธ ๋ง๋ค๊ธฐ ๋จ๊ณ): bottom ์ฌ์ฉ, \\n ์ ์๊ฐ ๋ฐ์ฉ ๋๋ ์์คโ์๋ซ์ค
+- effect: ์ค์ ๋
น์ ํจ๊ณผ์๋ง
+- ๋๊ธ ์นด๋: ์ปท๋ณ ์ถ์ฒ์์ ์นด๋๋ฅผ ํ๋๋ ์ ๊ณ ๋ฅด๋ฉด ์์ ์ฒ๋ผ ๋๊ธ ์นด๋ ํด๋ ์ง์ ์ผ๋ก ๋์(3์ด๋ง๋ค 1์ฅ)
ํค๋์ โจ AI Studio์์ JSON ์์ฑ, ๐ฌ ๋๊ธ ์นด๋์์ ์นด๋ ์ ์ฅ.
`};
const overlay=$("#helpOverlay");
@@ -756,22 +768,7 @@ runBtn.addEventListener("click",async()=>{
catch(e){return fail("์์ฒญ ์คํจ: "+e);}
if(res&&res.error){return fail(res.error);}
}
- if(mode==="paste"){
- const txt=$("#pjson").value.trim();
- if(!txt){addLog("ํธ์ง์ JSON์ ๋ถ์ฌ๋ฃ์ผ์ธ์.");return;}
- runBtn.disabled=true;runBtn.textContent="์ฒ๋ฆฌ ์คโฆ";
- const fd=new FormData();fd.append("data",txt);
- fd.append("video_scale",$("#vscale").value||"144");
- fd.append("flip",$("#flip").checked?"1":"0");
- fd.append("scene",$("#scene").checked?"1":"0");
- fd.append("comments_dir",$("#cdir").value.trim());
- fd.append("bg_white",$("#bgwhite").checked?"1":"0");
- fd.append("remove_silence",$("#rmsilence").checked?"1":"0");
- fd.append("asr_bottom",$("#asrbottom").checked?"1":"0");
- try{res=await(await fetch("/paste",{method:"POST",body:fd})).json();}
- catch(e){return fail("์์ฒญ ์คํจ: "+e);}
- if(res&&res.error){return fail(res.error);}
- }
+ // ๐ ๋ถ์ฌ๋ฃ๊ธฐ ํญ์ ์์ฒด ๋ฒํผ(#pasteGo โ #pasteBuild, auto.js)์ผ๋ก ๋๋ฏ๋ก ์ฌ๊ธฐ ์ ์ด.
runBtn.textContent="์ฒ๋ฆฌ ์คโฆ";
runStream(res.job_id);
});