text
stringlengths
3
8.33k
repo
stringclasses
52 values
path
stringlengths
6
141
language
stringclasses
35 values
sha
stringlengths
64
64
chunk_index
int32
0
273
n_tokens
int32
1
896
import json from adapterlab.verification.pipeline import run_verification from tests.verification.helpers import write_verify_workspace def test_membership_inference_fixture_records_auc_and_tpr(tmp_path) -> None: config_path = write_verify_workspace(tmp_path) result = run_verification(config_path) mia ...
adapter-lab
tests/verification/test_membership_inference.py
Python
4f0fdf473275a73db84452faa22503c2ae2f253e243031ab169ca0a579c26a7d
0
184
from adapterlab.verification.pipeline import run_verification from tests.verification.helpers import write_verify_workspace def test_run_verification_returns_cli_safe_refs_and_counts(tmp_path) -> None: result = run_verification(write_verify_workspace(tmp_path)) payload = result.to_dict() assert payload["...
adapter-lab
tests/verification/test_pipeline.py
Python
35faf0fcf387b7e0f74596ceaf6b8f178a05a15dd87c84801f1162948a59b368
0
112
from dataclasses import dataclass from adapterlab.verification.plugins import evaluate_gate_plugins, trusted_gate_plugins @dataclass class Dist: metadata: dict @dataclass class EntryPoint: name: str group: str value: str dist: Dist def test_gate_plugins_use_gate_entry_point_group() -> None: ...
adapter-lab
tests/verification/test_plugins.py
Python
2a1394c40a554e59782939bad31d2dac1dba3504d225e559cd3b6865e3debf55
0
233
import pytest from adapterlab.contracts.verification import GateResult, GateScore, VerifyManifest from adapterlab.sdk.errors import GateFailure from adapterlab.verification.policy import compute_overall, require_signing_allowed from tests.contracts.test_verification_models import artifact_ref def test_failed_blockin...
adapter-lab
tests/verification/test_policy.py
Python
076f4c8254cfe6600760ae6407d9c4e2494a26783d99e1472c26bc1d75d2b57c
0
279
from adapterlab.verification.pipeline import run_verification from tests.verification.helpers import write_verify_workspace def test_prompt_injection_fixture_records_aggregate_rate(tmp_path) -> None: result = run_verification(write_verify_workspace(tmp_path)) gate = next(gate for gate in result.stats["gates"...
adapter-lab
tests/verification/test_prompt_injection.py
Python
43644a86249bc947ac697bdf2a751e4d40918b4dec40ce6f6aacf5d963f00996
0
169
from adapterlab.artifacts import LocalArtifactStore from adapterlab.verification.evidence import write_evidence def test_write_evidence_redacts_secret_like_values(tmp_path) -> None: store = LocalArtifactStore(tmp_path / "artifacts") evidence = write_evidence( store=store, payload={"metric": 0...
adapter-lab
tests/verification/test_protocol.py
Python
51461d19f0ba63270f6d85b009e607aade48732cdfe326cca151a77f74d5d286
0
115
from adapterlab.verification.pipeline import run_verification from tests.verification.helpers import write_verify_workspace def test_refusal_regression_warn_mode_does_not_block_by_itself(tmp_path) -> None: result = run_verification(write_verify_workspace(tmp_path, failing=False, warn=True)) gate = next(gate ...
adapter-lab
tests/verification/test_refusal_regression.py
Python
e55104bd8a3b9ecec022fbe5f4564564171a996fae94ae4a63bcd7a25643668a
0
162
__pycache__/ *.py[cod] *$py.class *.egg-info/ dist/ build/ .eggs/ .env .env.local .venv/ venv/ env/ node_modules/ templates/remotion-project/node_modules/ *.mp4 *.mp3 *.wav *.webm projects/ output/ .DS_Store Thumbs.db
ai-video
.gitignore
Git Ignore
de219a3d75e60e184e7bd0bb6478e43d5aaf7028b13f57531fb0438b6c749404
0
70
import json from pathlib import Path editplan_path = Path("projects/script-test-pipeline-20260218/edit_plan.json") data = json.loads(editplan_path.read_text(encoding="utf-8")) print("EditPlan Summary:") print(f" Total segments: {len(data['segments'])}") print(f" Chapters: {len(data['chapters'])}") print(f" Music c...
ai-video
check_editplan.py
Python
96a3c6109ad31bf43926868ed866957e5d5868e306b610b614aa8436e268af9c
0
438
import json from collections import Counter from pathlib import Path script_path = Path("projects/script-test-pipeline-20260218/script.json") data = json.loads(script_path.read_text(encoding="utf-8")) segs = data['segments'] durations = [s['duration_seconds'] for s in segs] cameras = [s['camera'] for s in segs] broll...
ai-video
check_script_quality.py
Python
d184bf4e36fbcbcff82c126894162e0e2de7b5e2b96ec17aad1c7ebbeee67198
0
350
{ "image_model": "gemini-3-pro-image-preview", "video_model": "veo-3.1-generate-preview", "video_model_draft": "veo-3.1-fast-generate-preview", "tts_model": "eleven_multilingual_v2", "sts_model": "eleven_multilingual_sts_v2", "video_provider": "veo", "replicate_model_id": "", "default_aspect_ratio": "9:...
ai-video
config.default.json
JSON
28a7927eda45c026fcfbb0eb29de5f41877ea11f7861353cd119a3e7959aad53
0
241
""" Cursor Vienna Meetup — Introductory video pipeline test. Generates a ~40 s talking-head clip of the woman from image/reference.jpeg welcoming attendees to the first Cursor meetup in Vienna. Pipeline: 1. Analyze reference image → extract character profile 2. Generate character image from reference (for frame c...
ai-video
cursor_meetup_test.py
Python
fd44ba032172d91abd8d233c0dc5dbfc7d922510f2af25015df5db0070f0ea05
0
896
STEP 1: Analyze reference image") print("=" * 60) char_gen = CharacterGenerator(api_key=gemini_key) analysis_cache = PROJECT_DIR / "analysis.json" if analysis_cache.exists(): import json analysis = json.loads(analysis_cache.read_text(encoding="utf-8")) print(" Cached analysis") else: analysis = char_...
ai-video
cursor_meetup_test.py
Python
4d90e27feb702776bd83f23f556130c5f41e87a83fb04bd9534259001fcecb02
1
896
, ScriptSegment( id=2, text=( "We have an amazing lineup tonight. We're kicking off at six thirty " "with a virtual session and live Q and A with the Cursor team." ), duration_seconds=8.0, action="Gestures with both hand...
ai-video
cursor_meetup_test.py
Python
f50c45e04af5f98a4df3d272236fd1a6f787ec1ae0faf6a4d7cdcae312e7adfb
2
896
reference photo first for likeness, # then the generated character image, then the previous frame. references = [ref_bytes, char_image] if frame_images: references.append(frame_images[-1]) prompt = frame_gen._build_frame_prompt(frame_descriptions[i], character, i) var...
ai-video
cursor_meetup_test.py
Python
bc1c0e531a444c8ee0d38510d34438f0775e057eb4ec755a6032054c21072f60
3
896
if result: # Rename to canonical name result.rename(seg_file) clip_paths.append(seg_file) elapsed = time.time() - t0 dur = FFmpegAssembler.get_duration(seg_file) print(f" -> {seg_file.name} ({dur:.1f}s, took {elapsed:.0f}s)") else: print(f" -> FAILED aft...
ai-video
cursor_meetup_test.py
Python
bfb9bc38b2136513f0db8f8752976263474b79c56965a81e59dd89e4f93f46be
4
896
mp4" FFmpegAssembler.replace_audio(assembled_video, final_audio, final_output) final_duration = FFmpegAssembler.get_duration(final_output) size_mb = final_output.stat().st_size / (1024 * 1024) print(f" {final_output.name}: {final_duration:.1f}s, {size_mb:.1f} MB") # ===================================================...
ai-video
cursor_meetup_test.py
Python
3d39f4c9ccd8c7641b7f733ccd8f114fdbc43a98e7758eb7fbee4da14864b5f7
5
353
import logging import time from pathlib import Path from scripts.core.config_manager import ConfigManager from scripts.core.models import CharacterProfile, ScriptSegment, Script, VoiceProfile from scripts.generation.character_generator import CharacterGenerator from scripts.generation.frame_generator import FrameGener...
ai-video
full_pipeline_test.py
Python
6c80b768b8f3842f59b5a76dc54d343e8c6c703dacbb4d791263243aca585e7b
0
896
"warm, encouraging, closing", ), ], ) video_model = "veo-3.1-fast-generate-preview" if DRAFT_MODE else "veo-3.1-generate-preview" # ============================================================ # STEP 1: Character image (cached) # ============================================================ print("\n" + "=...
ai-video
full_pipeline_test.py
Python
b49b6eff457afda6bbbaa2fe36e8700d582112ee9e55e960505217d48bf80a9e
1
896
====================================================== # STEP 3: Build rich Veo prompts (with dialogue for lip sync) # ============================================================ print("\n" + "=" * 60) print("STEP 3: Build Veo prompts") print("=" * 60) # Full self-contained prompt for the initial clip initial_prompt ...
ai-video
full_pipeline_test.py
Python
347ed875adc1f804d668fdb5b6607154693a35174adb329bd45715905eca4519
2
896
--------- print(" Generating individual clips with rich prompts...") existing_clips = sorted(clips_dir.glob("clip_*.mp4")) if clips_dir.exists() else [] existing_clips = [c for c in existing_clips if "_trimmed" not in c.name] needed = len(script.segments) if len(existing_clips) >= needed: ...
ai-video
full_pipeline_test.py
Python
13c2f8f771be70a1da89d3b2d53efd64b7a1a21ca6ee5f5df0ef9de80b08fc69
3
896
n" + "=" * 60) print("STEP 6: Voice consistency") print("=" * 60) final_audio = output_dir / "voiceover_final.mp3" native_audio = output_dir / "native_audio.mp3" # Extract the native audio from the assembled video FFmpegAssembler.extract_audio(assembled_video, native_audio) native_duration = AudioEffects.get_duration...
ai-video
full_pipeline_test.py
Python
8f3696b03f33461437398cb4ecb3e11cbf958a0350efa5e156866eed372c3ac0
4
896
====================================================== print("\n" + "=" * 60) print("STEP 8: Final merge") print("=" * 60) final_output = output_dir / "science_presentation_final.mp4" FFmpegAssembler.replace_audio(assembled_video, final_audio, final_output) final_duration = FFmpegAssembler.get_duration(final_output) s...
ai-video
full_pipeline_test.py
Python
f12fd7ed9cae35ec9670e5efad3130d91a5f7f7059ec2d8da6223ef66e77f8b4
5
479
from scripts.generation.character_generator import CharacterGenerator from scripts.core.config_manager import ConfigManager from pathlib import Path cfg = ConfigManager() gen = CharacterGenerator(api_key=cfg.gemini_api_key) images = gen.generate_variants("A 22 year old woman, casual style, iPhone selfie", count=1) pr...
ai-video
image_generation_test.py
Python
95ec80bbb29a56545df2bb993b051493cc16765cd707cdb62d7fce468a58e909
0
168
# AI Video Production Skill — Final Implementation Plan v2 ## For: Claude Code (Cursor) with Claude Opus 4.6 --- ## Table of Contents 1. [Vision & Architecture](#1-vision--architecture) 2. [Skill Directory Structure](#2-skill-directory-structure) 3. [Status Bar System](#3-status-bar-system) 4. [Checkpoint & Resume ...
ai-video
PLAN.md
Markdown
33b238c32fb235b7b1cbad64c1f46ae3e58fe601c0cfe72e19389ab71e254779
0
896
│ │ │ │ │ ┌───────────┬───────────┼───────────┬──────────────┐ │ │ │ Gemini │ Veo 3.1 │ElevenLabs │ Remotion │ │ │ │ API │ API │ API │ Studio │ │ │ └───────────┴───────────┴───────────┴──────────────┘ ...
ai-video
PLAN.md
Markdown
c41b5f6904f23fe6015ede236c06c957b0020b3fd135c8e9c02954b8c6f878a4
1
896
tsx │ │ ├── compositions/ │ │ │ ├── VideoAssembly.tsx # Main composition │ │ │ ├── ClipSequence.tsx # Clip sequencer with trim │ │ │ ├── AudioLayer.tsx # Multi-track audio │ │ │ ├── SubtitleOverlay.tsx # Auto-generated subtitles │ │ │ └── S...
ai-video
PLAN.md
Markdown
dbd6fba1d8b3833eac8d48f7419e43cf2ccf802b9148e026eac083608fd1e00b
2
896
= [ "character_design", "image_generation", "frame_planning", "video_generation", "voice_design", "assembly", "qa_check", "export" ] ICONS = {"pending": "⬚", "active": "🔄", "done": "✅", "error": "❌", "skipped": "⏭️"} def __init__(self, project_dir: str): self.project_dir = Path(pro...
ai-video
PLAN.md
Markdown
0385a72cad308064759616c856e58cf6844cd6e7e6e5b2299db96e5d39547f34
3
896
"][right_key]] col2 = f"[{right_icon}] {right_label}" else: col2 = "" line = f"║ {col1:<32}{col2:<33}║" lines.append(line) lines.append("║" + " " * 66 + "║") cost_line = f"║ 💰 Cost: ${s['cost_actual']:.2f} │ Est. Remaining: ${s['c...
ai-video
PLAN.md
Markdown
09b6d42fcd79a8d75d99a0f2b5f4c08e0a4fe7d6809625e315888c8cc953babb
4
896
], "cost": 1.44 } ], "script": { "...script segments..." }, "cost_total": 4.82, "cost_breakdown": [ {"api": "gemini", "action": "character_image_gen", "cost": 0.96, "count": 8}, {"api": "gemini", "action": "frame_gen", "cost": 1.44, "count": 12}, {"api": "veo", "action": "video_gen", "cost...
ai-video
PLAN.md
Markdown
1bd356ac33c75f7cf2f9ab9875492bb9104e30acadfdd0495d336b7cfb50f934
5
896
1_720p": 0.35, # per 8s video "veo_3.1_1080p": 0.50, "veo_3.1_fast_720p": 0.10, "veo_3.1_fast_1080p": 0.15, }, "elevenlabs": { "voice_design_preview": 0.0, # included in plan "voice_changer_per_min": 0.30, "tts_per_1k_chars": 0.30, # varies by pl...
ai-video
PLAN.md
Markdown
9231e74d99a056403bd77d426ab9a05021eed67a88e9a3101b28be6ea1444eaa
6
896
the user's first message: - Contains a YouTube URL → **Mode C** - Attaches a script file or pastes multi-line dialogue → **Mode B** - Describes a concept → **Mode A** - Ambiguous → Claude asks --- ## 7. Pipeline Stages (Complete) ### Stage 0: Project Setup & Cost Estimate **Inputs**: User's request + mode detection...
ai-video
PLAN.md
Markdown
a6148b61784ba0e4e14d475380025271f6dd5191930cf75cd85e7298298dd6b0
7
896
saved --- ### Stage 4: Frame Planning & Generation (Same as v1 plan — chain frames, generate with consistency references) **Enhancement**: For YouTube clone mode, frame planning mirrors the original video's shot composition: ```json { "source_analysis": { "shot_1": {"type": "medium_selfie", "duration": 8, "ac...
ai-video
PLAN.md
Markdown
bd6d3d8aff432d0257b15b5644649b8c4d23f00e8bdd502333aaf54f89e44688
8
896
head videos. Your scripts must sound like natural, spontaneous speech — NOT written prose read aloud. Rules: - Include filler words naturally: "ähm", "also", "irgendwie", "na ja" - Vary sentence length. Mix short punchy sentences with longer ones. - Include self-corrections: "also das war... nee, eigentlich war das......
ai-video
PLAN.md
Markdown
851e9573e2fc541283a4b5e197d84f6f125a34c5ddaa610cf1723a6b7b988c83
9
896
yt-dlp", "-x", "--audio-format", "mp3", "-o", f"{output_dir}/source_audio.mp3", url ], check=True) # Load metadata info_files = list(Path(output_dir).glob("*.info.json")) if info_files: return json.loads(info_files[0].read_text()) return {} def transcribe_audio(audi...
ai-video
PLAN.md
Markdown
3461fb51fa6ffb945ca25e3107de760bcddb4a1d206aa1f34b621d3fcdf2baf6
10
896
= client.models.generate_videos( model=model, prompt=prompt, image=start_image, config=config, ) while not operation.done: time.sleep(15) operation = client.operations.get(operation) if operation.result and operation.result.generated_videos: video = ...
ai-video
PLAN.md
Markdown
5f55a9f3ad3b0c00b45fe64f3607fbf99b4d06d78b74c497213b3ae1f654e173
11
896
package.json │ dependencies: │ remotion, @remotion/cli, @remotion/player, │ @remotion/renderer, react, react-dom, zod ├── remotion.config.ts ├── src/ │ ├── Root.tsx # Registers all compositions │ ├── compositions/ │ │ ├── VideoAssembly.tsx # Main: sequences clips + audio │ │...
ai-video
PLAN.md
Markdown
476e6d21fbd4bf12fb2f8ba2b3e35e86cb0a9a6e02c3aedf0d271df174db7d51
12
896
" audio_dir.mkdir(parents=True, exist_ok=True) shutil.copy(audio_path, audio_dir / "voice.mp3") # 3. Generate props file props = { "segments": [ { "src": f"/segments/segment_{s['id']}.mp4", "durationFrames": s["duration_seconds"] * 30, # 30fps ...
ai-video
PLAN.md
Markdown
5a03c5bac7101993fbf4692aac7630bc97bd45a59139ed374fef7d403f9d03b3
13
896
", "video_model": "veo-3.1-generate-preview", "video_model_draft": "veo-3.1-fast-generate-preview", "tts_model": "eleven_multilingual_v2", "sts_model": "eleven_multilingual_sts_v2", "default_aspect_ratio": "9:16", "default_resolution": "1080p", "fps": 30, "segment_duration_seconds": 8, "frame_trim_co...
ai-video
PLAN.md
Markdown
c47f7e74a7629b7d43bce44db89695fc537a7dd4a43c4105dcf04649c42eb88b
14
896
segment timing (each ~8 seconds of speech). ``` ### Phase 3: Image Generation Pipeline (Days 4-6) ``` Priority: Character creation is the visual foundation. Tasks: □ reference/GEMINI-API.md — API docs + prompt templates □ templates/prompts/image-analyzer.md — reference image analysis prompt □ templates/prompts/anti-p...
ai-video
PLAN.md
Markdown
7b43df827e2254b5ddb10a6f4cab277a46a87ea150000c0845c8e57da4e65242
15
896
` ### Phase 9: Polish & Documentation (Days 15-16) ``` Priority: Ship-ready. Tasks: □ docs/SETUP.md — first-time setup guide □ docs/API-KEYS.md — how to get each key □ docs/EXAMPLES.md — showcase examples □ reference/TROUBLESHOOTING.md — common errors □ Error handling: graceful failures with recovery suggestions □ Ed...
ai-video
PLAN.md
Markdown
9fe87efa07f63da3572592696ea15a86989e614e4a8bb13b67b8053399312eaa
16
896
](reference/ELEVENLABS-API.md) - Video assembly: [reference/REMOTION.md](reference/REMOTION.md) - Cost model: [reference/COST-MODEL.md](reference/COST-MODEL.md) - Quality checks: [reference/QUALITY.md](reference/QUALITY.md) - Troubleshooting: [reference/TROUBLESHOOTING.md](reference/TROUBLESHOOTING.md) ## Dependencies...
ai-video
PLAN.md
Markdown
173b9fdb0215e6e66a5eb9b7a71da08f0c961edf58936aae55c46e794b7c78e2
17
530
# AI Video Production Pipeline - Project Explanation ## What This Project Does This project is an **end-to-end AI video production pipeline** that generates realistic talking-head videos featuring AI-generated characters. It takes various inputs (concepts, scripts, or YouTube URLs) and produces complete, professional...
ai-video
PROJECT_EXPLANATION.md
Markdown
d8b657fb5b6989089b11256dfd2219232ca79c43366d338bac4c0cd841b51898
0
896
concatenation with optional transitions (fade, cross-dissolve, hard cut) - Audio cross-fading for smooth transitions - Frame trimming to remove generation artifacts - Audio/video synchronization - **Remotion Integration**: Optional browser-based editor using Remotion (React-based video editor) for advanced editin...
ai-video
PROJECT_EXPLANATION.md
Markdown
898602cd86f3a89fc8ff51dafd8179adc464957aac3e235c2663d761a587b009
1
896
variants generated - Some features (Remotion editor, background music) are optional and require additional setup ## Example Use Cases 1. **AI Influencer Content**: Create consistent AI character videos for social media 2. **Educational Videos**: Generate educational content with AI presenters 3. **Multilingual Conten...
ai-video
PROJECT_EXPLANATION.md
Markdown
337c089e9d74c34fcad6ee0db8838585a59726b3d710de3f915e871763eb3281
2
158
google-genai>=1.0.0 elevenlabs>=1.0.0 pydantic>=2.0.0 Pillow>=10.0.0 imagehash>=4.3.0 numpy>=1.26.0 ffmpeg-python>=0.2.0 requests>=2.31.0 python-dotenv>=1.0.0 yt-dlp>=2024.0.0 replicate>=1.0.0 sentence-transformers>=2.2.0
ai-video
requirements.txt
Text
3c3f98b619a228a1ea0eae439e9004ac71023c0aac11cdc188dd4a3ff3eea157
0
82
from __future__ import annotations import argparse import json import logging import sys from datetime import datetime from pathlib import Path from google import genai from google.genai import types from scripts.core.config_manager import ConfigManager from scripts.core.models import CharacterProfile from scripts.c...
ai-video
script_generation_only.py
Python
4c987e2916a204419ef05ed0fd0fa13b905141cdba5853cc7a21f350c442e83a
0
896
)) else: character = CharacterProfile( age_range="25-35", gender="female", style="casual modern outfit", setting="simple, tidy indoor room", camera="phone camera on tripod at eye level", lighting="soft na...
ai-video
script_generation_only.py
Python
4bb38963f1117796a73dfb8f782bc1af0fe5bba5f724fe0393378e645559af33
1
619
--- name: ai-video-production description: > Produce realistic AI-generated talking-head videos end-to-end. Three input modes: describe a concept, provide a script, or clone a YouTube video in any language. Supports multiple video providers (Veo, Replicate/Kling/Wan/Minimax, local). Persistent character identit...
ai-video
SKILL.md
Markdown
9d75382320547a195a1cb0a66f631d4d55360771d5963bd0741dfd1990cf8d3f
0
896
a pluggable provider system. Default is Veo; alternatives include Replicate models (Kling, Wan, etc.). 7. **Persistent characters**: Characters are saved globally in `characters/` and can be reused across projects for consistent AI personas. 8. **Background music**: Optional ElevenLabs Music API integration adds ...
ai-video
SKILL.md
Markdown
58047e5a1987fa9c34c0c7fd2b4373e66d2f3e675509cf33d3b9d72370bbac1a
1
896
scripts.assembly.ffmpeg_fallback import FFmpegAssembler if config_mgr.config.background_music_enabled: music_gen = MusicGenerator(api_key=config_mgr.elevenlabs_api_key) music_path = music_gen.generate_for_video( video_duration_seconds=total_duration, prompt=config_mgr.config.music_prompt or "",...
ai-video
SKILL.md
Markdown
6f035e67fbdfc8bbbdc941abe256b2e2d7ccf0ff0a2838fbfe1a6f02e20f49e4
2
896
", gender="male", ...), tags=["scientist", "male", "50s"], ) store.save(identity) # Add reference images for visual consistency store.add_reference_image(identity.id, image_bytes) # Later, in another project: identity = store.load("dr-science") ref_images = store.get_reference_images("dr-science") ``` Storage la...
ai-video
SKILL.md
Markdown
308bf7b385d1a33ddc34cb3d7f8f1a73cedb2c4c9a84a374a342b7539572e8c6
3
896
------------------|---------------------------------|---------------------------------------| | `video_provider` | `"veo"` | Video provider: veo, replicate, local | | `replicate_model_id` | `""` | Replicate model ID | | `background_mu...
ai-video
SKILL.md
Markdown
9c1c7d3976731032c4bcc6565f0441bdceaadd5e905565676f0049e5ecd9f78f
4
326
# test_core.py — run with: python test_core.py from pathlib import Path from scripts.core.models import ProjectState, Script, ScriptSegment, ProjectConfig, InputMode from scripts.core.config_manager import ConfigManager from scripts.core.cost_estimator import CostEstimator from scripts.core.status_bar import StatusBar...
ai-video
test_core.py
Python
02b0d296d1342990685e5f1577b96010bbff8c3876fc8ff86b31559d8f5a13cf
0
504
import json import sys from pathlib import Path script_path = Path(sys.argv[1]) if len(sys.argv) > 1 else Path("projects/script-only-ice-floats-validation-20260218-v2/script.json") with open(script_path, encoding="utf-8") as f: data = json.load(f) segs = data["segments"] durations = [s["duration_seconds"] for s ...
ai-video
validate_script.py
Python
181541090210deee9f8223b10ccdd19a68f2ce864885a5ed322af01ca33df26a
0
580
from pathlib import Path from scripts.generation.video_generator import VideoGenerator from scripts.core.config_manager import ConfigManager cfg = ConfigManager() gen = VideoGenerator( api_key=cfg.gemini_api_key, model="veo-3.1-fast-generate-preview", # draft mode, ~$0.15 ) image_bytes = Path("generated_imag...
ai-video
video_generation_test.py
Python
c70f65f6661384bcfed4607c9050ac3e34130dedc1431a51b5395add0ce71738
0
177
# AI Video Production Pipeline - Cleanup & Refactoring Plan ## Project Overview **Purpose**: End-to-end AI video production system that generates talking-head videos with AI characters, synchronized voice, and professional transitions. **Tech Stack**: Python 3.11+, Google Gemini API, Google Veo 3.1, ElevenLabs, FFmp...
ai-video
.claude/CLEANUP_PLAN.md
Markdown
4813416f692b597473456d58a0acb0ad8de3b9ecc91aaf63eae482e78ff4375d
0
896
→ subprocess/IO specific | | `scripts/generation/batch_generator.py` | FIXED | 2 instances → ClientError/IO/Runtime layered | | `scripts/generation/parallel_frames.py` | FIXED | 2 instances → ClientError/thread errors | | `scripts/orchestration/parallel_workstream.py` | FIXED | 1 instance → TimeoutError/CancelledError/...
ai-video
.claude/CLEANUP_PLAN.md
Markdown
c52278eeb3a8a87ef4cd6c05d51337946d1c44dd903930783f3ce2161dd8cab1
1
896
DONE | | `scripts/graphics/remotion_renderer.py` | Remove duplicate imports, use constants | DONE | | `scripts/sourcing/broll_sourcer.py` | Remove duplicate imports, use constants | DONE | | `scripts/audio/professional_audio_assembly.py` | Remove duplicate imports | DONE | | `scripts/core/long_form_config.py` | Remove ...
ai-video
.claude/CLEANUP_PLAN.md
Markdown
78b4c41138d25cb7dea4ffc717b1b17738aa8280f8fea55ea06c45c8b1c12f67
2
660
# API Keys Guide ## Required Keys ### Gemini API Key (GEMINI_API_KEY) Used for image generation (Nano Banana Pro) and video generation (Veo 3.1). 1. Go to https://aistudio.google.com/apikey 2. Click "Create API key" 3. Copy the key 4. Add to `.env`: `GEMINI_API_KEY=your-key` **Pricing**: Pay-per-use. See [referenc...
ai-video
docs/API-KEYS.md
Markdown
f615842ad3ffe310aeaf93f85b731ed5f67acc34b5c001211ac7b5c0e4385893
0
364
# Examples ## Example 1: German Vlogger (Concept Mode) **Prompt**: "Make a 30-second video of a young German woman vlogging about a weird dream" **What happens**: 1. Mode detected: Concept 2. Character profile generated: 18-25 female, casual style, bedroom setting 3. Script generated: 4 segments in German with natur...
ai-video
docs/EXAMPLES.md
Markdown
f312df272b8ecf704be525af28e73b968540cc47ca7a2eeb113166f94cccdded
0
571
# Setup Guide ## Prerequisites - Python 3.10+ - Node.js 18+ (for Remotion) - FFmpeg (for audio/video processing) - Git ## Installation ### 1. Clone the Repository ```bash git clone <repo-url> cd ai-video ``` ### 2. Python Environment ```bash python -m venv .venv source .venv/bin/activate # Linux/macOS # or .ven...
ai-video
docs/SETUP.md
Markdown
9a43921178f9b5637e3b2dc4a8b8ddf0071cf0afd580f8035b1d11a61b221a28
0
509
## Context & Goal You are an expert visual analysis specialist with 15+ years of experience in digital art, photography, graphic design, and AI image generation. You excel at deconstructing visual elements and translating artistic styles into technical specifications. Your task: Analyze uploaded images and return c...
ai-video
inspiration/json_analyzer.md
Markdown
63fb3923e190509c8f4bf4fe7abc9bcc0528286fd53990f3aa8bbd6c4cb358c1
0
896
effect", "grain": "none/film grain/digital noise/intentional grain - level", "depth_of_field": "shallow/medium/deep - with subject isolation description", "perspective": "straight on/low angle/high angle/dutch angle/isometric/one-point/two-point" }, "artistic_elements": { "genre": "portrait/landscape/abstract/con...
ai-video
inspiration/json_analyzer.md
Markdown
0af1951aff3a8a87506f6c3c37e0fb0f3e5400cd96e0e2d6d5254b9c3ecf0a00
1
896
/spread/interlaced/curled", "finger_interlacing": "if hands clasped: natural loose interlacing/tight formal interlacing/fingers overlapping/thumbs position", "hand_tension": "relaxed/tense/natural/posed/rigid - muscle tension observable", "interaction": "What hands are doing: holding phone/touching hair/on hip/cross...
ai-video
inspiration/json_analyzer.md
Markdown
b0dd6a29b0e23d8a8e81176633c3d1f47cb2cbf9592d9c6339e56cc0b358bfc3
2
896
attention ### Lighting Assessment - Determine light source type, direction, and quality - Analyze shadow characteristics and depth - Assess highlight preservation or blown-out areas - Describe overall lighting mood and emotional impact - Note light's role in creating dimension and form ### Technical Evaluati...
ai-video
inspiration/json_analyzer.md
Markdown
19e8552be68e21fe825701198573a5cb737219ca932135aab9ce1d109c64debe
3
896
and framing choices - Describe subject-background relationship - Note any secondary subjects or supporting elements ### Generation Parameters - Create actionable technical prompts for recreation - Avoid creating JSON outputs that may suggest sexual or teasing content - Extract relevant keywords for searchabilit...
ai-video
inspiration/json_analyzer.md
Markdown
d27731a674496d24a1967915c42eff442c2da5b8152a6b47b2f1da5b96904d36
4
804
You are the "Google Veo 3.1 Prompting Specialist". Your sole purpose is to convert simple user ideas into highly sophisticated, technically precise video generation prompts optimized for the Google Veo 3.1 model. ### CORE OBJECTIVE Transform user inputs (which may be vague or short) into a comprehensive, narrative-...
ai-video
inspiration/veo_prompt_assistant.md
Markdown
25b577bbebf931b48eaac2ba022dd684b8cb3008ac88f8d0e4805735ad46d162
0
896
vague terms Show Don't Tell: Describe observable actions and appearances Layer Details: Build from main action to background elements Use Active Language: Present tense, dynamic verbs Include Contradictions: Unexpected elements create interest (like the patriotic underwear scenario) Structure Logically: Move from ...
ai-video
inspiration/veo_prompt_assistant.md
Markdown
11c785dec6da0a676a640f85a7be7b711b8b92bba2fda94498a092c906d0eca1
1
449
# ROLLE & ZIEL Du bist ein präziser AI-Video-Prompt-Generator. Deine Aufgabe ist es, eine komplexe Handlung in einzelne, voneinander unabhängige Szenen-Prompts zu zerlegen. # INPUT Du wartest auf: 1. Ein **Startbild** (als visuelle Basis). 2. Die **Anzahl der Videos** (Steps). 3. Die **Gesamthandlung**. # GENERIER...
ai-video
inspiration/video_frame_assistant.md
Markdown
ac554e23c06cf87a7b963807fe9a013f517de237f9ba3770747643ba3589d2cb
0
444
# Cost Model Reference ## Pricing Table ### Gemini Image Generation | Model | Cost per Image | |-------|---------------| | gemini-3-pro-image-preview (Nano Banana Pro) | $0.134 | | imagen-4.0-generate-001 | $0.030 | ### Veo 3.1 Video Generation | Model | 720p | 1080p | |-------|------|-------| | veo-3.1-generate-pre...
ai-video
reference/COST-MODEL.md
Markdown
4515ff6fb4e158ec9c9c2e996418d75524563212118f310184f820650abc48bd
0
544
# ElevenLabs API Reference ## Python SDK ```bash pip install elevenlabs ``` ```python from elevenlabs import ElevenLabs client = ElevenLabs(api_key="YOUR_KEY") ``` ## Voice Design Create a new voice from a text description. ```python # Generate previews response = client.text_to_voice.create_previews( voice_...
ai-video
reference/ELEVENLABS-API.md
Markdown
c03b1d4729ce790ef5a3bb3041fe3cd2e593ec2a1cbf8ae9b37d9bc3439fde66
0
522
# Gemini API Reference ## Image Generation (Nano Banana Pro) Used for character images and frame generation. ### Model - `gemini-3-pro-image-preview` — high-fidelity native image generation - `imagen-4.0-generate-001` — alternative Imagen model (English prompts only) ### Python SDK ```python from google import gen...
ai-video
reference/GEMINI-API.md
Markdown
d9d4bc811ef3f55b98535d231e59b762e3ff6769bfa5906f224658727ab64e6d
0
466
# Input Modes The skill supports three input modes, detected automatically from the user's request. ## Mode A: Concept to Video User describes what they want. Claude handles everything. **Trigger**: A descriptive concept without a script or URL. **Example**: ``` "Make a 45-second video of a young German woman vlog...
ai-video
reference/INPUT-MODES.md
Markdown
8aadc81b8c0c76810e4f7f293cc4cbf89291b28f37e7dcbf37c65ba691b6dc69
0
465
# Pipeline Reference Complete walkthrough of all pipeline stages. ## Stage 0: Project Setup & Cost Estimate **Inputs**: User's request + mode detection 1. Create project directory with timestamp ID 2. Initialize StatusBar, CheckpointManager, CostEstimator 3. Detect mode (concept / script / YouTube clone) 4. Parse t...
ai-video
reference/PIPELINE.md
Markdown
dd05668e902df6a240066e6909ac116ac32136723f047ea20df4af81be077783
0
896
. Generate composition props from project state 4. Install Node.js dependencies 5. User launches Remotion Studio for preview 6. Optional: add subtitles, transitions, Ken Burns effects **Checkpoint**: Remotion project configured ## Stage 8: Quality Assurance 1. Run automated QA pipeline (5 checks) 2. Present report w...
ai-video
reference/PIPELINE.md
Markdown
9894ff1cb722d3f5d1b3c459964cc088338896edd65d982b73f8da45a6231244
1
156
# Quality Assurance Reference ## Automated Checks The QA pipeline runs five automated checks on the assembled video: ### 1. Frame Continuity Compares the last frame of each clip with the first frame of the next. Uses perceptual hash (pHash) similarity (60% weight) and pixel-level comparison (40% weight). - Score >=...
ai-video
reference/QUALITY.md
Markdown
57a57e8f747a4ac690d991ba80df6c2986d40a8cdebe3dabfd9911f3045cddf5
0
370
# Remotion Reference ## Overview Remotion v4.x is used for video assembly, providing a browser-based editor (Studio) and programmatic rendering. ## Setup The template project lives at `templates/remotion-project/`. It is copied into each project as the `editor/` directory. ```bash cd editor npm install npx remotio...
ai-video
reference/REMOTION.md
Markdown
32b1bec32dc652f585167ce8f95e8b37cbc14bd99952a44c7edad52718528b33
0
451
# Script Engine Reference ## Script Format Scripts are structured as a list of segments, each representing an 8-second video clip. ```json { "title": "Weird Dream Vlog", "language": "de-DE", "total_duration_seconds": 32, "segments": [ { "id": 1, "text": "Leute, ich muss euch was erzählen...",...
ai-video
reference/SCRIPT-ENGINE.md
Markdown
77a10b4225a865c5e566538b5911b50eb3780e08592aefa17d2a166cba48e74f
0
542
# Troubleshooting ## Common Errors & Recovery ### API Key Issues **Error**: `Missing required environment variable: GEMINI_API_KEY` **Fix**: Set the key in your `.env` file or system environment. ```bash # .env file GEMINI_API_KEY=your-key-here ELEVENLABS_API_KEY=your-key-here ``` ### Veo Generation Blocked **Erro...
ai-video
reference/TROUBLESHOOTING.md
Markdown
34ae72bc9a290b34be6207cce72265d80aa55ac0634e0ce97dee6ab7ab58c464
0
686
# Veo 3.1 API Reference ## Models - `veo-3.1-generate-preview` — full quality, ~$0.35-0.50/clip - `veo-3.1-fast-generate-preview` — draft quality, ~$0.10-0.15/clip ## Capabilities - Text-to-video - Image-to-video (start frame) - First-and-last frame generation - Video extension (from previous clip) - Native audio gen...
ai-video
reference/VEO-API.md
Markdown
fbf5df6edb4cfa3ac3d71eec36baacca3e37aeef86c1c731074b1aeff83c932e
0
562
# YouTube Clone Mode ## Overview Clone a YouTube video's style, pacing, and structure with a new AI-generated character. The original content is adapted (not literally translated) to a target language. ## Pipeline ``` YouTube URL | v 1. Download (yt-dlp) → source.mp4 + source_audio.mp3 + metadata | ...
ai-video
reference/YOUTUBE-CLONE.md
Markdown
1a1d32e361ca4721c9851bda06f7a56f53ce797faa3e73d533a5182e4a34094f
0
403
from __future__ import annotations import json import logging from pathlib import Path from scripts.core.models import ProjectConfig, ProjectState, Script logger = logging.getLogger(__name__) class CompositionBuilder: def __init__(self, config: ProjectConfig): self.config = config def build_props(...
ai-video
scripts/assembly/composition_builder.py
Python
d059bb68460d92ca76da32e85c48b67f5ea3bccc867d2b7a7f49faf395b39932
0
629
from __future__ import annotations import logging import subprocess from pathlib import Path from scripts.core.constants import ( DEFAULT_DURATION_TOLERANCE, MIN_CLIP_DURATION, DEFAULT_TRANSITION_DURATION, DEFAULT_MUSIC_VOLUME, ) logger = logging.getLogger(__name__) class FFmpegAssembler: @stat...
ai-video
scripts/assembly/ffmpeg_fallback.py
Python
36b2babcd520d9cb922d3fdce5366bd99bbb4b354b9730149b682676aa90b5d6
0
896
y", "-i", str(video_path), "-i", str(audio_path), "-c:v", "copy", "-c:a", "aac", "-map", "0:v:0", "-map", "1:a:0", "-shortest", str(output_path), ] else: cmd = [ "ffmpeg", "-y"...
ai-video
scripts/assembly/ffmpeg_fallback.py
Python
21abbb96ea634b448c1a6b8159d7244c91c8561d2b6b49c0e52c1aaa09100a73
1
896
if i > 1 else "[0:v]" src_b = f"[{i}:v]" out_label = f"[v{i}]" if i < n - 1 else "[vout]" v_filters.append( f"{src_a}{src_b}xfade=transition={transition_type}" f":duration={td:.3f}:offset={offset:.3f}{out_label}" ) cumulative = ...
ai-video
scripts/assembly/ffmpeg_fallback.py
Python
1781749f3a2c4a9b43a497cde0b67783771c21017eca2ad18cbe02f9d898c89c
2
896
.stdout.strip()) @staticmethod def get_fps(path: Path) -> float: cmd = [ "ffprobe", "-v", "quiet", "-select_streams", "v:0", "-show_entries", "stream=r_frame_rate", "-of", "csv=p=0", str(path), ] result = subprocess.run(cmd, ca...
ai-video
scripts/assembly/ffmpeg_fallback.py
Python
4367d6bec4cdc1e61eb55b85ea0100aa16d470719030ce7436bac9e9e49dec05
3
896
", "-y"] + input_files + [ "-filter_complex", "".join(filter_parts) if len(graphics) == 1 else ";".join(filter_parts), "-map", output_label.replace("[", "").replace("]", ""), "-map", "0:a?", # Copy audio if present "-c:v", ...
ai-video
scripts/assembly/ffmpeg_fallback.py
Python
c629576a8438be0f8cc29f20187f6d62d7fad29433fafe2dffb75d18b97c9d89
4
179
from __future__ import annotations import json import logging import shutil import subprocess from pathlib import Path logger = logging.getLogger(__name__) _ROOT = Path(__file__).resolve().parent.parent.parent _TEMPLATE_DIR = _ROOT / "templates" / "remotion-project" class RemotionSetup: def __init__(self, proj...
ai-video
scripts/assembly/remotion_setup.py
Python
f1d41d7141cb4c759e0c93ee85b683a9a4454d3bed383f96fae449b04cee4973
0
702
from __future__ import annotations import logging import subprocess from pathlib import Path logger = logging.getLogger(__name__) class VideoRenderer: def __init__(self, editor_dir: Path): self.editor_dir = editor_dir def render( self, output_path: Path, composition_id: str ...
ai-video
scripts/assembly/render_video.py
Python
de9c417768442634d997520c4fee20bc8a86548a3a264eaa3bae888094cf22ff
0
446
from __future__ import annotations import logging import subprocess from pathlib import Path from scripts.core.constants import AUDIO_DUCKING_MUSIC_LEVEL logger = logging.getLogger(__name__) class AudioDucking: """Audio ducking (sidechain compression) for professional audio mixing.""" @staticmethod de...
ai-video
scripts/audio/audio_ducking.py
Python
bbcdd9f10bc046838c8897d4c7fb94b8ba41285bed0807f3cdd6c448f9b29a2c
0
469
from __future__ import annotations import logging import subprocess from dataclasses import dataclass, field from pathlib import Path from scripts.core.constants import ( DEFAULT_TARGET_LOUDNESS, DEFAULT_REVERB_DAMPING, DEFAULT_REVERB_WET, DEFAULT_LOW_CUT_HZ, DEFAULT_NOISE_GATE_THRESHOLD, DEFA...
ai-video
scripts/audio/audio_effects.py
Python
ca71f56088bdd2efe47ad73add91051ed4a5309832158a2f8c5e9993585b5a5c
0
896
(f"file '{p.resolve()}'" for p in audio_paths) list_file.write_text(list_content, encoding="utf-8") cmd = [ "ffmpeg", "-y", "-f", "concat", "-safe", "0", "-i", str(list_file), "-c", "copy", str(output_path), ] logger.info("Con...
ai-video
scripts/audio/audio_effects.py
Python
4682d8566af853e85f4f598f7bf2532ec11b0d392042720e695bbbc9529e0815
1
219
from __future__ import annotations import logging import subprocess from pathlib import Path logger = logging.getLogger(__name__) class AudioExtractor: @staticmethod def extract_audio( video_path: Path, output_path: Path | None = None, format: str = "mp3", sample_rate: int = ...
ai-video
scripts/audio/audio_extractor.py
Python
509c1e6086b7c2097e7c8b841fadebf203522c66c77974dd2b5050cce0770c92
0
538
from __future__ import annotations import logging from pathlib import Path from typing import Optional from scripts.core.edit_plan import MusicCue logger = logging.getLogger(__name__) class DynamicMusicGenerator: """Generate dynamic music segments based on EditPlan music cues.""" def __init__(self, eleven...
ai-video
scripts/audio/dynamic_music.py
Python
e073bf45fa6712105b8b8d5096f92f6e9fc7e3865493fa8a249012fcd3ebfda0
0
733
from __future__ import annotations import logging from pathlib import Path from elevenlabs.client import ElevenLabs logger = logging.getLogger(__name__) class MusicGenerator: """Generate background music using the ElevenLabs Music API. The Eleven Music API (``music_v1``) generates studio-grade instrumenta...
ai-video
scripts/audio/music_generator.py
Python
3f36cfb16ab002f15a35cdf0e238453621456f579a3493ee0789ca7f69ffb4e3
0
896
music.composition_plan.create( prompt=prompt, music_length_ms=duration_ms, ) return plan def generate_with_plan( self, composition_plan: dict, force_instrumental: bool = True, output_format: str = "mp3_44100_128", output_path: Path | N...
ai-video
scripts/audio/music_generator.py
Python
eefac1a20f282d3ed933c6033c96595affd90b9869140f658daf7834a2a7ba82
1
485
from __future__ import annotations import logging import subprocess from pathlib import Path from typing import Optional from scripts.audio.audio_ducking import AudioDucking from scripts.audio.audio_effects import AudioEffects, EffectChain from scripts.core.edit_plan import EditPlan logger = logging.getLogger(__name...
ai-video
scripts/audio/professional_audio_assembly.py
Python
afb5c72ad48a3f7d3249a9bde708788e3d3af90ab2d158de346b01fe480e3977
0
896
-y", "-i", str(voice_path), "-i", str(music_path), "-filter_complex", filter_complex, "-map", "[out]", "-c:a", "aac", "-b:a", "192k", str(output_path), ] ...
ai-video
scripts/audio/professional_audio_assembly.py
Python
8043fa403556afc4934bdff11313913cf34e5f8b52c537f533c010e9255099ff
1
87
from __future__ import annotations import logging import re from pathlib import Path from elevenlabs import ElevenLabs from scripts.core.models import ScriptSegment, VoiceProfile logger = logging.getLogger(__name__) class TTSGenerator: def __init__( self, api_key: str, model_id: str = ...
ai-video
scripts/audio/tts_generator.py
Python
908c3a74f547a8cac304983196d9708adf60603b79126038d443fe7f5a904c96
0
763