DEV Community

Cover image for Reel Sloth: I saved 'for later' reels for years. Now a local Gemma sorts them while I sleep ๐Ÿฆฅ
Kuntal Gorai
Kuntal Gorai

Posted on Edited on

Reel Sloth: I saved 'for later' reels for years. Now a local Gemma sorts them while I sleep ๐Ÿฆฅ

Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady Submission ๐Ÿฆฅ

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady

What I Built

Everyone has a "Saved" folder on Instagram that is secretly a graveyard. A reel lists five books you must read, another shows a movie you have to watch, another one shows a Claude skill that will "change how you code". You tap save, think "later", and never open that folder again. The information is all there, it's just trapped inside videos.

Reel Sloth does the "later" part for you. You give it your saved reels and it hands back a tidy, checkable backlog:

  • ๐ŸŽฌ Movies & shows to watch
  • ๐Ÿ“š Books to read
  • ๐Ÿค– AI tools & Claude skills to try
  • ๐Ÿ“ Places to visit
  • ๐Ÿ›’ Products to buy
  • โ€ฆplus recipes, fitness and "other" How it works for the user:
  1. Give it links. Paste reel or post links into a small web page, or (the truly lazy way) point it at the Instagram data export (saved_posts.json / the downloaded .zip) and it picks up everything you ever saved, collections included.
  2. Go to sleep. --overnight mode paces the downloads so Instagram doesn't block it, keeps Windows awake while it runs, retries politely, and can be stopped and resumed at any time because every reel is cached.
  3. Wake up to a list. Each item comes out with a category, an action (watch / read / try / visit / buy) and a link back to the reel. Copy it as Markdown or plain text, download .md / .csv / .json, or let it sync into a ๐Ÿฆฅ Reel Backlog database in Notion.
  4. Check things off. That's the only effort left. It reads all three places a reel hides information: the caption, what's said out loud, and the text on screen (lots of "top 5 books" reels only show titles as overlay text and never say them).

Who gets to be lazier: anyone who saves reels as a to-do list and never gets to the list. That's me, and probably you.

Demo

โœ๏ธ

Here's a real run on 6 of my own saved posts (5 videos and a 6-photo carousel): 15 clean backlog items out, namely 3 movies, 5 books, 5 Claude skills, 1 place (the A Moving Line comics exhibition at MAP Bengaluru) and 1 product (WinDock), with every model running on my PC's CPU.

Code

๐Ÿฆฅ Reel Sloth

Save reels, do nothing, still end up organized.

Reel Sloth takes the Instagram reels you saved "for later" and turns them into a tidy backlog movies to watch, books to read, Claude skills and AI tools to try, dev tools and APIs to try, recipes to cook. Everything is extracted and classified by open models running on your own machine.

Categories: ๐ŸŽฌ Movies & Shows ยท ๐Ÿ“š Books ยท ๐Ÿค– AI tools & Claude skills (AI models, apps, agents, prompts Claude skills) ยท ๐Ÿ› ๏ธ Dev tools & APIs (libraries, frameworks, APIs, languages, developer sites and SaaS) ยท ๐Ÿณ Recipes ยท ๐Ÿ“ Places ยท ๐Ÿ’ช Fitness ยท ๐Ÿ›’ Products ยท ๐Ÿ’ก Other. Reels saved in a "Coding"-style collection lean toward Dev tools.

Status: working end to end on real reels (6 sample posts โ†’ 19 items โ†’ Notion). See PLAN.md.

Setup (Windows, Python 3.11+)

cd D:\hacktoberfest-
โ€ฆ
Enter fullscreen mode Exit fullscreen mode

Repo: https://github.com/kuntal0901/reel-sloth (MIT license)

Python, about 1,600 lines, with 48 unit tests covering parsing, cleanup, the Instagram export import, overnight mode, Notion sync and export. Every model is set in one config.toml.

How I Built It

The open-source AI stack, all running locally:

