How kirtom/nepalvideo works
Nepal is a local trek-media-to-documentary pipeline. Its principal workflow probes raw media, builds a chronological story spine, processes clips into analyzable shots, then applies semantic analysis and scoring before assembly and rendering. The README also documents GPS/place enrichment, Telegram and music mapping, approval gates, and a short cut. Later-stage capabilities are included from the README and tree; their detailed internal wiring is not shown in the sampled source, so links there are limited to the documented stage flow.
Main entry points: s02_spine.py S02 Spine · s03_process.py S03 Process · s01_probe.py S01 Probe · cli.py CLI
Components 31
Pipeline control
- CLI
src/nepal/cli.py
Probe and story
- S01 Probe
src/nepal/stages/s01_probe.py - Asset manifest
src/nepal/probe/manifest.py - Chapter grouping
src/nepal/probe/chapters.py - Lens FOV
src/nepal/probe/fov.py - Clock offsets
src/nepal/probe/clock.py - S02 Spine
src/nepal/stages/s02_spine.py - GPS track
src/nepal/spine/gps.py - Elevation
src/nepal/spine/dem.py - Place names
src/nepal/spine/geocode.py - Act boundaries
src/nepal/spine/acts.py - Telegram story
src/nepal/spine/telegram.py - Music map
src/nepal/spine/music.py
Clip processing
- S03 Process
src/nepal/stages/s03_process.py - Proxy and views
src/nepal/process/reproject.py - Shot detection
src/nepal/process/shots.py - Clip metrics
src/nepal/process/metrics.py - Audio analysis
src/nepal/process/audio.py - Speech transcription
src/nepal/process/asr.py - Quality gate
src/nepal/process/gate.py
Semantic and edit
- S04 Semantic
src/nepal/stages/s04_semantic.py - S05 Score and cut
src/nepal/stages/s05_cut.py - Shortlist
src/nepal/select.py - Assembly
src/nepal/process/assemble.py - Draft render
src/nepal/process/render.py
State and references
- Pipeline database
src/nepal/db.py - Reference data
src/nepal/reference.py
Other components
- Operator
- Raw media
- SRTM and GeoNames
- Documentary and short
Connections 33
- Operator → CLI: runs stages
- Raw media → S01 Probe: probes files
- CLI → S01 Probe: dispatches
- S01 Probe → Asset manifest: builds inventory
- S01 Probe → Chapter grouping: groups chapters
- S01 Probe → Lens FOV: solves lens
- S01 Probe → Clock offsets: solves offsets
- S01 Probe → Pipeline database: records results
- CLI → S02 Spine: dispatches
- S02 Spine → GPS track: builds track
- S02 Spine → Elevation: adds elevation
- S02 Spine → Place names: resolves places
- S02 Spine → Act boundaries: sets acts
- S02 Spine → Telegram story: processes messages
- S02 Spine → Music map: maps music
- S02 Spine → Reference data: reads datasets
- Reference data → SRTM and GeoNames: fetches
- S02 Spine → Pipeline database: records story
- CLI → S03 Process: dispatches
- S03 Process → Proxy and views: creates proxies
- S03 Process → Shot detection: detects shots
- S03 Process → Clip metrics: measures shots
- S03 Process → Audio analysis: analyzes audio
- S03 Process → Speech transcription: transcribes speech
- S03 Process → Quality gate: gates quality
- S03 Process → Pipeline database: records processing
- CLI → S04 Semantic: dispatches
- S04 Semantic → S05 Score and cut: semantic inputs
- CLI → S05 Score and cut: dispatches
- S05 Score and cut → Shortlist: ranks candidates
- S05 Score and cut → Assembly: selects edit
- Assembly → Draft render: builds draft
- Draft render → Documentary and short: produces