Skip to content

Repository files navigation

VideoToNotes

Generate structured study notes from video transcripts and slide presentations using AI.

Overview

Two pipelines are available depending on your source material:

Video Notes (New-VideoNotes.ps1)

Transforms YouTube videos or local transcripts into comprehensive markdown notes:

  1. Transcribe - Download YouTube video and transcribe audio via Azure Speech (optional)
  2. Normalize - Convert varied index formats to consistent JSON (LLM)
  3. Chunk - Split transcript into ~20KB pieces (Python)
  4. Extract - Generate notes per section from relevant chunks (LLM)
  5. Assemble - Build final markdown document (deterministic)

Presentation Notes (New-PresentationNotes.ps1)

Transforms a PDF slide deck and video recording into annotated notes:

  1. Extract - Render PDF pages as images and extract text per slide (Python)
  2. Transcribe - Extract audio from the video and transcribe via Azure Speech
  3. Align - Map transcript segments to slides using LLM
  4. Annotate - Generate detailed notes per slide using LLM
  5. Assemble - Build final markdown with embedded slide images

Quick Start

Video Notes from YouTube

# Using GitHub Models (default)
.\New-VideoNotes.ps1-YouTubeUrl "https://www.youtube.com/watch?v=VIDEO_ID"# Using Azure OpenAI
.\New-VideoNotes.ps1-YouTubeUrl "https://www.youtube.com/watch?v=VIDEO_ID"`-Provider Azure `-AzureEndpoint "https://<name>.cognitiveservices.azure.com/"`-AzureDeployment "gpt-4.1-mini"

Video Notes from Existing Files

.\New-VideoNotes.ps1-Index "staging\video_title\contents.md"`-Transcript "staging\video_title\transcript.srt"

Presentation Notes

# From a local video file
.\New-PresentationNotes.ps1-PdfFile "slides.pdf"-VideoFile "recording.mp4"# From a stream URL
.\New-PresentationNotes.ps1-PdfFile "slides.pdf"`-StreamUrl "https://example.com/manifest.mpd"# From a pre-existing transcript
.\New-PresentationNotes.ps1-PdfFile "slides.pdf"-Transcript "transcript.srt"# Using Azure OpenAI
.\New-PresentationNotes.ps1-PdfFile "slides.pdf"-VideoFile "recording.mp4"`-Provider Azure `-AzureEndpoint "https://<name>.cognitiveservices.azure.com/"`-AzureDeployment "gpt-4.1-mini"

Project Structure

VideoToNotes/
├── New-VideoNotes.ps1 # Entry point for video notes pipeline
├── New-PresentationNotes.ps1 # Entry point for presentation notes pipeline
├── requirements.txt # Python dependencies
├── terraform/ # Azure infrastructure (Terraform)
│ ├── main.tf # Resource definitions
│ ├── variables.tf # Input variables
│ ├── outputs.tf # Output values (endpoints, CLI commands)
│ ├── providers.tf # Provider configuration (azurerm, random)
│ └── terraform.tfvars # Variable values (non-sensitive)
├── staging/
│ └── <video_title>/ # Video-specific working folders
│ ├── contents.json # Extracted chapters (JSON)
│ ├── contents.md # Extracted chapters (Markdown)
│ ├── transcript.srt # Transcribed audio (SRT format)
│ └── debug/ # Intermediate files
├── input/ # Manual input files
├── output/ # Generated notes
└── src/
├── prompts/ # LLM prompt templates
│ ├── normalize.md
│ ├── extract.md
│ ├── merge.md
│ ├── section_extract.md
│ ├── targeted_extract.md
│ ├── slide_align.md
│ └── slide_annotate.md
├── powershell/
│ ├── Split-Transcript.ps1
│ ├── Get-YouTubeContents.ps1
│ ├── Invoke-VideoTranscription.ps1
│ └── Invoke-YouTubeTranscription.ps1
└── python/
├── notes_generator/ # Video notes pipeline
│ ├── main.py
│ ├── llm_client.py # GitHub Models + Azure OpenAI clients
│ ├── generate_contents.py # Fallback TOC generator
│ ├── models.py
│ ├── prompt_loader.py
│ └── stages/
│ ├── normalize.py
│ ├── chunk.py
│ ├── extract_by_section.py
│ ├── merge.py
│ ├── validate.py
│ └── assemble.py
└── presentation_notes/ # Presentation notes pipeline
├── main.py
├── pdf_processor.py
├── models.py
├── prompt_loader.py
└── stages/
├── align.py
├── annotate.py
└── assemble.py
└── tests/

Prerequisites

  • Python 3.10+
  • PowerShell 7+ (pwsh)
  • VS Code with recommended extensions

For YouTube Transcription

ToolPurposeInstallation
yt-dlpYouTube audio downloadwinget install yt-dlp
ffmpegAudio conversionwinget install ffmpeg
Azure Speech CLITranscriptiondotnet tool install -g Microsoft.CognitiveServices.Speech.CLI

For Azure OpenAI Provider

  • Azure CLI (az) installed and logged in (az login)
  • An Azure AI Services resource (see Terraform Deployment below)

Installation

The PowerShell wrapper handles environment setup automatically on first run.

Manual setup:

python -m venv .venv
.venv\Scripts\Activate.ps1
pip install -r requirements.txt

