Douyin Video Text Extraction
Paste the following prompt into your AI chat to install this skill:
Please follow the guide at https://skillhub.cn/install/skillhub.md to install @user_6a36b82b/douyin-transcribe-lz.
About this skill
The Problem It Solves
In scenarios like content creation, data analysis, and information archiving, there is a frequent need to convert spoken content from Douyin videos or local audio/video files into editable, searchable text. Manual transcription is time-consuming and error-prone, especially for long videos or low-quality recordings. This skill automates the entire pipeline from extraction to structured output.
Workflow & Core Capabilities
The skill operates in two primary modes, sharing the same transcription and output logic.
1. Douyin Link Mode
- Video Extraction: When a user provides a Douyin share link or command text, the skill uses Playwright to open the short link in a headless Chrome browser. It waits for the JavaScript to load and captures the video.src directly from the DOM, then downloads the original video. This method works without login and bypasses common login modal interference.
- Key Advantage: It employs DOM parsing instead of network interception, ensuring stable extraction.
2. Local File Mode
- Direct Read: Users can directly specify a local media file path (absolute, relative, or attachment reference). The skill does not move or copy the source file; it reads it directly.
- Broad Format Support: Compatible with a wide range of media formats including .mp4, .mp3, .wav, .flac, etc.
Universal Core Steps: Transcription and Agent Refinement
- Local Transcription: Uses the Whisper medium model (~1.4GB, auto-downloaded and cached on first run) to perform speech recognition on the extracted or specified media, generating a raw transcript with timestamps. The script includes auto-repair for corrupted model caches.
- Agent Refinement: After transcription, the Agent itself performs post-processing on the raw text. This step does not invoke any external LLM and strictly adheres to rules:
- Allowed: Adding necessary punctuation, correcting obvious ASR (Automatic Speech Recognition) typos, and semantic segmentation.
- Prohibited: Deleting original content, rewriting or summarizing, adding commentary or reviews. This ensures the output text is faithful to the original speech.
- Structured Output: The final output is a clean, readable .md file, while the raw .txt and .json transcripts are preserved for verification.
Limitations and Notes
- Environment Dependency: Requires a local Python 3.10–3.12 environment. Dependencies (including PyTorch, Whisper, etc.) must be installed in an isolated virtual environment via the
setup_env.pyscript. This script must be re-run after migrating to a new machine. - Resource Usage: The initial run downloads ~4GB of models and dependencies and requires sufficient disk space (~4GB).
- Content Processing Boundary: The Agent's refinement is limited to text polishing and correction; it does not perform any content-level additions or deletions. This is a deliberate design constraint, not a flaw.
- Platform Dynamics: The extraction of Douyin links relies on the page's DOM structure. Updates to the platform's frontend could potentially disrupt extraction, but the skill is designed with auto-retry and fallback mechanisms.
Use Cases
- When analyzing competitor content strategies on Douyin, batch-extracting video transcripts from a series of Douyin links to review discourse patterns and trending topics.
- As an independent researcher, after fieldwork, transcribing locally recorded `.wav` interview audio files into searchable text for qualitative analysis coding.
- A self-media team needs to create accurate subtitles for published Douyin videos, extracting speech from the original video and organizing it into a timestamped Markdown transcript.
- In a compliance review scenario, quickly obtaining the speech content of a certain Douyin video to help determine if it violates platform rules through transcript extraction.
Best For
- Social Media Operations: Need to regularly collect competitor videos from Douyin and extract transcripts to generate content trend analysis reports.
- Academic Researcher: Handles large volumes of interview recordings, requires local audio/video files to be converted to text for thematic analysis or case studies.
- Local Video Blogger: Records Vlogs or tutorials, wishes to convert spoken explanations into text scripts for publishing blog posts or optimizing SEO.
- Content Review Specialist: Monitors user-generated content, needs to quickly transcribe speech from Douyin videos for违规 content screening.
Related Skills
A universal base component that automatically launches the Edge browser and connects the BrowserSkill extension, ensuring readiness for web scraping and browser automation tasks.
A fully local-run WeChat chat analysis tool with MBTI personality inference, sentiment analysis, risk detection, relationship health assessment, and conversation prediction, emphasizing privacy.
Fetches the top 20 A-share stocks by trading volume from Wencai, including ranking, price changes, and sectors, with sector analysis.
Performs project discrimination, classification, and structured extraction on bidding documents, outputting standardized data with support for manual review.