Job Open piece Notes
Download reel + caption yt-dlp Optional browser cookies if Instagram asks for a login
Speech to text faster-whisper (small, int8, CPU), audio decoded with PyAV Works offline after a one-time 460 MB download
Read on-screen text Qwen2.5-VL 3B (qwen2.5vl:3b) via Ollama Keyframes + carousel slides, one image per call
Sort into categories Gemma 4 E2B (gemma4:e2b) via Ollama Returns JSON: category, items, action, note
UI Gradio One page: paste, sort, copy
links / Instagram export โ”€โ”€โ–บ yt-dlp โ”€โ”€โ–บ video + caption
                                 โ”‚
            โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
            โ–ผ                    โ–ผ                      โ–ผ
   faster-whisper          keyframes/slides         caption text
    (transcript)        โ–บ qwen2.5vl (overlay text)
            โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                 โ–ผ
                 gemma4:e2b โ–บ JSON โ–บ code-based cleanup + dedupe
                                 โ–ผ
             SQLite cache โ”€โ”ฌโ”€โ–บ Markdown / TXT / CSV / JSON (copy mode)
                           โ””โ”€โ–บ Notion "Reel Backlog" (optional)
Enter fullscreen mode Exit fullscreen mode

My machine is a Windows PC with 16 GB of RAM and no GPU, so most of the work was making open models behave on modest hardware.

1. One model in RAM at a time

Whisper, a vision model and an LLM don't all fit comfortably in 16 GB. The pipeline runs the vision stage, then unloads Qwen2.5-VL (keep_alive=0) before Gemma loads. Slow and steady, but it never swaps.

2. Only look at the screen when it's worth it

Qwen2.5-VL on CPU takes about a minute per image, so my first real run of 6 posts took ~35 minutes. The fix was to be lazy on purpose:

  • Fast mode (the default) only reads the screen for photo posts and for videos with under 40 spoken words. If someone talks through their list, the transcript is enough.
  • Max 2 keyframes per video, near-duplicate frames skipped, at most 3 carousel slides.
  • One image per call. Sending several frames at once overflowed the model's 4k context window, so each frame now gets its own request.
  • Thorough mode reads every reel and every slide; Off skips vision completely. On the same 2 reels that took the pipeline from 711 s to 314 s (2.3ร— faster).

3. Don't trust a 2B model with the last mile

Gemma 4 E2B is great at the hard, fuzzy part: deciding that a reel is "about books" and pulling out the titles. It's less consistent at the boring details. Between runs it would misspell a title it had heard correctly, split a book from its author or subtitle so one book became two items, or add vague items that weren't really things to do. Tweaking the prompt to fix one of these made another one worse.

So instead of fighting the prompt, I let Gemma do the understanding and wrote plain code for the cleanup:

  • titles are snapped to the spelling that was actually spoken in the reel (edit distance against the transcript),
  • titles are put in title case,
  • a subtitle or author that the model split off as its own item is folded back into the right book,
  • generic "junk" titles are dropped and event details are folded into notes,
  • near-duplicate items across reels are merged. The JSON comes from Ollama's format=json, then gets validated, with one repair retry if it's broken. My first full run on 6 posts gave 19 items, with duplicates and fragments. With the cleanup in place, the same 6 posts give 15 clean ones.

4. Built for the overnight run

Everything is cached in SQLite, so re-running costs nothing for reels you've already processed. Overnight mode waits a random 20โ€“40 s between downloads, backs off for 10 minutes if Instagram pushes back, stops after 3 blocked links in a row, logs everything, and picks up where it left off next time. The Notion sync never duplicates rows, and things you've ticked Done are never touched.