Or use VS Code tasks: Ctrl+Shift+P → "Tasks: Run Task" → "Setup: Install Dependencies"

Terraform Deployment

The terraform/ directory provisions all required Azure resources:

ResourcePurpose
Resource Groupproject-videonotes-tf
Azure AI ServicesSpeech transcription + OpenAI chat completions
GPT-4.1-mini deploymentLLM for notes extraction pipeline
Storage AccountAudio uploads for batch transcription

Deploy

cd terraform
terraform init
terraform plan
terraform apply

Configure spx After Deployment

After terraform apply, run the commands shown in the spx_config_commands output:

terraform output spx_config_commands
# Run the two spx config commands it prints

Get Azure Provider Arguments

$endpoint= terraform output -raw azure_openai_endpoint
$deployment= terraform output -raw model_deployment_name

Then pass them to either script with -Provider Azure -AzureEndpoint $endpoint -AzureDeployment $deployment.

Usage

New-VideoNotes.ps1 Parameters

ParameterRequiredDefaultDescription
-YouTubeUrlYes*YouTube video URL
-IndexYes*Path to index/TOC file with timestamps
-TranscriptYes*Path to SRT transcript file
-OutputNoAuto-generatedOutput path for notes
-ExtractModelNogpt-4.1-miniModel for extraction stage
-MergeModelNogpt-4.1-miniModel for merge stage
-LanguageNoen-USLanguage code for transcription
-KeepIntermediateFilesNofalseKeep audio files after transcription
-ProviderNoGitHubLLM provider: GitHub or Azure
-AzureEndpointNo†Azure OpenAI endpoint URL
-AzureDeploymentNo†Azure OpenAI deployment name

*Either -YouTubeUrl OR both -Index and -Transcript are required. †Required when -Provider Azure is specified.

New-PresentationNotes.ps1 Parameters

ParameterRequiredDefaultDescription
-PdfFileYesPath to PDF slide deck
-VideoFileYes*Path to local video file
-StreamUrlYes*URL to a stream manifest (.mpd, .m3u8)
-TranscriptYes*Path to pre-existing SRT transcript
-OutputNoAuto-generatedOutput path for notes
-ModelNogpt-4.1-miniModel for alignment and annotation
-LanguageNoen-USLanguage code for transcription
-DpiNo200DPI for PDF rendering
-KeepIntermediateFilesNofalseKeep audio files after transcription
-ProviderNoGitHubLLM provider: GitHub or Azure
-AzureEndpointNo†Azure OpenAI endpoint URL
-AzureDeploymentNo†Azure OpenAI deployment name

*One of -VideoFile, -StreamUrl, or -Transcript is required. †Required when -Provider Azure is specified.

Input File Formats

Index File (Video Notes)

Various formats are supported — the normalize stage uses an LLM to convert any format to structured JSON.

FreeCodeCamp style:

☁️ Introduction
🎤 (00:00:00) Introduction to AI-900
🎤 (00:08:18) Exam Guide Breakdown

Simple style:

00:00 - Introduction
00:15 - AI models and their knowledge
01:31 - RAG to the rescue

Transcript File

SRT format (produced by Azure Speech CLI or provided externally):

100:00:00,000 --> 00:00:04,500
Hey, this is the introduction to the course.
200:00:04,500 --> 00:00:09,000
We'll cover the fundamentals today.

AI Models and Providers

Both scripts support two LLM providers:

ProviderAuthWhen to Use
GitHub (default)gh CLI tokenLocal development, no Azure subscription needed
Azureaz CLI token (managed identity-compatible)Production, cost control, private deployments
StageDefault ModelPurpose
Normalizegpt-4.1-miniIndex → structured JSON
Extractgpt-4.1-miniPer-section notes generation
Aligngpt-4.1-miniSlide-to-transcript mapping
Annotategpt-4.1-miniPer-slide notes generation

Pipeline Stages

Video Notes

StageInputOutputTechnology
NormalizeRaw index fileStructured JSONLLM
ChunkSRT transcriptZIP of ~20KB chunksPython
ExtractIndex + chunksNotes per sectionLLM
AssembleExtracted sectionsFinal markdownPython

Presentation Notes

StageInputOutputTechnology
ExtractPDF fileSlide images + textPython (pdf2image)
TranscribeVideo/streamSRT transcriptAzure Speech CLI
AlignSlides + transcriptSlide-transcript mappingLLM
AnnotateSlide mappingNotes per slideLLM
AssembleAnnotated slidesFinal markdownPython

Output Format

### Section Title**Timestamp**: 00:12:51 – 00:13:58
**Key Concepts**- Concept 1
**Definitions**-**Term 1**: Definition text
**Key Facts**- Fact 1
**Examples**- Example 1
**Key Takeaways 🎯**- Tip 1

Debugging

VS Code debug configurations are provided:

ConfigurationDescription
PowerShell: Transcript ChunkerDebug the chunker with a sample file
PowerShell: Interactive SessionREPL for testing
Python: Current FileDebug any open Python file
Python: Notes Generator (Full Pipeline)Debug the complete video notes pipeline
Python: Extract/Merge/Assemble Stage OnlyDebug individual stages

Press F5 to launch the selected configuration.

Author

Greg Tate

About

Transform video transcripts into hierarchical, exam-focused study notes using Azure Speech and the GitHub Models API.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages