cli-anything-videocaptioner
AI 기반 동영상 자막 도구입니다. 음성 텍스트 변환 → 자막 최적화 → 번역 → 동영상에 자막 입히기를 수행합니다.
설치
pip install cli-anything-videocaptioner
전제 조건:
- Python 3.10-3.12 (
videocaptioner1.4.1은>=3.10,<3.13필요) videocaptioner가 설치되어 있어야 합니다 (pip install videocaptioner)- 동영상 합성을 위해 FFmpeg 필요
사용법
기본 명령어
# 도움말 보기
cli-anything-videocaptioner --help
# 대화형 REPL 모드 시작
cli-anything-videocaptioner
# 동영상 텍스트 변환 (무료, 설정 불필요)
cli-anything-videocaptioner transcribe video.mp4 --asr bijian
# 자막 번역 (무료 Bing 번역기)
cli-anything-videocaptioner subtitle input.srt --translator bing --target-language en
# 전체 파이프라인: 텍스트 변환 → 번역 → 자막 입히기
cli-anything-videocaptioner process video.mp4 --asr bijian --translator bing --target-language en --subtitle-mode hard
# 최종 하드-번 전에 자막/대본 일관성 검토
cli-anything-videocaptioner synthesize video.mp4 -s subtitles.srt \
--subtitle-mode hard \
--review-script approved_script.txt
# 검토용 1프레임 자막 미리보기 렌더링
cli-anything-videocaptioner review subtitles.srt \
--script approved_script.txt \
--preview-video video.mp4 \
--preview-output review_5s.png
# JSON 출력 (에이전트 소비용)
cli-anything-videocaptioner --json transcribe video.mp4 --asr bijian
REPL 모드
하위 명령어 없이 실행하면 대화형 REPL 세션이 시작됩니다:
cli-anything-videocaptioner
# 탭 완성 및 히스토리 지원으로 명령어를 대화형으로 입력
명령어 그룹
transcribe — 음성을 자막으로
transcribe <input> [--asr bijian|jianying|whisper-api|whisper-cpp] [--language CODE] [--format srt|ass|txt|json] [-o PATH]
bijian(기본값): 무료, 중국어 및 영어, 설정 불필요whisper-api: 모든 언어,--whisper-api-key필요
subtitle — 자막 최적화 및 번역
subtitle <input.srt> [--translator llm|bing|google] [--target-language CODE] [--layout target-above|source-above|target-only|source-only] [--no-optimize] [--no-translate] [-o PATH]
- 세 단계: 분할 → 최적화 → 번역
- Bing/Google 번역기는 무료
- 38개 대상 언어 지원 (BCP 47 코드)
synthesize — 동영상에 자막 입히기
synthesize <video> -s <subtitle> [--subtitle-mode soft|hard] [--quality ultra|high|medium|low] [-o PATH] [--review-script PATH] [--max-script-diff-ratio FLOAT]
- 안정적인 백엔드 합성 표면을 그대로 반영
- 자락 모양은 추가 하네스 플래그가 아닌 자막 에셋/백엔드 버전에 의해 제어됨
--review-script는 최종 내보내기 전에 자막/대본 불일치를 확인- 복사 정확도가 복원력보다 중요할 때는
--max-script-diff-ratio를 낮춤
process — 전체 파이프라인
process <input> [--asr ...] [--translator ...] [--target-language ...] [--subtitle-mode ...] [--layout ...] [--no-optimize] [--no-translate] [--no-synthesize] [-o PATH]
review — 일관성 검사 및 미리보기
review <input.srt|input.ass> [--script PATH] [--max-diff-ratio FLOAT] [--preview-video PATH] [--preview-at TC] [--preview-output PATH]
- 하드-번 전에 자막/대본 불일치 감지
- 전체 최종 동영상 대신 단일 검토 프레임을 렌더링 가능
styles — 스타일 프리셋 목록
styles
- 설치된 백엔드가 사전 설정 스타일 지원을 노출하는지 보고
config — 설정 관리
config show
config set <key> <value>
download — 온라인 동영상 다운로드
download <URL> [-o DIR]
JSON 출력
모든 명령어는 기계 판독 가능한 출력을 위해 --json을 지원합니다:
cli-anything-videocaptioner --json transcribe video.mp4 --asr bijian
# {"output_path": "/path/to/output.srt"}
백엔드 참고 사항
- 업스트림 백엔드는 현재 Python
>=3.10,<3.13이 필요합니다. 매트릭스 실행 시 Python3.12를 선호합니다. - 고급 합성 시간 스타일 플래그는 백엔드 버전에 따라 다릅니다.
styles를 사용하여 설치된 백엔드가 해당 플래그를 노출하는지 확인하세요. layout,render_mode,style,style_override,font_file같은 호환성 플래그는styles와 설치된 백엔드가 지원을 확인하지 않는 한 비안정적인 것으로 간주해야 합니다.
대상 언어
BCP 47 코드: zh-Hans zh-Hant en ja ko fr de es ru pt it ar th vi id 및 23개 추가 언어.