Autorial is a modular pipeline that turns screen‑recorded training videos into structured documentation. It extracts speech, topics, keyframes, tasks, and produces a tutorial‑style markdown guide with relevant screenshots.
The pipeline is designed to be transparent: each module writes intermediate JSON and the keyframes database, so you can inspect, debug, and replace steps as needed.
Prerequisites:
- Python 3.11
ffmpegandffprobeon your PATH- Ollama running locally for the LLM‑powered modules
Install dependencies:
uv sync
Run the full pipeline:
uv run python main.py input/sample_video.mp4 output -c config.ini
Resume from a stage:
uv run python main.py input/sample_video.mp4 output -c config.ini --continue-from selection
Typical outputs in output/:
<video>_speech.json– speech segments<video>_hash.json– keyframe hashes + DB references<video>_speech_topics.json– topic/task segmentation<video>_combine.json– merged topics/tasks with speech + keyframes<video>_combine_selection.json– selected screenshots per task<video>/frames.sqlite3– keyframe blobs<video>/img/*.jpg– extracted images used in markdown<video>/section_0001.md… – per‑section markdown<video>/README.md– section index with summaries
All configuration lives in config.ini. Paths are passed on the command line.
Transcription with Faster‑Whisper.
model_name: Whisper model (e.g.,large-v3)batch_size: GPU batch sizebeam_size: decoding beam sizecompute_type:float16,int8,int8_float16language: optional language code
Keyframe extraction and perceptual hashes.
fps: sampling rate (frames per second)image_format:jpgrecommendedhash_algorithm:phash,dhash,ahash,whashresized_width,resized_height: resized keyframe dimensions
Topic/task segmentation from speech.
model_name: Ollama model (defaultgpt-oss:20b)temperature: usually0.0context_window: context sizenum_predict: max output tokens
Multimodal selection of relevant screenshots per task.
model_name: vision model (defaultqwen3-vl:4b)temperature: usually0.0context_window,num_predict: token limitsimage_kind:resizedororiginalimage_format:jpgmax_retries: retry on empty responsespool_size: worker processesrequest_delay,retry_backoff: throttling
Markdown generation and summaries.
model_name: LLM for writing (defaultgpt-oss:20b)temperature: usually0.0context_window,num_predict: token limits for section outputsummary_num_predict: token limit for section summariesimage_kind:originalrecommendedimage_format:jpg
The quality of outputs depends heavily on how the video is narrated:
- Introduce each section clearly with a short statement of intent.
- State each task as an explicit action (e.g., “Now create a new realm…”).
- When a task has multiple actions, verbalize each step in order.
- Pause briefly between tasks to help the models detect boundaries.
- Name key UI elements aloud (buttons, tabs, menu items).
- Avoid long tangents that span multiple topics; it blurs segmentation.
- Keep the cursor steady when possible so screenshots are visually stable.
Each module has a CLI entry point:
python -m modules.speech <video> <output_dir> -c config.ini
python -m modules.hash <video> <output_dir> -c config.ini
python -m modules.topics <speech_json> <output_dir> -c config.ini
python -m modules.combine <topics_json> <speech_json> <hash_json> <output_dir> -c config.ini
python -m modules.selection <combine_json> <output_dir> -c config.ini
python -m modules.markdown <combine_json> <selection_json> <output_dir> -c config.ini
MIT
- Use embeddings to improve selection, by matching images to task by similarity (filtered by time frame), eg:
- Embed all images, grouped by task timeframe.
- Cluster task images to detect distint UIs / contexts.
- Generate a description of each image cluster.
- Filter out irrelevant contexts, like side-tracks.
- Determine how speeches and contexts interleave, because a context may be revisited later along the speech, as actions are performed.
- Select representative images per relevant context and timeframe.
- Improve segmentation after selection, refining sections and tasks based on selected images.
- Maybe turning back the sections and tasks into a timeline of speeches and contexts with description, and then re-segmenting that.
- Maybe let the model use tools to query the keyframe DB for images matching certain criteria.