Why Does Open Innovation Matter?

  • Your saved feed is a diary. What you save says a lot about you: what you want to read, where you want to travel, what you worry about, what you want to buy. With Reel Sloth, the videos, transcripts and screen text are processed on my own machine. No hosted AI model ever sees them. Notion is optional, and the copy/export mode needs no account at all.
  • It's free to run, so the lazy option is actually viable. The whole point is to throw hundreds of saved reels at it overnight. A closed API would bill per minute of audio, per image and per token, and an "every reel I ever saved" run would cost real money. Here it costs electricity.
  • I could match the model to the job. Whisper for speech, a small vision model for overlay text, and Gemma for sorting, each picked to fit a CPU and 16 GB. I could unload one before loading the next, which is something you can't control with someone else's API.
  • Everything is swappable. llm, vlm and whisper in config.toml take any Ollama tag or Whisper size. Got a GPU? Use a bigger Gemma and Whisper medium. A better small model comes out next month? Change one line. The categories are just a prompt you can edit.
  • It still works when the internet doesn't. Once the reels are downloaded, transcription, vision and sorting all run offline. Where open beat closed, concretely: a closed API would have been faster to start with, but it would have seen every reel I've saved, charged me for every overnight run, and left me no way to trade quality for speed the way Fast / Thorough / Off does.

My Agent Session

โœ๏ธ

Claude Code Session for Building reel sloth app claude
You

I have not started anything yet, suggest me some ideas. My deadline is today EOD.

Agent

With only today to work with, I'd pick something that runs on Ollama with a small open model and can be demoed in one short clip. Here are four ideas that fit the sloth theme:

  1. Lazy folder tidier. A local model reads the messy files in your Downloads folder, then renames and sorts them into folders, with a dry-run preview first.
  2. Group chat morning brief. Export a WhatsApp or Telegram chat and get a two-line summary plus any "someone asked you something" items.
  3. Fridge photo to grocery list. A local vision model looks at a fridge photo and lists what's running low. Most fun to demo, but harder to get reliable in a day.
  4. Offline bedtime story. It writes a calm story from a few words and reads it aloud with Piper TTS.

I'd go with the folder tidier, since it's the safest to finish today. Also, what laptop are you on, and roughly how much RAM?

You

Okay, what about an app that takes your Instagram reels and classifies them into multiple things, like if it's some movie, book recommendations, Claude skills etc. Uses open source models to extract video data and generate a todo / recommendation list inside my Google Keep. You can refine it to the things that can be done more organized. Let me know about this idea.

Agent

I like this idea a lot. It fits the theme well (everyone saves reels and then never does anything with them), and running it locally is a real selling point because your saved feed says a lot about you. There are two catches to plan around:

  • Instagram has no API for your saved reels. The full data export can take up to 48 hours, so for today the input will be reel links you paste in (or a text file of links). The app then downloads each reel with yt-dlp.
  • Google Keep has no official API for personal accounts. The unofficial gkeepapi library usually works with a token, but it can be fragile. I'll keep a fallback (Google Tasks, Notion or a Markdown file) ready so your demo doesn't depend on it.

Draft plan for today:
1. Extract. Download each reel with yt-dlp, get a transcript with faster-whisper, read on-screen text from a few frames with a local vision model through Ollama, and pull the caption.
2. Classify. A local LLM returns structured JSON for each reel: a category (Movies, Books, Claude skills/AI tools, Recipes, Places, Workouts, Other), the actual items named, and one action like "watch", "read" or "try".
3. Organize and push. Remove duplicates, group by category, and create one checklist per category with a link back to the source reel.
4. Demo and post. A small Gradio page, a short screen recording, and a write-up on why local matters.

You

You can replace Keep with Notion.

Agent

Good call, Notion is a better fit. It has an official API, so the fragile Keep step goes away. Step 3 now creates one Notion database called "Reel Backlog" with these columns: Item, Category, Action (watch/read/try), Done checkbox, and a link to the source reel. You'll get a filtered view per category, like "๐ŸŽฌ Movies to watch".

You

Okay, you can access the folder in D: hacktoberfest to start with the project, but create a plan before writing a single line of code.

Agent

Got it. No code yet. I'll connect to your D:\hacktoberfest-2026 folder first, then write the plan there.

Agent

The plan is ready, and no code has been written yet. I put it in a new folder at D:\hacktoberfest-2026\reel-sloth\PLAN.md. It covers the architecture, the Notion database layout, the folder structure, four time-boxed steps, what to cut if we run short on time, and the "why open" angle.

Ollama already has gemma4 and qwen2.5vl pulled on your PC, so we'll use those.

Edit the plan however you like, and say go when you want me to start step 1.

You

I have created a token giving access to a page, my RAM is 16 GB, and also make sure to create a version where the extracted data is also copyable for those who don't want to integrate with Notion.

Agent

Got it: 16 GB RAM, Notion token ready, and a copy-paste mode so Notion is optional. I'll update the plan, then start step 1.

Agent

The step 1 code is now in D:\hacktoberfest-2026\reel-sloth. It downloads each reel, transcribes the speech, reads on-screen text from 4 frames with qwen2.5vl, and caches everything so no reel is processed twice. Copy mode (Markdown checklist, CSV, JSON) is always on, and Notion only kicks in when your token is set. The unit tests pass on my side, but I can't reach Instagram from here, so the first real run has to happen on your PC.

Please put your Notion token in .env yourself rather than pasting it here.

You

I have posted the reels in samples/links.txt and Notion tokens in .env.example.

Agent

Two fixes before the first run:
- Tokens: I moved your Notion values into .env, which git ignores, and reset .env.example to blank. .env.example is the file that gets committed, so the token would have gone public with the repo.
- Photo posts: your 6 links are /p/ posts, and at least one is a photo carousel. The app only handled videos, so it now also handles photo and carousel posts by reading the slides with qwen2.5vl.

Agent

The first real run worked partway. All 6 posts downloaded in about 21 seconds without needing a login (5 videos and 1 six-photo carousel), but no items came out because of bugs:

  1. Whisper crashed on the newest PyAV. I now decode the audio myself.
  2. The 6 carousel images were too much for qwen2.5vl in one go. It now reads one image at a time.
  3. A failed post was never retried. It is now.
  4. Progress bars were cluttering the output.

All four are fixed and tested, with 15 tests passing.

You

What is the current progress then? What changes need to be done?

Agent

Where it stands: the app is fully built. On your PC, downloading and transcription now work for all 6 posts. The test run is in the step where qwen2.5vl reads on-screen text, which runs only on your CPU.

What needs to change: only speed.
- Fast mode, now the default: the slow screen-reading step only runs for photo posts and videos with little speech. Videos where someone talks through their picks skip it, since the transcript already has the titles.
- Fewer, smaller frames: 2 frames per video instead of 4, smaller images, and frames that look the same are skipped.
- A toggle on the web page: Fast, Thorough or Off.

Agent

It works end to end. Your 6 posts turned into 19 items with no errors, and they're in Notion now.
- ๐ŸŽฌ Movies & Shows (3): We Bought a Zoo, The Guernsey Literary and Potato Peel Pie Society, Heart of Dixie
- ๐Ÿ“š Books (6): A Year to Live, A Thousand Splendid Suns, East of Eden, Tuesdays with Morrie, Cobalt Red, plus one duplicate
- ๐Ÿค– Claude skills (5): Chief of Staff, Anatomy, Teach, Marketing Psychology, Last 30 Days
- ๐Ÿ“ Places (4) and ๐Ÿ›’ Products (1, WinDock)

Still to improve: the run took about 35 minutes (roughly 30 images at about 1 minute each), and there are a few quality slips: a duplicate Morrie entry, ALL CAPS titles copied from book covers, and exhibit details filed as "Places".

Agent

The speed fix works: 2.3x faster. On the same 2 reels the run went from 711s to 314s. Screen reading dropped from 546s to 156s, because the book reel's speech already named the book, so it skipped screen reading entirely. It also stopped producing a junk "Screen recording" item.

