
douyin-video
PopularDouyin watermark-free video downloader and transcript extraction tool. Obtains watermark-free video download links from Douyin share links, downloads videos, extracts voice transcripts from videos, and automatically saves them to files. Applicable scenarios include getting Douyin video info, downloading watermark-free videos, and batch extracting video transcripts. Triggered when users need to process Douyin video links or extract video content.
Douyin watermark-free video downloader and transcript extraction tool. Obtains watermark-free video download links from Douyin share links, downloads videos, extracts voice transcripts from videos, and automatically saves them to files. Applicable scenarios include getting Douyin video info, downloading watermark-free videos, and batch extracting video transcripts. Triggered when users need to process Douyin video links or extract video content.
Douyin Watermark-Free Video Downloader & Transcript Extractor
Obtain watermark-free video download links from Douyin share links, download videos, and use speech recognition to extract transcripts from videos, saving them automatically to files.
Feature Overview
- Get Download Link: Parse direct watermark-free video download URLs from Douyin share links (No API key required)
- Download Video: Download watermark-free videos to a specified local directory
- Extract Transcript: Extract text content from videos via speech recognition (Requires SiliconFlow API Key)
- Auto-Save: Automatically save the transcript for each video into a separate folder (named after the Video ID)
Environment Requirements
Dependency Installation
pip install requests ffmpeg-python
System Requirements
- FFmpeg must be installed on the system (used for audio/video processing)
- macOS:
brew install ffmpeg - Ubuntu:
apt install ffmpeg
API Key Configuration (Required for Transcript Extraction only)
The transcript extraction feature uses the SiliconFlow API, which requires setting an environment variable:
export API_KEY="your-siliconflow-api-key"
Obtain API key: https://cloud.siliconflow.cn/
Usage
Method 1: Using the Script (Recommended)
# Get video info and download link (No API key required)
python douyin_downloader.py --link "Douyin share link" --action info
# Download video to specified directory
python douyin_downloader.py --link "Douyin share link" --action download --output ./videos
# Extract video transcript and save to file (Requires API_KEY environment variable)
python douyin_downloader.py --link "Douyin share link" --action extract --output ./output
# Extract transcript while saving the video
python douyin_downloader.py --link "Douyin share link" --action extract --output ./output --save-video
# Quiet mode (reduce console output)
python douyin_downloader.py --link "Douyin share link" --action extract --output ./output --quiet
Output Directory Structure
After extracting transcripts, each video is saved to an independent folder:
output/
├── 7600361826030865707/ # Folder named after Video ID
│ └── transcript.md # Transcript file in Markdown format
├── 7581044356631612699/
│ ├── transcript.md
│ └── 7581044356631612699.mp4 # Saved when using --save-video
└── ...
Markdown Transcript Format
# Video Title
| Attribute | Value |
|------|-----|
| Video ID | `7600361826030865707` |
| Extraction Time | 2026-01-30 14:19:00 |
| Download Link | [Click to Download](url) |
---
## Transcript Content
(Text content from speech recognition)
Method 2: Calling from Python Code
from douyin_downloader import get_video_info, download_video, extract_text
# Get video info
info = get_video_info("Douyin share link")
print(f"Video ID: {info['video_id']}")
print(f"Title: {info['title']}")
print(f"Download Link: {info['url']}")
# Download video
video_path = download_video("Douyin share link", output_dir="./videos")
# Extract transcript and save to file
result = extract_text("Douyin share link", output_dir="./output")
print(f"Transcript saved to: {result['output_path']}")
print(result['text'])
Workflow
Get Video Info
- Parse the Douyin share link to extract the real video URL
- Simulate mobile client requests to retrieve page data
- Extract the watermark-free video URL from the page JSON data
- Return the video ID, title, and download link
Extract Video Transcript
- Parse the share link to get video information
- Download the video to a temporary directory
- Use FFmpeg to extract audio (MP3 format) from the video
- Call the SiliconFlow SenseVoice API for speech recognition
- Clean up temporary files and return the recognized text
Frequently Asked Questions (FAQ)
Failed to parse link
- Ensure the link is a valid Douyin share link
- The link format is typically
https://v.douyin.com/xxxxx/or a full Douyin video URL
Transcript extraction failed
- Check whether the
API_KEYenvironment variable has been set - Ensure the API key is valid and has sufficient quota
- Ensure FFmpeg is correctly installed
Slow download speed
- This depends on your network conditions and the video file size
- The script will display download progress
Precautions
- This tool is for learning and research purposes only
- Please comply with relevant laws and regulations when using it
- Do not use this tool for any copyright infringement or illegal purposes



