Initial commit: ADO2 Hookit — 8초 후킹 숏폼 생성 파이프라인
3-엔진 오케스트레이션(Claude → Higgsfield → Remotion) PoC + 셀프 웹앱. 백엔드 개발자 핸드오프 문서(HANDOFF.md) 포함. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
commit
4deefff061
50 files changed
+5962
No files matched your search
Generated
+2907
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "@ado2/higgsfield-remotion",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"description": "ADO2 Higgsfield Shorts — Remotion 자막·타이틀 오버레이 합성",
|
||||
"scripts": {
|
||||
"studio": "remotion studio",
|
||||
"render": "remotion render MumumShort out/mumum-poc2-final.mp4",
|
||||
"upgrade": "remotion upgrade"
|
||||
},
|
||||
"dependencies": {
|
||||
"@remotion/cli": "4.0.468",
|
||||
"@remotion/google-fonts": "4.0.468",
|
||||
"remotion": "4.0.468",
|
||||
"react": "19.2.0",
|
||||
"react-dom": "19.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "19.2.0",
|
||||
"typescript": "5.7.3"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
import { Config } from "@remotion/cli/config";
|
||||
|
||||
Config.setVideoImageFormat("jpeg");
|
||||
Config.setOverwriteOutput(true);
|
||||
// H.264 + AAC, 모바일 9:16 Shorts/Reels 호환
|
||||
Config.setCodec("h264");
|
||||
@@ -0,0 +1,58 @@
|
||||
import React from "react";
|
||||
import { AbsoluteFill, OffthreadVideo, Sequence, staticFile } from "remotion";
|
||||
import { ShortProps } from "./data/types";
|
||||
import { HookTitle } from "./components/HookTitle";
|
||||
import { BrandLines } from "./components/BrandLines";
|
||||
import { SellingBadge } from "./components/SellingBadge";
|
||||
import { EndCard } from "./components/EndCard";
|
||||
|
||||
// Higgsfield 완성본을 배경으로 깔고(오디오 포함), 자막/타이틀만 오버레이.
|
||||
// 모든 콘텐츠는 props로 주입 (펜션/제품마다 교체).
|
||||
export const MumumShort: React.FC<ShortProps> = ({
|
||||
videoSrc,
|
||||
hook,
|
||||
sellingPoint,
|
||||
brandLines,
|
||||
endCard,
|
||||
}) => {
|
||||
return (
|
||||
<AbsoluteFill style={{ backgroundColor: "black" }}>
|
||||
<OffthreadVideo
|
||||
src={staticFile(videoSrc)}
|
||||
style={{ width: "100%", height: "100%", objectFit: "cover" }}
|
||||
/>
|
||||
|
||||
{/* 상단 후킹 타이틀 */}
|
||||
<Sequence from={hook.fromFrame} durationInFrames={hook.toFrame - hook.fromFrame}>
|
||||
<HookTitle
|
||||
eyebrow={hook.eyebrow}
|
||||
title={hook.title}
|
||||
fromFrame={0}
|
||||
toFrame={hook.toFrame - hook.fromFrame}
|
||||
/>
|
||||
</Sequence>
|
||||
|
||||
{/* 셀링포인트: 3개 독립 박스 */}
|
||||
<SellingBadge
|
||||
items={sellingPoint.items}
|
||||
fromFrame={sellingPoint.fromFrame}
|
||||
toFrame={sellingPoint.toFrame}
|
||||
/>
|
||||
|
||||
{/* 브랜드 감성 2줄 (상단 중앙) */}
|
||||
<BrandLines
|
||||
lines={brandLines.lines}
|
||||
fromFrame={brandLines.fromFrame}
|
||||
toFrame={brandLines.toFrame}
|
||||
/>
|
||||
|
||||
{/* 엔드카드 + AI 디스클로저 */}
|
||||
<EndCard
|
||||
brand={endCard.brand}
|
||||
location={endCard.location}
|
||||
disclosure={endCard.disclosure}
|
||||
fromFrame={endCard.fromFrame}
|
||||
/>
|
||||
</AbsoluteFill>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,25 @@
|
||||
import React from "react";
|
||||
import { Composition } from "remotion";
|
||||
import { MumumShort } from "./MumumShort";
|
||||
import { defaultProps } from "./data/mumum";
|
||||
|
||||
export const RemotionRoot: React.FC = () => {
|
||||
return (
|
||||
<Composition
|
||||
id="MumumShort"
|
||||
component={MumumShort}
|
||||
defaultProps={defaultProps}
|
||||
durationInFrames={defaultProps.durationInFrames}
|
||||
fps={defaultProps.fps}
|
||||
width={defaultProps.width}
|
||||
height={defaultProps.height}
|
||||
// props(영상 크기·길이)로 메타데이터 동적 설정 → 한 컴포지션이 모든 job 처리
|
||||
calculateMetadata={({ props }) => ({
|
||||
durationInFrames: props.durationInFrames,
|
||||
fps: props.fps,
|
||||
width: props.width,
|
||||
height: props.height,
|
||||
})}
|
||||
/>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,58 @@
|
||||
import React from "react";
|
||||
import { useCurrentFrame, interpolate, AbsoluteFill } from "remotion";
|
||||
import { serifFont } from "../fonts";
|
||||
|
||||
// 브랜드 감성 2줄: 우상단 통일 위치에 한 덩어리로 쌓아 노출.
|
||||
// 첫 줄 먼저, 둘째 줄 살짝 뒤따라 등장 → 같은 자리에서 읽힘.
|
||||
export const BrandLines: React.FC<{
|
||||
lines: string[];
|
||||
fromFrame: number;
|
||||
toFrame: number;
|
||||
}> = ({ lines, fromFrame, toFrame }) => {
|
||||
const frame = useCurrentFrame();
|
||||
const LINE_STAGGER = 18; // 줄 간 등장 간격(frame)
|
||||
|
||||
return (
|
||||
<AbsoluteFill
|
||||
style={{
|
||||
justifyContent: "flex-start",
|
||||
alignItems: "center", // 가로 중앙 정렬
|
||||
flexDirection: "column",
|
||||
paddingTop: 230, // 상단 (~18%) 높이 유지
|
||||
gap: 8,
|
||||
}}
|
||||
>
|
||||
{lines.map((line, i) => {
|
||||
const start = fromFrame + i * LINE_STAGGER;
|
||||
const opacity = interpolate(
|
||||
frame,
|
||||
[start, start + 12, toFrame - 12, toFrame],
|
||||
[0, 1, 1, 0],
|
||||
{ extrapolateLeft: "clamp", extrapolateRight: "clamp" },
|
||||
);
|
||||
const rise = interpolate(frame, [start, start + 16], [16, 0], {
|
||||
extrapolateLeft: "clamp",
|
||||
extrapolateRight: "clamp",
|
||||
});
|
||||
return (
|
||||
<div
|
||||
key={i}
|
||||
style={{
|
||||
opacity,
|
||||
transform: `translateY(${rise}px)`,
|
||||
fontFamily: serifFont,
|
||||
fontWeight: 700,
|
||||
fontSize: 46,
|
||||
color: "#FFFFFF",
|
||||
textAlign: "center",
|
||||
letterSpacing: 1,
|
||||
textShadow: "0 2px 16px rgba(0,0,0,0.85)",
|
||||
}}
|
||||
>
|
||||
{line}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</AbsoluteFill>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,91 @@
|
||||
import React from "react";
|
||||
import {
|
||||
useCurrentFrame,
|
||||
useVideoConfig,
|
||||
interpolate,
|
||||
spring,
|
||||
AbsoluteFill,
|
||||
} from "remotion";
|
||||
import { serifFont } from "../fonts";
|
||||
|
||||
// 엔드카드: 브랜드 + 위치 + AI 디스클로저 (가드레일 필수)
|
||||
export const EndCard: React.FC<{
|
||||
brand: string;
|
||||
location: string;
|
||||
disclosure: string;
|
||||
fromFrame: number;
|
||||
}> = ({ brand, location, disclosure, fromFrame }) => {
|
||||
const frame = useCurrentFrame();
|
||||
const { fps } = useVideoConfig();
|
||||
|
||||
const appear = interpolate(frame, [fromFrame, fromFrame + 12], [0, 1], {
|
||||
extrapolateLeft: "clamp",
|
||||
extrapolateRight: "clamp",
|
||||
});
|
||||
const brandSpring = spring({
|
||||
frame: frame - fromFrame,
|
||||
fps,
|
||||
config: { damping: 200, mass: 0.5 },
|
||||
});
|
||||
const brandScale = interpolate(brandSpring, [0, 1], [0.92, 1]);
|
||||
|
||||
return (
|
||||
<AbsoluteFill
|
||||
style={{
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
// 하단을 살짝 어둡게 덮어 브랜드 가독성 확보
|
||||
background: `rgba(0,0,0,${0.42 * appear})`,
|
||||
opacity: appear,
|
||||
}}
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
alignItems: "center",
|
||||
transform: `scale(${brandScale})`,
|
||||
}}
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
fontFamily: serifFont,
|
||||
fontWeight: 800,
|
||||
fontSize: 76,
|
||||
color: "#FFFFFF",
|
||||
letterSpacing: 1,
|
||||
textShadow: "0 3px 20px rgba(0,0,0,0.7)",
|
||||
}}
|
||||
>
|
||||
{brand}
|
||||
</div>
|
||||
<div
|
||||
style={{
|
||||
fontFamily: serifFont,
|
||||
fontWeight: 400,
|
||||
fontSize: 30,
|
||||
color: "#FFE9C7",
|
||||
marginTop: 18,
|
||||
letterSpacing: 2,
|
||||
}}
|
||||
>
|
||||
{location}
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
style={{
|
||||
position: "absolute",
|
||||
bottom: 70,
|
||||
fontFamily: serifFont,
|
||||
fontWeight: 400,
|
||||
fontSize: 19,
|
||||
color: "rgba(255,255,255,0.72)",
|
||||
textAlign: "center",
|
||||
padding: "0 40px",
|
||||
}}
|
||||
>
|
||||
{disclosure}
|
||||
</div>
|
||||
</AbsoluteFill>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,90 @@
|
||||
import React from "react";
|
||||
import {
|
||||
useCurrentFrame,
|
||||
useVideoConfig,
|
||||
interpolate,
|
||||
spring,
|
||||
AbsoluteFill,
|
||||
} from "remotion";
|
||||
import { hookFont } from "../fonts";
|
||||
|
||||
export const HookTitle: React.FC<{
|
||||
eyebrow: string;
|
||||
title: string;
|
||||
fromFrame: number;
|
||||
toFrame: number;
|
||||
}> = ({ eyebrow, title, fromFrame, toFrame }) => {
|
||||
const frame = useCurrentFrame();
|
||||
const { fps } = useVideoConfig();
|
||||
|
||||
// 스프링 슬라이드-다운 등장
|
||||
const enter = spring({
|
||||
frame: frame - fromFrame,
|
||||
fps,
|
||||
config: { damping: 200, mass: 0.6 },
|
||||
});
|
||||
const translateY = interpolate(enter, [0, 1], [-60, 0]);
|
||||
// 퇴장 페이드
|
||||
const opacity = interpolate(
|
||||
frame,
|
||||
[fromFrame, fromFrame + 8, toFrame - 12, toFrame],
|
||||
[0, 1, 1, 0],
|
||||
{ extrapolateLeft: "clamp", extrapolateRight: "clamp" },
|
||||
);
|
||||
|
||||
return (
|
||||
<AbsoluteFill style={{ opacity }}>
|
||||
{/* 상단 가독성 그라데이션 */}
|
||||
<div
|
||||
style={{
|
||||
position: "absolute",
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
height: 580,
|
||||
background:
|
||||
"linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 100%)",
|
||||
}}
|
||||
/>
|
||||
<div
|
||||
style={{
|
||||
position: "absolute",
|
||||
top: 280,
|
||||
left: 0,
|
||||
right: 0,
|
||||
transform: `translateY(${translateY}px)`,
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
alignItems: "center",
|
||||
padding: "0 48px",
|
||||
textAlign: "center",
|
||||
}}
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
fontFamily: hookFont,
|
||||
fontSize: 34,
|
||||
color: "#FFE9C7",
|
||||
letterSpacing: 2,
|
||||
marginBottom: 14,
|
||||
textShadow: "0 2px 12px rgba(0,0,0,0.7)",
|
||||
}}
|
||||
>
|
||||
{eyebrow}
|
||||
</div>
|
||||
<div
|
||||
style={{
|
||||
fontFamily: hookFont,
|
||||
fontSize: 62,
|
||||
lineHeight: 1.18,
|
||||
color: "#FFFFFF",
|
||||
textShadow: "0 3px 18px rgba(0,0,0,0.85)",
|
||||
WebkitTextStroke: "1.5px rgba(0,0,0,0.35)",
|
||||
}}
|
||||
>
|
||||
{title}
|
||||
</div>
|
||||
</div>
|
||||
</AbsoluteFill>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,69 @@
|
||||
import React from "react";
|
||||
import {
|
||||
useCurrentFrame,
|
||||
useVideoConfig,
|
||||
interpolate,
|
||||
spring,
|
||||
AbsoluteFill,
|
||||
} from "remotion";
|
||||
import { serifFont } from "../fonts";
|
||||
|
||||
// 셀링포인트: 3개 독립 pill 박스를 세로로 쌓고 순차 등장.
|
||||
// 컬러 지양 → 반투명 다크 pill + 흰색 텍스트. 앞 구간 단독 노출(시선 집중).
|
||||
export const SellingBadge: React.FC<{
|
||||
items: string[];
|
||||
fromFrame: number;
|
||||
toFrame: number;
|
||||
}> = ({ items, fromFrame, toFrame }) => {
|
||||
const frame = useCurrentFrame();
|
||||
const { fps } = useVideoConfig();
|
||||
const STAGGER = 9; // 박스 간 등장 간격(frame)
|
||||
|
||||
return (
|
||||
<AbsoluteFill
|
||||
style={{
|
||||
justifyContent: "flex-start",
|
||||
alignItems: "center",
|
||||
flexDirection: "column",
|
||||
paddingTop: 200, // 상단 배치 (~16%) — 이미지 가림 최소화
|
||||
gap: 18,
|
||||
}}
|
||||
>
|
||||
{items.map((item, i) => {
|
||||
const start = fromFrame + i * STAGGER;
|
||||
const enter = spring({
|
||||
frame: frame - start,
|
||||
fps,
|
||||
config: { damping: 200, mass: 0.5 },
|
||||
});
|
||||
const rise = interpolate(enter, [0, 1], [22, 0]);
|
||||
const appear = interpolate(
|
||||
frame,
|
||||
[start, start + 8, toFrame - 10, toFrame],
|
||||
[0, 1, 1, 0],
|
||||
{ extrapolateLeft: "clamp", extrapolateRight: "clamp" },
|
||||
);
|
||||
return (
|
||||
<div
|
||||
key={i}
|
||||
style={{
|
||||
opacity: appear,
|
||||
transform: `translateY(${rise}px)`,
|
||||
fontFamily: serifFont,
|
||||
fontWeight: 700,
|
||||
fontSize: 38,
|
||||
color: "#FFFFFF",
|
||||
letterSpacing: 0.5,
|
||||
whiteSpace: "nowrap",
|
||||
// 배경 제거 → 블러리 소프트 쉐도우로 가독성 확보
|
||||
textShadow:
|
||||
"0 2px 22px rgba(0,0,0,0.95), 0 0 14px rgba(0,0,0,0.85), 0 0 40px rgba(0,0,0,0.6)",
|
||||
}}
|
||||
>
|
||||
{item}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</AbsoluteFill>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,53 @@
|
||||
import React from "react";
|
||||
import {
|
||||
useCurrentFrame,
|
||||
interpolate,
|
||||
AbsoluteFill,
|
||||
} from "remotion";
|
||||
import { serifFont } from "../fonts";
|
||||
|
||||
// 브랜드 자막: 페이드 + 미세 상승 (Profile A 모션 프리셋)
|
||||
export const Subtitle: React.FC<{
|
||||
text: string;
|
||||
fromFrame: number;
|
||||
toFrame: number;
|
||||
}> = ({ text, fromFrame, toFrame }) => {
|
||||
const frame = useCurrentFrame();
|
||||
|
||||
const opacity = interpolate(
|
||||
frame,
|
||||
[fromFrame, fromFrame + 10, toFrame - 10, toFrame],
|
||||
[0, 1, 1, 0],
|
||||
{ extrapolateLeft: "clamp", extrapolateRight: "clamp" },
|
||||
);
|
||||
const rise = interpolate(frame, [fromFrame, fromFrame + 18], [18, 0], {
|
||||
extrapolateLeft: "clamp",
|
||||
extrapolateRight: "clamp",
|
||||
});
|
||||
|
||||
return (
|
||||
<AbsoluteFill
|
||||
style={{
|
||||
justifyContent: "flex-end",
|
||||
alignItems: "center",
|
||||
paddingBottom: 220,
|
||||
opacity,
|
||||
}}
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
fontFamily: serifFont,
|
||||
fontWeight: 700,
|
||||
fontSize: 50,
|
||||
color: "#FFFFFF",
|
||||
textAlign: "center",
|
||||
letterSpacing: 1,
|
||||
transform: `translateY(${rise}px)`,
|
||||
textShadow: "0 2px 16px rgba(0,0,0,0.8)",
|
||||
}}
|
||||
>
|
||||
{text}
|
||||
</div>
|
||||
</AbsoluteFill>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,35 @@
|
||||
// Default props = the verified 머뭄 PoC #2 layout.
|
||||
// The Python render bridge overrides these per-job via --props.
|
||||
import { ShortProps } from "./types";
|
||||
|
||||
export const defaultProps: ShortProps = {
|
||||
videoSrc: "mumum_marketing_v1.mp4",
|
||||
fps: 30,
|
||||
width: 720,
|
||||
height: 1280,
|
||||
durationInFrames: 241, // ≈ 8.04s
|
||||
|
||||
hook: {
|
||||
eyebrow: "아무도 모르는 군산",
|
||||
title: "골목 안, 단 한 채의 독채 스테이 머뭄",
|
||||
fromFrame: 0,
|
||||
toFrame: 78,
|
||||
},
|
||||
sellingPoint: {
|
||||
items: ["프라이빗 독채펜션", "넓은 정원", "핵심 관광지 가까이"],
|
||||
fromFrame: 80,
|
||||
toFrame: 138,
|
||||
},
|
||||
brandLines: {
|
||||
lines: ["머무는 시간이", "다르게 흐르는 곳"],
|
||||
fromFrame: 138,
|
||||
toFrame: 196,
|
||||
},
|
||||
endCard: {
|
||||
brand: "Stay, 머뭄",
|
||||
location: "전북 군산시 절골길 18",
|
||||
disclosure: "실제 사진 기반, AI 카메라 효과를 적용한 영상입니다.",
|
||||
fromFrame: 192,
|
||||
toFrame: 241,
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,19 @@
|
||||
// Props contract — shared by Remotion composition and the Python render bridge.
|
||||
// Mirrors server/app/schemas.py VideoSpec (+ video config + timings).
|
||||
export type ShortProps = {
|
||||
videoSrc: string; // file in public/ (staticFile name)
|
||||
fps: number;
|
||||
width: number;
|
||||
height: number;
|
||||
durationInFrames: number;
|
||||
hook: { eyebrow: string; title: string; fromFrame: number; toFrame: number };
|
||||
sellingPoint: { items: string[]; fromFrame: number; toFrame: number };
|
||||
brandLines: { lines: string[]; fromFrame: number; toFrame: number };
|
||||
endCard: {
|
||||
brand: string;
|
||||
location: string;
|
||||
disclosure: string;
|
||||
fromFrame: number;
|
||||
toFrame: number;
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,15 @@
|
||||
// 한글 폰트 로딩 (@remotion/google-fonts, korean subset)
|
||||
// Hook = Black Han Sans (굵고 강렬한 바이럴 헤드라인)
|
||||
// Body/Brand = Nanum Myeongjo (우아한 명조 — 머뭄의 정적 브랜드 톤)
|
||||
import { loadFont as loadHook } from "@remotion/google-fonts/BlackHanSans";
|
||||
import { loadFont as loadSerif } from "@remotion/google-fonts/NanumMyeongjo";
|
||||
|
||||
export const hookFont = loadHook("normal", {
|
||||
weights: ["400"],
|
||||
subsets: ["korean", "latin"],
|
||||
}).fontFamily;
|
||||
|
||||
export const serifFont = loadSerif("normal", {
|
||||
weights: ["400", "700", "800"],
|
||||
subsets: ["korean", "latin"],
|
||||
}).fontFamily;
|
||||
@@ -0,0 +1,4 @@
|
||||
import { registerRoot } from "remotion";
|
||||
import { RemotionRoot } from "./Root";
|
||||
|
||||
registerRoot(RemotionRoot);
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2020",
|
||||
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Bundler",
|
||||
"jsx": "react-jsx",
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noEmit": true
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
Reference in new issue
Block a user