One setback: re-sorting your 6 reels with a stricter prompt made things worse, not better (23 items). The small 2B Gemma started splitting authors and subtitles into their own items. Notion still has the earlier, cleaner items, and I haven't changed it. To fix this I'd do the cleanup in code instead of relying on the small model's judgment.

Agent

The cleanup worked: 15 clean items, and the rules are now in code, so results no longer depend on the small model's mood. All 44 tests pass, 11 of them built from today's real failures.
- "A Way to Live" (a misread cover) became A Year to Live, using the spoken title.
- East of Eden and Tuesdays with Morrie are no longer ALL CAPS. Authors and subtitles are now notes, not separate items, and the "20th anniversary edition" duplicate is gone.
- Places went from 4 to 1.

Agent

I ran a dry run against your Notion first. It only reads and changes nothing. The cleanup would fix 3 titles and archive 4 junk rows, but some notes would get worse: for example, the comics exhibit would lose its venue and dates. I recommend fixing only the titles and archiving, while keeping your notes as they are.

You

I tried running the app after pasting the reel and clicking on "Sort my reels", it is throwing an error.

You

(.venv) D:\hacktoberfest-2026\reel-sloth>python -m reel_sloth.app
* Running on local URL: http://[REDACTED]:7860
Traceback (most recent call last):
[...]
File "D:\hacktoberfest-2026\reel-sloth\reel_sloth\store.py", line 65, in get
row = self.db.execute(
sqlite3.ProgrammingError: SQLite objects created in a thread can only be used in that same thread. The object was created in thread id 16304 and this is thread id 4168.

Agent

Thanks, that traceback pinpoints it, and it's my bug. The web page opened the reel database once at startup, but Gradio handles each click on a different thread, and SQLite refuses to share a connection across threads. The command line never hit this because it runs everything on one thread. The fix is to open the database per click, and I'm applying and testing it on your PC now with a real click on your link.

Agent

Fixed, so please retry: press Ctrl+C in the app's terminal, then run python -m reel_sloth.app again.

I tested it with a real button click on your link (Fast mode, Notion unticked) and it produced 2 items: Mastering Behavioral Interviews: The Guide to Storytelling in Tech and Staff Engineer by Will Larson. If something fails in future, the Progress box shows the actual message (like "Ollama is not running") instead of blank Error boxes. 51 tests pass, including one that clicks from a separate thread the way Gradio does.

You
Agent

It's live: github.com/kuntal0901/reel-sloth. Only the main branch went up, with an MIT license added. Before pushing I checked the whole history, and no Notion token, .env, config, cache or videos were ever committed.

The Lazy Payoff

Before: open the Saved folder, rewatch a reel, pause it on the right frame, type the book title into a notes app, repeat. Roughly a minute or two per reel, which is exactly why I never did it.

After: paste links (or point it at the export), press one button or start it before bed, and wake up to a checklist. On my test batch, 6 saved posts turned into 15 items in my Notion backlog without me watching a single reel again, including five Claude skills and an exhibition in Bengaluru I'd saved and completely forgotten about.

Here is a screenshot of me processing over 250 reels backed up from instagram export and sorting it overnight.๐Ÿ˜Œ

Scope of Improvements

  • Introducing a UI version of sorting the reels overnight currently the app supports only a terminal version.
  • Better processing of reels right now the notion step is kept at last after all reels are completed which can done in parallel with the reels that are processed and extracted.
  • The categories of classification are limited could be improved over that. And the extracted reels can be smart in the sense if it has recommended some links it should add in the references section.

Prize Categories

  • Best Use of Gemma. Gemma 4 E2B (gemma4:e2b, via Ollama) is the brain of Reel Sloth. It reads the combined caption, transcript and on-screen text of every reel, decides what the reel is about, and extracts each movie, book, tool or place as structured JSON, entirely on a CPU-only laptop.

Top comments (0)