YouTube LLM Summarizer

by TeiNam
5
4
3
2
1
Score: 50/100

Description

Obsidian plug-in Youtube Summarizer

Reviews

No reviews yet.

Stats

0
stars
25
downloads
0
forks
4
days
4
days
4
days
11
total PRs
0
open PRs
0
closed PRs
11
merged PRs
0
total issues
0
open issues
0
closed issues
22
commits

Latest Version

5 days ago

Changelog

First public release.

  • Summarize YouTube captions into structured study notes without a separate server, audio download, or speech-to-text.
  • AI providers: Amazon Bedrock (AWS profile first, Bearer token fallback), OpenAI and OpenAI-compatible servers, Anthropic Claude, Google Gemini.
  • Single and bulk URL summaries, pasted transcripts, and a subscription feed with channel groups and per-channel save folders.
  • API keys are kept in Obsidian's secret storage, not in the plugin data file.
  • English and Korean UI with a separate summary language.

Requires Obsidian 1.13.0 or later. See the README for setup, network use, and access outside the vault.

README file from

Github

YouTube LLM Summarizer

TypeScript Obsidian AWS Bedrock Vitest GitHub Actions License

Buy Me A Coffee

English | 한국어

Overview

Fetch YouTube captions inside Obsidian, translate and summarize them with the AI model of your choice, and save the result as a study note. It works without a separate summary server, Python, yt-dlp, audio downloads, or speech-to-text.

Local processing here means the plugin itself collects the captions and runs the summary flow. If you pick a cloud model, the captions are sent to that AI provider and usage fees may apply. Point an OpenAI-compatible server such as Ollama or LM Studio at a local address to run the model on your own machine as well.

Features

  • Automatic and manual caption collection, or paste a transcript yourself
  • Amazon Bedrock with AWS profile authentication first (IAM Roles Anywhere, SSO), falling back to a Bearer token
  • OpenAI and OpenAI-compatible servers, Anthropic Claude, Google Gemini
  • Captions already in the target language are summarized directly; other languages are translated first, then summarized as a genre-aware study note
  • One-line summary, details, key insights, keywords, and topics for further exploration
  • Chunked translation for long captions, with input limits and truncation checks
  • Sequential bulk summaries that keep failed links for retry
  • Subscription feed with channel groups, per-channel save folders, and a "summarized" marker; Shorts are left out
  • Per-channel auto summarize: new videos are summarized into notes once a day has passed since upload
  • English, Korean, and Japanese UI, with a separate summary language setting
  • Open the note right after a summary, per-stage progress in the feed, and a stop button for bulk runs
  • Sidebar status panel: current AI provider and model, feed status, group and channel counts, and the channel list
  • API keys kept in Obsidian's secret storage instead of the plugin data file; settings are searchable from Obsidian's settings search
  • Connection test in settings to verify authentication and the model (Bedrock reports which authentication was actually used)
  • YY-MM-DD Video title.md file names, upload date, embedded video, and YAML frontmatter

Installation

git clone https://github.com/TeiNam/obsidian-youtube-llm-summarizer.git
cd obsidian-youtube-llm-summarizer

# Install dependencies
npm ci

# Test and build for production
npm test
npm run build

Copy main.js, manifest.json, and styles.css into .obsidian/plugins/youtube-llm-summarizer/ in your vault, then enable the plugin. If you installed it under the previous ID (obsidian-youtube-summarizer), move that folder's data.json into the new folder to keep your settings. The AWS SDK and the summary prompts are bundled into main.js.

Requires Obsidian 1.13.0 or later. API key authentication works on desktop and mobile. AWS profile and SSO authentication require the Obsidian desktop runtime with Node.js 20 or later. If your runtime is older, update Obsidian with the latest installer.

Usage

Click the YouTube icon in the left ribbon, or run Open sidebar from the command palette, to open the sidebar. You can also switch tabs with Enter, Space, and the left and right arrow keys.

URL summary tab

  • Single summary: Paste a YouTube link and press Enter or click Summarize. The view shows each stage (extracting captions → translating → summarizing → creating the note), and when it finishes, the Open note link opens the new note.
  • Script / transcript: Paste a transcript to summarize it directly. This section opens automatically when the captions cannot be fetched from YouTube.
  • Bulk summarize (multiple links): Enter one link per line and they are summarized in order. While it runs you can Stop after current video, and when it ends you see the reason for each failed link. Failed or unprocessed links and lines that are not YouTube links stay in the input.
  • Status panel: Below the tab you see the AI provider and model used for summaries, the subscription feed status (Ready / YouTube Data API key required / No channels added), the number of groups, the number of channels, and the channel list (ordered by group, then by the order added; ungrouped channels last). If the current settings cannot run a summary, the reason is shown here too. The panel refreshes whenever settings are saved.

Subscription feed tab

