MCPcopy Index your code
hub / github.com/Everless321/dYm

github.com/Everless321/dYm @v1.10.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.10.2 ↗ · + Follow
569 symbols 1,444 edges 78 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

dYm

English | 中文

AI-Powered Video Analysis & Download Manager for Douyin (Electron + TypeScript)

Electron React TypeScript License

dYm is a desktop application that combines watermark-free video downloading with AI-driven content analysis. Built for content creators, social media managers, and researchers who need to efficiently collect, organize, and understand short-form video content at scale.

Repository


AI Video Analysis

The core intelligence of dYm — automatically understand what's in your videos without watching them one by one.

How It Works

  1. Frame Extraction — FFmpeg extracts key frames from videos at configurable intervals (e.g., 4 evenly-spaced frames from a 30s video)
  2. Vision API Analysis — Extracted frames are sent to a multimodal Vision LLM (OpenAI-compatible API) for content understanding
  3. Structured Output — The AI returns structured metadata that gets stored alongside each video in the local database

What the AI Extracts

Field Description Example
Tags Content keywords for search & filtering ["cooking", "recipe", "pasta"]
Category Content classification Food & Cooking
Summary Brief description of the video content Step-by-step pasta carbonara recipe with tips
Scene Visual scene description Kitchen, indoor, close-up shots
Content Level Content rating (1-5 scale) 1 (safe for all audiences)

Analysis Configuration

  • Model Selection — Works with any OpenAI-compatible Vision API (Grok, OpenAI GPT-4o, Claude, etc.)
  • Custom Prompts — Define exactly what the AI should look for in your content
  • Frame Slicing — Configure how many frames to extract per video (trade-off between accuracy and API cost)
  • Concurrency Control — Run multiple analyses in parallel with configurable worker count
  • Rate Limiting — Built-in RPM (requests per minute) limiter to stay within API quotas
  • Batch Processing — Analyze all unprocessed videos in one click, with real-time progress tracking
  • Per-User Analysis — Analyze videos from a specific creator, or across all creators at once

Image Post Support

For image carousel posts (Douyin's photo mode), dYm sends the original images directly to the Vision API — no frame extraction needed. Up to 10 images per post are analyzed in a single API call.


Features

  • User Management — Add and manage Douyin creators, bulk refresh profiles
  • Batch Download — Concurrent watermark-free downloads with configurable limits and task tracking
  • Smart Filtering — Filter content by creator, AI-generated tags, category, and content level
  • Local Storage — All data stored in a local SQLite database, fully under your control
  • Clipboard Detection — Auto-detect Douyin links from clipboard, one-click add
  • System Tray — Minimize to tray for background operation

Quick Start

  1. Download the installer from Releases
  2. Open dYm and configure your Douyin Cookie in Settings
  3. Paste a Douyin link or add a creator
  4. Download videos and enable AI analysis as needed

Tech Stack

  • Framework: Electron + React 19 + TypeScript
  • UI: Tailwind CSS + Radix UI + shadcn/ui
  • Database: better-sqlite3
  • Video Processing: fluent-ffmpeg (frame extraction for AI analysis)
  • Download Engine: dy-downloader
  • AI Integration: OpenAI-compatible Vision API (configurable endpoint)

Installation & Development

Run from Source

git clone https://github.com/Everless321/dYm.git
cd dYm
npm install
npm run dev

Download Pre-built

Go to Releases for installer packages.


Build

# macOS
npm run build:mac

# Windows
npm run build:win

# Linux
npm run build:linux

# Compile only (no packaging)
npm run build:unpack

Build output is in the dist/ directory.


Configuration

Cookie Setup (Required)

  1. Go to Settings
  2. Click "Get Cookie"
  3. Log in to Douyin in the popup window
  4. Cookie is saved automatically after login

AI Analysis Setup (Optional)

  1. Go to Settings → Analysis Settings
  2. Configure your API Key and API URL (default: Grok API)
  3. Customize the analysis prompt, model, concurrency, and rate limits

Project Structure

dYm/
├── src/
│   ├── main/                # Electron main process
│   │   ├── database/        # SQLite database operations
│   │   ├── services/        # Download, analysis, scheduling services
│   │   │   └── analyzer.ts  # AI video analysis engine
│   │   └── index.ts
│   ├── preload/             # Preload scripts
│   └── renderer/            # React renderer process
├── build/                   # Build resources
├── resources/               # App resources
└── electron-builder.yml     # Packaging config

Commands

npm run dev           # Development mode
npm run typecheck     # Type checking
npm run lint          # Linting
npm run format        # Formatting
npm run test:e2e      # E2E tests

FAQ

Download fails?

Check: 1. Cookie is valid and not expired 2. Network connection is stable 3. Download directory has write permissions

AI analysis fails?

Check: 1. API Key is configured correctly 2. API quota is sufficient 3. Video files are complete and readable

macOS says "app is damaged"?

Run:

sudo xattr -cr /Applications/dYm.app/

License

This project is licensed under GPL v3.

Disclaimer

This tool is for learning and research purposes only. Please comply with local laws and platform terms of service. All downloaded content copyrights belong to the original creators.

Extension points exported contracts — how you extend this code

VideoInfo (Interface)
(no doc)
src/renderer/src/components/VideoDownloadDialog.tsx
DatabaseAPI (Interface)
(no doc)
src/preload/index.d.ts
DbUser (Interface)
(no doc)
src/main/database/index.ts
VideoDownloadDialogProps (Interface)
(no doc)
src/renderer/src/components/VideoDownloadDialog.tsx
SettingsAPI (Interface)
(no doc)
src/preload/index.d.ts
CreateUserInput (Interface)
(no doc)
src/main/database/index.ts
Props (Interface)
(no doc)
src/renderer/src/components/ErrorBoundary.tsx
CookieAPI (Interface)
(no doc)
src/preload/index.d.ts

Core symbols most depended-on inside this repo

cn
called by 67
src/renderer/src/lib/utils.ts
getDatabase
called by 62
src/main/database/index.ts
getSetting
called by 33
src/main/database/index.ts
esc
called by 29
resources/web/app.js
sendSchedulerLog
called by 27
src/main/services/scheduler.ts
respondError
called by 21
src/main/services/web-browser.ts
getDownloadPath
called by 13
src/main/services/media.ts
sendProgress
called by 13
src/main/services/downloader.ts

Shape

Function 439
Interface 120
Method 6
Class 4

Languages

TypeScript100%

Modules by API surface

src/main/database/index.ts95 symbols
src/preload/index.d.ts63 symbols
resources/web/app.js54 symbols
src/main/services/web-browser.ts32 symbols
src/main/services/analyzer.ts30 symbols
src/main/services/scheduler.ts21 symbols
src/renderer/src/pages/settings/FilesPage.tsx20 symbols
src/renderer/src/pages/settings/SystemPage.tsx18 symbols
src/renderer/src/pages/settings/UsersPage.tsx17 symbols
src/main/services/downloader.ts15 symbols
src/renderer/src/pages/settings/DownloadPage.tsx12 symbols
src/renderer/src/pages/HomePage.tsx11 symbols

For agents

$ claude mcp add dYm \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact