GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ishan-parihar/CineSync: Automated video production pipeline — lip-sync synchronization, emotion-driven shot selection, Docker deployment

BranchesTags
Open more actions menu

Latest commit

 

History

24 Commits
24 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.vscode
.vscode
 
 
assets
assets
 
 
config
config
 
 
docs
docs
 
 
lipsync_automation.egg-info
lipsync_automation.egg-info
 
 
lipsync_automation
lipsync_automation
 
 
profiles
profiles
 
 
scripts
scripts
 
 
tests
tests
 
 
tools/rhubarb
tools/rhubarb
 
 
web-ui
web-ui
 
 
.flake8
.flake8
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.isort.cfg
.isort.cfg
 
 
.pre-commit-config.yaml
.pre-commit-config.yaml
 
 
CHARACTER_ASSET_CREATION_MANUAL.md
CHARACTER_ASSET_CREATION_MANUAL.md
 
 
Dockerfile.backend
Dockerfile.backend
 
 
Dockerfile.frontend
Dockerfile.frontend
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
SETUP_MANUAL.md
SETUP_MANUAL.md
 
 
demo_structure_export.json
demo_structure_export.json
 
 
docker-compose.yml
docker-compose.yml
 
 
mypy.ini
mypy.ini
 
 
pyproject.toml
pyproject.toml
 
 
requirements.txt
requirements.txt
 
 
setup.py
setup.py
 
 
workspace-lint.yaml
workspace-lint.yaml
 
 

Repository files navigation

CineSync

⚠️ DEPRECATED / INACTIVE — archived for reference. See the assets/ + docs/ directories for prior work; no further development is planned. Superseded by scorestrata and the CONTENT-CREATION/openscript pipeline for media automation.

[Status: Archived] License: MIT Language: Python

An audio-to-video automation system that applies psycho-cinematic principles to generate emotionally-responsive talking-head video content. Detected emotions drive camera distance, angle, and timing decisions — producing video that feels like a professional cinematographer made the calls, not a static script.

The Problem

Most automated talking-head videos are emotionally flat. A single camera angle, fixed expression, identical pacing regardless of whether the narration is joyful, tense, or somber. This creates a visual disconnect — the audio carries emotional weight, but the visuals ignore it entirely.

The result is an uncanny valley effect: technically correct lip sync with a disconnected presentation that undermines the message. Making professional-looking video at scale requires either manual cinematography or expensive post-production work.

The Solution

CineSync closes the loop between audio and visuals. It analyzes narration for emotional content — eight distinct emotions with valence and arousal metrics — then translates those findings into cinematographic decisions: shot distance (Extreme Close-Up for high intensity, Medium Shot for calm), camera angle (Dutch angle for distress, eye-level for neutrality), and timing (faster cuts for tension, held frames for reflection).

The system also validates every generated shot sequence against 32 cinematography grammar rules, ensuring professional flow between segments rather than jarring random jumps.

Engineering Highlights

Psycho-Cinematic Mapping Engine

An 8-emotion taxonomy (Joy, Sadness, Anger, Fear, Surprise, Disgust, Trust, Anticipation) drives automated cinematography decisions. Valence (positive/negative) and arousal (intensity) values map to shot distances — Extreme Close-Ups for high arousal, Medium Shots for calm — and camera angles, including Dutch angles for distress signals and eye-level for neutral speech.

Cinematographic Grammar Validation

A validation layer checks every generated shot sequence against 32 industry-standard cinematography rules. This prevents the "random jump" feel common in automated video: transitions between emotional segments maintain visual coherence, shot progressions follow professional narrative flow, and jump cuts only appear where grammar permits.

Emotional Viseme Synchronization

Beyond basic phoneme-to-mouth mapping, the system maps detected emotions to specific mouth shapes. A joyful greeting produces visually different micro-expressions than an angry one, because the viseme selection is emotion-aware. This aligns the character's facial expressions with the audio's tone, increasing perceived realism.

Tension-Based Pacing

Narrative tension analysis informs shot duration and transition decisions. High-tension segments trigger faster cuts and shorter held frames. Transitional passages use dissolves or match cuts. Calm moments allow held Medium Shots to breathe. The pacing layer produces output that feels authored rather than assembled.

Tech Stack

Component Technology Purpose
Language Python 3 Core implementation
Lip Sync Rhubarb Lip Sync Phoneme extraction
Emotion Analysis ONNX Runtime + audio2emotion 8-emotion classification from audio
Audio Processing Librosa + soundfile Feature extraction
Video Generation FFmpeg Frame compositing, encoding
Caching Local disk cache Phoneme and emotion caching
Concurrency Python multiprocessing Batch parallel processing

Quick Start

Prerequisites

  • Python 3.10+
  • FFmpeg (in PATH)
  • Rhubarb Lip Sync (bundled in tools/rhubarb/)
  • audio2emotion ONNX model at ./models/audio2emotion/network.onnx

Installation

# Clone the repository
git clone https://github.com/ishanparihar/CineSync.git
cd CineSync

# Create virtual environment
python -m venv venv
.\venv\Scripts\Activate.ps1

# Install dependencies
pip install -r requirements.txt

FFmpeg can be installed via winget or Chocolatey.

Process a Single Audio File

python src/cli.py --audio assets/audio/raw/narration.wav --output output/video.mp4

Batch Process a Directory

python src/batch_processor.py --input assets/audio/raw --output output/batch --workers 4

Command-Line Interface

Flag Description
--audio Path to input audio file (required)
--output Path for output video file (required)
--preset Character preset to use (e.g., character_1/front)
--config Path to configuration file (default: config/settings.json)
--fps Override frames per second
--no-cache Disable phoneme and emotion caching
--verbose Enable detailed debug logging
--list-presets List all available character presets

Project Structure

CineSync/
├── README.md
├── requirements.txt
├── config/
│   └── settings.json           # Paths to FFmpeg, Rhubarb, model
├── tools/
│   └── rhubarb/                # Rhubarb Lip Sync binary
├── models/
│   └── audio2emotion/          # ONNX emotion model
│       └── network.onnx
├── assets/
│   ├── audio/raw/              # Input audio files
│   └── presets/                 # Character image presets
│       └── character_1/front/  # Per-character assets
│           ├── background.png
│           └── mouth_*.png      # Viseme images
├── output/                      # Generated video output
├── src/
│   ├── cli.py                  # Main CLI entry point
│   ├── batch_processor.py       # Parallel batch processing
│   └── core/
│       ├── emotion_engine.py     # Audio analysis + emotion mapping
│       ├── cinematographer.py     # Shot selection + grammar validation
│       ├── viseme_sync.py        # Emotion-aware mouth shape mapping
│       ├── tension_analyzer.py    # Narrative tension scoring
│       ├── video_composer.py      # FFmpeg-based frame assembly
│       └── preset_manager.py      # Character preset management
└── tests/

Development Status

Operational. Core pipeline (emotion analysis, cinematography, lip sync, video assembly) is functional. Batch processing supports parallel execution. Character preset system supports multi-angle assets and emotion-specific visemes.

License

MIT License — see LICENSE file for details.


Developed by Ishan Parihar — If you find this useful, consider supporting

About

Automated video production pipeline — lip-sync synchronization, emotion-driven shot selection, Docker deployment

Topics

automationdockeremotion-recognitionfastapilip-syncpythonvideo-production

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.