Add a YouTube Data API key and channels in settings to see each channel's latest videos, organized by group. Click a video title to open it on YouTube, or click Summarize to summarize it with the progress stage shown on the item. Summarized videos are marked as complete, and you can click the marker to open a note created in the current session. If the channels cannot be loaded, the reason (such as an invalid API key) is shown. Shorts are not listed; only regular videos count toward the per-channel number.

Auto summarize

Turn on Auto summarize for a channel under Settings → Monitored channels to have its new videos summarized into notes without clicking anything.

  • Which videos: regular videos (no Shorts) uploaded after you turned the toggle on, and not summarized yet. Videos that were already up when you turned it on are left alone.
  • When: once at least one day has passed since upload. The wait gives YouTube time to generate automatic captions.
  • How often: the plugin checks the channels once a day, while Obsidian is open. Restarting Obsidian does not trigger another check on the same day. Because of the daily check, a note can appear up to about two days after upload.
  • Captions still missing: this is not treated as a failure. The video is tried again at the next daily check, with no notice.
  • Model errors: if the AI provider fails after the request was sent, you get a notice and the video is not retried automatically until Obsidian restarts, so a failing video does not keep costing money. Summarize it from the feed to retry by hand.
  • Where: notes go to the channel's save folder, or the subscription save folder if none is set. A notice appears for each note created.
  • Limit: only the latest videos in the feed (the per-channel number, 1–10) are considered, so a channel that uploads more than that within a day can have videos skipped.

Auto summarize sends captions to your AI provider and uses its paid quota without asking each time. Each daily check also uses two YouTube Data API quota units per channel.

Model settings

Choose the AI provider and model ID under Settings → YouTube LLM Summarizer. Credentials and model IDs are stored separately for each provider. The API key of the old summary server cannot be used as an AI provider key.

Provider Required settings How it is called
Amazon Bedrock AWS region, model or inference profile ID/ARN, and at least one of an AWS profile name or a Bedrock API key AWS SDK credentials + SigV4 when a profile is set; Converse + Bearer authentication when there is no profile or its credentials cannot be loaded
OpenAI / OpenAI-compatible Base URL, model ID, API key Chat Completions
Anthropic Claude Model ID, Anthropic API key Messages
Google Gemini Model ID, Gemini API key generateContent

You can type a model ID directly. The default Bedrock example is us-east-1 / us.anthropic.claude-sonnet-4-6; set a region and a model or inference profile that your account can access.

Load models fetches the list for the current provider. For Bedrock it keeps only the latest version of each Claude family (haiku, opus, sonnet) and saves the list in settings. The saved list is used until you load it again, and is shown as a dropdown. Use Enter manually... in the dropdown for a model or inference profile ARN that is not in the list. Listing requires permission to list either inference profiles or foundation models.

Connection test sends a short request with the current settings to check authentication and the model. For Bedrock it tells you whether the AWS profile, the Bearer token, or the Bearer token after a profile failure was used. It consumes a few tokens.

Bedrock authentication order

  1. On desktop, if AWS profile is set, the plugin calls Bedrock with that profile first.
  2. If the profile is empty, the app is running on mobile, or the profile's credentials cannot be loaded, it calls Bedrock with the Bedrock Bearer token.
  3. If credentials were obtained but the call fails with a permission or model error, it does not fall back to the Bearer token and shows the error.

When the plugin falls back to the Bearer token it shows a notice, and it does not retry the profile again within the same summary.

Bedrock Bearer token

Enter the API key issued in the Bedrock console in Bedrock Bearer token. The Bearer prefix is optional. This field is not for an IAM access key ID or an SSO login token.

AWS profile (IAM Roles Anywhere, SSO)

For IAM Roles Anywhere, create a profile in ~/.aws/config that sets credential_process to aws_signing_helper, and enter its name. The helper and certificate paths must be absolute paths on this computer.

For SSO, configure a profile with the AWS CLI and sign in.

# Skip the configure step if the profile already exists
aws configure sso --profile my-bedrock
aws sso login --profile my-bedrock

Enter my-bedrock in the plugin's AWS profile field. The SDK reads credentials from ~/.aws/config and the SSO cache. Existing shared AWS profiles also work. When the session expires, renew it with the same login command.

Calls made with a profile are pinned to SigV4, so an AWS_BEARER_TOKEN_BEDROCK environment variable left in your environment cannot take the place of the profile you entered.

OpenAI-compatible servers and local models

Enter the base URL including /v1.

Server Example base URL Model ID / API key
OpenAI https://api.openai.com/v1 An available model ID / OpenAI API key
Ollama http://localhost:11434/v1 The name of an installed model / key optional
LM Studio http://localhost:1234/v1 A model ID served by the server / key optional
Other compatible servers The provider's HTTPS base URL That provider's model ID / API key

HTTP is allowed only for localhost, 127.0.0.1, and [::1]. Any other address requires HTTPS and an API key. Changing the base URL sends the current OpenAI-compatible key to the new address, so check the address and the key together.

Key storage

