How emrtasknn/youtube-shorts-bot-v2 works
This is a production-oriented YouTube Shorts automation service. Its primary workflow generates a Short from a topic, renders and quality-checks it, then requires Telegram human approval before YouTube publishing. Separate capabilities handle provider reliability and performance-driven experimentation; experiment results are policy-gated rather than automatically promoted. The README documents the broad pipeline and safety boundaries; some subsystem wiring is not shown in the sampled source, so those links are omitted or marked unverified.
Main entry points: generate_custom_short.py Generation orchestrator · telegram_control.py Approval control plane · scene_contract.py Scene planning · ffmpeg.py Video rendering
Components 23
Short generation
- Custom Short command
app/__main__.py - Generation orchestrator
app/application/use_cases/generate_custom_short.py - Script and narrative
app/application/services/hook_engine.py - Visual retrieval
app/application/use_cases/search_stock_media.py - Scene planning
app/application/services/scene_contract.py - Scene timing
app/application/services/scene_timing.py - Camera motion
app/application/services/camera_motion.py - Visual beats
app/application/services/visual_beat.py - Speech synthesis
app/application/ports/tts.py - Video rendering
app/infrastructure/video/ffmpeg.py - Video quality checks
app/application/services/video_judge.py
Review and publishing
- Approval control plane
app/application/services/telegram_control.py - Telegram worker
app/application/services/telegram_worker.py - YouTube publishing
app/infrastructure/providers/youtube.py - PostgreSQL state
app/infrastructure/database/models.py
Provider reliability
- Runtime assembly
app/runtime.py - Provider reliability
app/infrastructure/providers/reliability.py
Learning and optimization
- Performance memory
app/domain/performance_memory.py - Experiments and policy
app/domain/optimization.py - Production policy adapter
app/application/services/optimization_production_adapter.py
Other components
- Content creator
- Text, media and TTS providers
- Telegram reviewer
Connections 27
- Content creator → Custom Short command: requests generation
README.md - Custom Short command → Generation orchestrator: starts generation
app/__main__.py - Generation orchestrator → Script and narrative: creates narrative
README.md - Generation orchestrator → Visual retrieval: retrieves visuals
README.md - Generation orchestrator → Scene planning: plans scenes
README.md - Generation orchestrator → Speech synthesis: synthesizes speech
README.md - Generation orchestrator → Video rendering: renders video
README.md - Generation orchestrator → Video quality checks: quality checks
README.md - Visual retrieval → Text, media and TTS providers: searches media
- Generation orchestrator → Text, media and TTS providers: requests generation
- Scene planning → Scene timing: allocates timing
app/application/services/visual_beat.py - Scene planning → Visual beats: defines beats
app/application/services/visual_beat.py - Video rendering → Camera motion: uses motion plans
app/infrastructure/video/ffmpeg.py - Video rendering → Visual beats: uses visual timelines
app/infrastructure/video/ffmpeg.py - Video quality checks → Generation orchestrator: informs retry
app/application/use_cases/generate_custom_short.py - Generation orchestrator → Approval control plane: submits for approval
README.md - Telegram reviewer → Telegram worker: sends review response
README.md - Telegram worker → Approval control plane: handles updates
app/application/services/telegram_worker.py - Approval control plane → YouTube publishing: publishes approved video
README.md - Approval control plane → PostgreSQL state: persists approval state
README.md - Runtime assembly → Provider reliability: assembles reliability
app/runtime.py - Provider reliability → Text, media and TTS providers: routes provider calls
- YouTube publishing → PostgreSQL state: persists upload state
README.md - Performance memory → Experiments and policy: informs experiments
README.md - Experiments and policy → Production policy adapter: gates policy changes
README.md - Production policy adapter → Generation orchestrator: supplies generation input
README.md - Approval control plane → Performance memory: uses performance memory
app/application/services/telegram_control.py