Skip to main content
1

Install Python dependencies

Clone the repository and install the required packages.
git clone https://github.com/ihmily/DouyinLiveRecorder.git
cd DouyinLiveRecorder
uv sync
uv automatically creates and manages a virtual environment. If you don’t have it installed, see the Installation page for setup instructions.
2

Install FFmpeg

FFmpeg is required for recording. On Windows, the tool auto-installs FFmpeg the first time it runs — you can skip this step.
sudo apt update && sudo apt install ffmpeg
Use ffmpeg -version to confirm the installation was successful.
3

Add stream URLs to URL_config.ini

Open config/URL_config.ini and add the live room URLs you want to monitor, one per line.
config/URL_config.ini
https://live.douyin.com/745964462470
https://live.bilibili.com/320
https://www.twitch.tv/gamerbee
You can optionally prefix a URL with a quality setting followed by a comma:
config/URL_config.ini
超清,https://live.douyin.com/745964462470
Available quality values: 原画 (original), 蓝光 (Blu-ray), 超清 (ultra HD), 高清 (HD), 标清 (SD), 流畅 (smooth).
To temporarily pause monitoring for a specific room without removing its URL, prefix the line with #. The recorder will skip that room until you remove the #.
#https://live.douyin.com/745964462470
4

Run the recorder

Start the program from the project root:
uv run main.py
Once running, you should see output similar to:
共监测2个直播中 | 同一时间访问网络的线程数: 3 | 是否开启代理录制: 否 | 录制分段开启: 1800秒 | 录制视频质量为: 原画 | 录制视频格式为: ts | 目前瞬时错误数为: 0 | 当前时间: 12:34:56
没有正在录制的直播 循环监测间隔时间:300秒
When a monitored stream goes live, recording starts automatically:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
正在录制1个直播:
某主播[原画] 正在录制中 0:02:37
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Recorded files are saved to the downloads/ folder, organized by platform and streamer name.
Using ts as the recording format (the default) prevents file corruption if the program stops unexpectedly. The tool can auto-convert completed .ts files to .mp4 — see Output formats for details.

What’s next

Configuration

Customize recording quality, format, save paths, loop interval, and more.

Supported platforms

Browse all 40+ platforms and see which require proxy or cookie setup.

Build docs developers (and LLMs) love