API keys are kept in Obsidian's secret storage, not in the plugin's data.json. You paste a key into its field in settings, the plugin writes it to secret storage under its own name (for example youtube-llm-summarizer-openai-key), and data.json stores only that name. The eye icon only hides the value on screen. Secret storage is local to each device, so enter the keys again on another device. If you use only an AWS profile, the plugin settings store just the profile name, and AWS credentials are read from the existing AWS cache.

Keys that an earlier build saved in data.json as plain text are moved to secret storage the first time the plugin loads, and removed from the file.

Network use and access outside the vault

  • Network: The plugin sends requests to YouTube to fetch captions and to the AI provider you select (Amazon Bedrock, OpenAI or the compatible server you configure, Anthropic, Google Gemini) to translate and summarize. The subscription feed also calls the YouTube Data API. The caption text is sent to the selected AI provider. These requests happen only when you start a summary or open the feed, except for channels where you turned on auto summarize: those are checked once a day and their new videos are summarized automatically.
  • Accounts and fees: You need an account and an API key (or AWS credentials) for the AI provider, and the provider may charge for usage. The plugin itself is free.
  • Files outside the vault: Only when an AWS profile is set for Bedrock (desktop), the AWS SDK reads ~/.aws/config, ~/.aws/credentials, and the SSO cache, and runs the profile's credential_process command (for example aws_signing_helper) if it has one. With the profile left empty, the plugin does not access files outside the vault.
  • Sponsor link: The bottom of the settings screen has a Buy Me a Coffee link. It loads no remote image and opens in your browser only when you click it.
  • No tracking: There is no telemetry and no ads loaded from the internet.

Captions and summary flow

  1. The plugin reads the title, upload date, and caption tracks from the YouTube page.
  2. It checks manual and automatic captions in the target language first. If usable captions exist, translation is skipped.
  3. If target-language captions are missing or incomplete, it looks for a substitute among the default, automatic, and remaining tracks and translates it. Long input is translated in chunks and then joined.
  4. The genre-aware summary prompt is applied once to the same-language captions or to the full translation.
  5. Only results that complete normally are saved as notes.

Languages that differ only by region, such as ko and ko-KR, are treated as the same, while Simplified and Traditional Chinese are kept distinct. A pasted transcript has no language information, so it goes through the translation step.

The translation and summary prompts live in src/prompts/ and are bundled into main.js. They detect the genre, follow study-note instructions, and produce six sections such as ===GENRE=== that the plugin parses into the note. Summaries in languages other than Korean keep the same structure with an added output-language instruction. The note's fixed section headings follow the summary language for Korean, Japanese, Simplified Chinese, and Traditional Chinese, and are English for every other language.

When automatic captions appear varies by video, and there is no guarantee they are generated within a day. If captions are missing or incomplete, the plugin does not fall back to speech recognition; it tells you to retry or paste a transcript. You can also use Script / transcript when YouTube throttles requests or requires login or age verification. If the video information cannot be fetched in that case, the video ID is used as the title.

Caption collection depends on YouTube's public player response, so it can be affected by changes on YouTube's side or by request limits.

Other settings

Setting Description
Maximum input characters Default 200,000. If the captions or translation exceed it, the run stops; text is never silently cut
Maximum output tokens per call Default 65,536. Adjust within the output limit your model supports
Summary language Default Korean. Set independently of the UI language. Sets the language of the note body and, for Korean, Japanese, and Chinese, its section headings (English otherwise)
YouTube Data API key For adding channels and the latest-video feed. Not needed to summarize a URL directly
Save folder / Subscription save folder Where regular and feed summaries are saved
Channel save folder / Group Per-channel save location and feed group
Videos per channel The latest 1–10 videos, not counting Shorts
Auto summarize (per channel) Off by default. Summarizes the channel's new videos one day after upload; checked once a day

The input character count is not a token count, so set it to fit your model's context window. If a translation or summary response is cut off by the output limit, no note is saved. Each model request waits up to 3 minutes; Obsidian's requestUrl has no network cancellation API, so the provider may still finish processing after a timeout.

Migrating from earlier versions

Existing channels, folders, groups, and summarized-video records are kept. The old server key is also preserved in case you go back to an earlier version, but it is never sent on the new summary path. After updating, set the AI provider's credentials and model.

Development

npm run dev   # Watch build
npm run lint  # Obsidian plugin guidelines (eslint-plugin-obsidianmd)
npm test      # Caption, summary, authentication, note, and feed tests
npm run build # Type check + release bundle

Pushing a tag with the same name as version in manifest.json (for example 1.0.0) makes GitHub Actions run the lint and tests, build, generate a build provenance attestation, and attach main.js, manifest.json, and styles.css to a draft release.

The core implementation lives in YouTubeCaptionClient.ts (captions), AiModelClient.ts (authentication and model calls), SummaryEngine.ts (translation and summary format), and SummarizerService.ts (the whole flow through saving the note).

License

MIT