Case study
Case Study: Turning YouTube Podcasts Into Notes With Gemini
How we built a small Python app that sends a YouTube podcast link to Gemini and saves a timestamped note into Obsidian. Code, prompt, limits.
Long-form podcasts on YouTube often run one to three hours. Listening to all of it takes an evening, and skimming at double speed means missing the parts you would have wanted to keep. A week later, most of what you heard is gone anyway. This case study describes a small desktop app we built in Python to solve that: paste a YouTube podcast link, let Gemini watch the video, and get back one structured note with timestamps, saved straight into an Obsidian vault. No video download, no local transcription step.
Key takeaways
- The Gemini API can take a public YouTube URL as input directly, so the app never downloads video, extracts audio or runs speech-to-text locally.
- The prompt is the real product. A fixed note template with timestamps, wikilinks and a “do not invent” rule matters more than the code.
- Obsidian notes are plain Markdown files in a folder, so saving a note is a file write, with no plugin or API needed.
- Run API calls on a background thread so the desktop window never freezes during long requests.
- Treat AI notes as a fast first read, not a replacement for listening, and check current limits and pricing in the official documentation before relying on it.
The workflow
| Stage | What happens | Where |
|---|---|---|
| 1. Input | User pastes a YouTube link into a queue | Desktop app (PySide6) |
| 2. Analysis | Link and prompt are sent together; the model processes the video | Gemini API |
| 3. Output | Model returns one Markdown note in a fixed structure | Gemini API |
| 4. Save | App writes the note as a .md file into the vault |
Local disk |
| 5. Review | User opens the note in Obsidian and jumps to timestamps | Obsidian |
Step 1: send the YouTube link straight to Gemini
In the Gemini API video understanding documentation, a YouTube URL is passed as a file-data part next to the text prompt. The minimal call with the google-genai Python library looked like this in our build:
from google import genai
from google.genai import types
client = genai.Client() # reads the API key from the GEMINI_API_KEY environment variable
def podcast_to_note(url: str, prompt: str) -> str:
resp = client.models.generate_content(
model="gemini-2.5-flash",
contents=types.Content(parts=[
types.Part(file_data=types.FileData(file_uri=url)),
types.Part(text=prompt),
]),
)
return resp.text
Swap in a newer model name as they become available. Even though a single request can carry more than one video, we send one podcast per request so notes never get mixed together.
Keep the API key in an environment variable or a secrets manager, never in the source file. If you ask an AI coding assistant to help build this, tell it the same rule.
Step 2: write a prompt that produces the same note every time
Notes are only useful if every file has the same structure, so you can search, filter and link them later. Our prompt fixes each section explicitly:
You are a note-taker. Watch this podcast and write ONE Markdown note in English.
Start with YAML front matter: title, channel, url, date_watched, tags (3-6, lowercase).
Then these sections, in order:
## Summary - 5 sentences max.
## Key points - bullet points, each starting with the timestamp in [MM:SS].
## Memorable quotes - up to 3 short quotes with [MM:SS].
## Actions - concrete things a listener could do.
## Links - people, books and tools mentioned, written as [[wikilinks]].
Do not invent facts. If something is unclear in the audio, say so.
Three details carry most of the value:
- Timestamps on every key point. When you want to hear a passage again, you jump to that minute instead of scrubbing.
- Wikilinks for people, books and tools. Obsidian automatically connects every podcast that mentions the same name, so a network of notes builds up over time.
- The “do not invent” line. With long content, a model may fill gaps with plausible guesses. Asking it to flag unclear passages makes errors visible instead of hidden.
Because the intelligence lives in the prompt, changing the note style (a study guide, a list of claims to fact-check, a summary in another language) means editing text, not code. We keep the prompt in a separate file the app reads at startup.
Step 3: save into the Obsidian vault
Obsidian stores each note as an ordinary .md file inside a folder, so the app only has to write a file in the right place. A naming convention that works well:
Podcast/2026-11-08 Episode title.md
The YAML front matter at the top lets you filter notes by channel, tag or date inside Obsidian. A minimal save function:
import re
from datetime import date
from pathlib import Path
def save_note(vault: Path, title: str, markdown: str) -> Path:
safe = re.sub(r'[\\/:*?"<>|]', "", title).strip()[:120]
folder = vault / "Podcast"
folder.mkdir(parents=True, exist_ok=True)
path = folder / f"{date.today().isoformat()} {safe}.md"
path.write_text(markdown, encoding="utf-8")
return path
Stripping characters that are illegal in file names avoids failures on episode titles full of colons and question marks.
Step 4: a PySide6 interface that does not freeze
A long podcast can take minutes to process. If the API call runs on the interface thread, the window locks up and the operating system may report it as not responding. The fix is to run each request on a background worker (QThreadPool with a QRunnable, or a QThread) and send results back to the interface through signals. The minimum interface:
- a field to paste a link and a button to add it to the queue;
- a queue list with a status per item: waiting, processing, done, error;
- a vault folder picker that remembers the last choice;
- a button to open the note that was created.
Errors deserve a clear message in the queue rather than a crash: an invalid link, a private video, a quota error or a network timeout should each show something the user can act on.
Limits to know before you build
- Public videos only. In our testing, private and unlisted videos could not be processed this way.
- Quotas and pricing change. YouTube input has daily limits on the free tier and the feature has been labelled preview. Check the official documentation for current numbers before you plan around them.
- Long videos use a lot of tokens. For a podcast where the picture is two people talking, the visuals add little. Using a lower media resolution setting keeps cost down without hurting note quality much.
- Very long episodes can be split. The API lets you set start and end offsets for a clip, so you can generate notes per segment and merge them.
What worked and what did not
| Strengths | Weaknesses |
|---|---|
| No download and no local speech-to-text | Works only with public YouTube videos |
| Timestamped notes make it easy to revisit a passage | AI summaries can still be wrong or miss points |
| Plain Markdown files, readable in any editor | Requires installing Python, libraries and creating an API key |
| Changing the prompt changes the note style without code changes | Depends on a provider’s pricing and preview-stage limits |
The biggest practical lesson: the first version of the prompt produced pleasant summaries that were hard to use. Forcing timestamps on every point and a strict section order turned the notes from something to read once into something to come back to.
If you want a similar pipeline for your team, for meeting recordings, webinars or training videos feeding a shared knowledge base, our AI automation service can design and build it.
FAQ
Do I need to be a developer to build this?
Not necessarily. The app is a few hundred lines of Python, and with an AI coding assistant a motivated non-developer can get it working. Expect to spend some time on setup the first time.
Does it work with podcasts that are not on YouTube?
Not with this exact method, which relies on passing a YouTube URL. For audio files you would upload the file to the API instead, which adds a step.
Can the notes be in a language other than English?
Yes. Change the language line in the prompt. You can also ask for quotes in the original language with a translation next to them.
Can I trust the timestamps?
They were usually close in our testing, but spot-check a few per note, especially on very long episodes.
How this article was made: this is our own case study of an app we built and used, with the integration details checked against the Gemini API documentation linked above. Model names, limits and pricing change over time, so verify them in the documentation before you build.
Sources
Written by the CTRL ALT AI team with AI assistance and edited by a person.