Skip to content

Repository files navigation

P-kaClip

FikaClip 클론 프로젝트 - 롱폼 영상을 AI로 분석하여 바이럴 숏폼 영상을 자동 생성하는 앱

주요 기능

  • 📹 비디오 업로드: 롱폼 비디오(10MB~500MB) 업로드
  • 🤖 AI 분석: OpenAI Whisper로 음성 인식 후 GPT-4o로 바이럴 구간 자동 선정
  • ✂️ 숏폼 생성: FFmpeg로 9:16 세로 비율의 숏폼 영상 렌더링
  • 🎬 에디터: 시작/끝 시간 조정 가능한 간단한 타임라인 에디터
  • 📥 다운로드: 완성된 숏폼 영상 다운로드

기술 스택

  • Frontend: Next.js 16, React 19, Tailwind CSS 4
  • Backend: Next.js API Routes
  • Database: Prisma + SQLite
  • Auth: JWT (jose) + bcrypt
  • Video Processing: FFmpeg (fluent-ffmpeg)
  • AI: OpenAI Whisper API + GPT-4o

시스템 요구사항

  • Node.js 18+
  • FFmpeg (시스템에 설치 필요)
  • OpenAI API Key

FFmpeg 설치

macOS:

brew install ffmpeg

Ubuntu/Debian:

sudo apt update && sudo apt install ffmpeg

Windows: FFmpeg 공식 사이트에서 다운로드

설치 방법

  1. 저장소 클론
git clone <repository-url>
cd P-kaClip
  1. 패키지 설치
npm install
  1. 환경 변수 설정

.env.local 파일 생성:

# .env.local
DATABASE_URL="file:./dev.db"
JWT_SECRET=your-random-secret-key-change-in-production
OPENAI_API_KEY=sk-your-openai-api-key
  1. 데이터베이스 마이그레이션
npm run db:migrate
npm run db:generate
  1. 개발 서버 실행
npm run dev
  1. 브라우저에서 접속
http://localhost:3000

사용 방법

  1. 회원가입/로그인: 이메일과 비밀번호로 계정 생성
  2. 비디오 업로드: 드래그앤드롭 또는 클릭으로 비디오 파일 업로드
  3. AI 분석: "숏폼 생성" 버튼 클릭으로 AI 분석 시작
  4. 렌더링: 생성된 숏폼을 렌더링
  5. 편집: 필요시 시작/끝 시간 조정
  6. 다운로드: 완성된 숏폼 다운로드

프로젝트 구조

P-kaClip/
├── prisma/                 # Prisma 스키마 및 마이그레이션
│   ├── schema.prisma
│   └── migrations/
├── src/
│   ├── app/                # App Router 페이지
│   │   ├── (auth)/         # 로그인/회원가입
│   │   ├── (main)/         # 메인 레이아웃 (비디오/숏폼)
│   │   └── api/            # API Routes
│   ├── components/         # React 컴포넌트
│   ├── lib/                # 유틸리티 함수
│   └── types/              # TypeScript 타입
├── public/                 # 정적 파일
├── uploads/                # 업로드된 파일 (gitignored)
├── dev.db                  # SQLite 데이터베이스 (gitignored)
└── README.md

API 엔드포인트

Auth

  • POST /api/auth/register - 회원가입
  • POST /api/auth/login - 로그인
  • POST /api/auth/logout - 로그아웃
  • GET /api/auth/me - 현재 사용자 정보

Videos

  • GET /api/videos - 비디오 목록
  • POST /api/videos/upload - 비디오 업로드
  • GET /api/videos/[id] - 비디오 상세
  • DELETE /api/videos/[id] - 비디오 삭제
  • POST /api/videos/[id]/analyze - AI 분석 시작
  • GET /api/videos/[id]/stream - 비디오 스트리밍

Shorts

  • GET /api/shorts/[id] - 숏폼 상세
  • PATCH /api/shorts/[id] - 숏폼 수정
  • DELETE /api/shorts/[id] - 숏폼 삭제
  • POST /api/shorts/[id]/render - 숏폼 렌더링
  • GET /api/shorts/[id]/download - 숏폼 다운로드

라이선스

MIT License

참고

About

FikaClip clone project https://www.fikad.boo

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages