@lzwme/m3u8-dl 1.6.0-0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.MD CHANGED
@@ -12,319 +12,348 @@
12
12
  [![GitHub forks][forks-badge]][forks-url]
13
13
  [![GitHub stars][stars-badge]][stars-url]
14
14
 
15
- 一个免费开源功能强大的 m3u8 视频批量下载工具,支持多线程下载、边下边播、WebUI 管理、视频解析等多种功能。支持 CLI命令行、浏览器、PC客户端、Docker 部署以及 Node.js API 调用等多种使用方式。
15
+ > **Language**: [English](README.md) | [中文简体](README.zh-CN.MD)
16
16
 
17
- ![](./examples/img/m3u8dl-search-demo.png)
17
+ A free, open-source, and powerful m3u8 video batch downloader with multi-threaded downloading, play-while-downloading, WebUI management, video parsing, and more. Supports multiple usage methods including CLI command line, browser, PC client, Docker deployment, and Node.js API calls.
18
+
19
+ ## ✨ Features
20
+
21
+ ### 🚀 Core Download Features
22
+
23
+ - **Multi-threaded Downloading**: Uses thread pool mode with customizable thread count, significantly improving download speed
24
+ - **Play-While-Downloading Mode**: Supports online playback using downloaded ts cache files without waiting for complete download
25
+ - **Batch Downloading**: Supports batch downloading of multiple m3u8 addresses, supports batch import from text files
26
+ - **Resume from Cache**: Failed downloads retain cache, retries only download failed segments, saving bandwidth and time
27
+ - **AES Encryption Support**: Automatically identifies and decrypts common AES-128 encrypted video streams
28
+ - **Format Conversion**: Automatically merges and converts downloaded ts segments to mp4 format (requires [ffmpeg](https://ffmpeg.org/download.html))
29
+ - **Multi-format Support**: Supports downloading video files in mp4, mkv, and other formats
30
+ - **Segment Filtering**: Supports ignoring video segments in specified time ranges (e.g., skip intro and outro)
31
+
32
+ ### 🌐 WebUI Download Management
33
+
34
+ - **Modern Interface**: Modern web interface built with Vue 3 + TypeScript
35
+ - **Real-time Progress**: Real-time display of download progress and status via WebSocket
36
+ - **Task Management**: Supports pausing, resuming, and deleting download tasks, supports batch operations
37
+ - **Download Center**: Centralized management of all download tasks, supports search and filtering
38
+ - **Configuration Management**: Visual configuration of download parameters (thread count, save directory, etc.)
39
+ - **Access Control**: Supports setting access password (token) to protect the service
18
40
 
19
- ## ✨ 功能特性
41
+ ![](examples/img/m3u8dl-webui-new.jpg)
42
+
43
+ ### 🎬 Video Parsing Features
44
+
45
+ - **Multi-platform Support**: Supports parsing video sharing links from platforms like Douyin, Weibo, Pipixia, etc.
46
+ - **Watermark-free Download**: Automatically extracts watermark-free video addresses and downloads
47
+ - **Smart Recognition**: Automatically recognizes video platforms and selects appropriate parsers
20
48
 
21
- ### 🚀 核心下载功能
49
+ ### 🔍 Smart m3u8 Address Extraction
22
50
 
23
- - **多线程下载**:采用线程池模式,支持自定义线程数,大幅提升下载速度
24
- - **边下边播模式**:支持使用已下载的 ts 缓存文件在线播放,无需等待完整下载
25
- - **批量下载**:支持指定多个 m3u8 地址批量下载,支持文本文件批量导入
26
- - **缓存续传**:下载失败会保留缓存,重试时只下载失败的片段,节省带宽和时间
27
- - **AES 加密支持**:自动识别并解密常见的 AES-128 加密视频流
28
- - **格式转换**:自动将下载的 ts 片段合并转换为 mp4 格式(需安装 [ffmpeg](https://ffmpeg.org/download.html))
29
- - **多格式支持**:支持下载 mp4、mkv 等格式的视频文件
30
- - **片段过滤**:支持忽略指定时间段的视频片段(如跳过片头片尾)
51
+ - **Web Page Extraction**: Supports automatic extraction of m3u8 addresses from video playback pages
52
+ - **Deep Search**: Supports multi-level page search, automatically discovers video links
53
+ - **Batch Extraction**: Extract multiple video links at once, supports batch downloading
31
54
 
32
- ### 🌐 WebUI 下载管理
55
+ ![](./examples/img/m3u8dl-web-browser.jpg)
33
56
 
34
- - **现代化界面**:基于 Vue 3 + TypeScript 构建的现代化 Web 界面
35
- - **实时进度**:通过 WebSocket 实时显示下载进度和状态
36
- - **任务管理**:支持暂停、恢复、删除下载任务,支持批量操作
37
- - **下载中心**:集中管理所有下载任务,支持搜索和筛选
38
- - **配置管理**:可视化配置下载参数(线程数、保存目录等)
39
- - **访问控制**:支持设置访问密码(token)保护服务
57
+ ### 🎯 Browser Userscript Capture Tool
40
58
 
41
- ### 🎬 视频解析功能
59
+ - **Auto Capture**: Automatically intercepts and captures m3u8 and mp4 video links in web pages
60
+ - **Real-time Monitoring**: Monitors network requests (XMLHttpRequest, fetch, Performance API), automatically discovers video links
61
+ - **Smart Recognition**: Automatically recognizes video types (M3U8/MP4) and extracts video names
62
+ - **One-click Jump**: Supports one-click jump to m3u8-dl WebUI for downloading
63
+ - **Flexible Configuration**: Supports configuring exclusion URL rules to avoid capturing on specific pages
64
+ - **Draggable Panel**: Supports dragging to move panel position, automatically saves position
65
+ - **Link Management**: Supports copying links, clearing list, and other operations
42
66
 
43
- - **多平台支持**:支持抖音、微博、皮皮虾等平台的视频分享链接解析
44
- - **无水印下载**:自动提取无水印视频地址并下载
45
- - **智能识别**:自动识别视频平台并选择合适的解析器
67
+ > This is a Tampermonkey/Greasemonkey userscript that can automatically capture video links in browsers, working with m3u8-dl WebUI to provide a seamless download experience.
46
68
 
47
- ### 🔍 智能提取功能
69
+ ### 📺 Video Search Features
70
+
71
+ - **Collection Site Support**: Supports standard collection site APIs, search and download through command-line interaction
72
+ - **Cache Mechanism**: Automatically caches search history, supports continuing unfinished downloads
73
+
74
+ ![](./examples/img/m3u8dl-search-demo.png)
48
75
 
49
- - **网页提取**:支持从视频播放页面自动提取 m3u8 地址
50
- - **深度搜索**:支持多层级页面搜索,自动发现视频链接
51
- - **批量提取**:一次提取多个视频链接,支持批量下载
76
+ ### ▶️ Video Playback
52
77
 
53
- ### 📺 视频搜索功能
78
+ - **Built-in Player**: Both WebUI and desktop client have built-in lightweight video players, can directly play downloaded or downloading videos online without waiting for completion.
79
+ - **Play-While-Downloading**: Supports automatic splicing of ts cache segments, can play while downloading, achieving "download and watch" experience.
80
+ - **Multi-format Support**: Player supports playback of mainstream video formats like mp4, ts, with drag, speed control, fullscreen, picture-in-picture, and other operations.
81
+ - **History**: Automatically records playback progress, supports resume playback, convenient for long video series watching.
54
82
 
55
- - **采集站支持**:支持标准采集站 API,通过命令行交互搜索和下载
56
- - **缓存机制**:自动缓存搜索历史,支持继续未完成的下载
83
+ > No need to rely on third-party players, you can directly watch downloaded content in the browser or client, improving convenience.
57
84
 
58
- ### 💻 多种使用方式
85
+ ![](./examples/img/m3u8dl-video-play.jpg)
59
86
 
60
- - **命令行工具**:提供完整的 CLI 命令,支持各种参数配置
61
- - **Node.js API**:提供编程接口,方便集成到其他项目
62
- - **Web 服务**:支持启动为 Web 服务,通过浏览器管理下载
63
- - **Docker 部署**:提供 Docker 镜像,一键部署到服务器
64
- - **Electron 桌面应用**:支持打包为桌面应用,包含内置浏览器功能
87
+ ### 💻 Multiple Usage Methods
65
88
 
66
- ### 🌍 国际化支持
89
+ - **Command Line Tool**: Provides complete CLI commands with various parameter configurations
90
+ - **Node.js API**: Provides programming interface for easy integration into other projects
91
+ - **Web Service**: Supports starting as a web service, manage downloads through browser
92
+ - **Docker Deployment**: Provides Docker image for one-click deployment to server
93
+ - **Electron Desktop App**: Supports packaging as desktop application with built-in browser functionality
67
94
 
68
- - 支持中文和英文多语言
69
- - 命令行和 WebUI 均支持语言切换
95
+ ### 🌍 Internationalization Support
70
96
 
71
- ## 📦 安装
97
+ - Supports Chinese and English multi-language
98
+ - Both command line and WebUI support language switching
72
99
 
73
- **方式一:Node.js 核心库安装**
100
+ ## 📦 Installation
101
+
102
+ **Method 1: Global Installation with Node.js**
103
+
104
+ Use as a CLI command-line tool.
74
105
 
75
106
  ```bash
76
107
  npm i -g @lzwme/m3u8-dl
77
108
  m3u8dl -h
78
109
  ```
79
110
 
80
- 或者使用 `npx`:
111
+ Or use `npx` to run directly:
81
112
 
82
113
  ```bash
83
114
  npx @lzwme/m3u8-dl -h
84
115
  ```
85
116
 
86
- **方式二:桌面应用下载**
117
+ **Method 2: Desktop Application Download**
87
118
 
88
- 可访问如下地址之一下载最新版本:
119
+ Install as a PC client. Easy to use, suitable for most regular users, with built-in browser functionality to automatically extract video addresses. Download the latest version from one of the following addresses:
89
120
 
90
121
  - [https://m3u8-player.lzw.me/download.html](https://m3u8-player.lzw.me/download.html)
91
122
  - [https://github.com/lzwme/m3u8-dl/releases](https://github.com/lzwme/m3u8-dl/releases)
92
123
 
93
- ## 📖 使用指南
124
+ ## 📖 Usage Guide
94
125
 
95
- > **提示**:如需要下载并转换为 `mp4` 视频格式,您需全局安装 [ffmpeg](https://ffmpeg.org/download.html)
96
- > 或者使用 `--ffmpeg-path` 参数指定 ffmpeg 的路径。
126
+ > **Tip**: If you need to download and convert to `mp4` video format, you need to globally install [ffmpeg](https://ffmpeg.org/download.html).
127
+ > Or use the `--ffmpeg-path` parameter to specify the path to ffmpeg.
97
128
 
98
- ### 命令行使用
129
+ ### Using as CLI Command Line Tool
99
130
 
100
- 查看所有可用命令和选项:
131
+ View all available commands and options:
101
132
 
102
133
  ```bash
103
134
  m3u8dl --help
104
135
  ```
105
136
 
106
- #### 基础下载
137
+ #### Basic Download
107
138
 
108
139
  ```bash
109
- # 下载单个 m3u8 文件
140
+ # Download a single m3u8 file
110
141
  m3u8dl https://example.com/video.m3u8
111
142
 
112
- # 指定文件名和保存目录
113
- m3u8dl https://example.com/video.m3u8 --filename "我的视频" --save-dir "./downloads"
143
+ # Specify filename and save directory
144
+ m3u8dl https://example.com/video.m3u8 --filename "My Video" --save-dir "./downloads"
114
145
 
115
- # 启用边下边播模式
146
+ # Enable play-while-downloading mode
116
147
  m3u8dl https://example.com/video.m3u8 --play
117
148
 
118
- # 设置线程数(默认 4
149
+ # Set thread count (default 4)
119
150
  m3u8dl https://example.com/video.m3u8 --thread-num 8
120
151
 
121
- # 不转换为 mp4(仅下载 ts 片段)
152
+ # Don't convert to mp4 (only download ts segments)
122
153
  m3u8dl https://example.com/video.m3u8 --no-convert
123
154
 
124
- # 忽略指定时间片段(如跳过前 30 秒和最后 60 秒)
155
+ # Ignore specified time segments (e.g., skip first 30 seconds and last 60 seconds)
125
156
  m3u8dl https://example.com/video.m3u8 --ignore-segments "0-30,END-60"
126
157
  ```
127
158
 
128
- #### 批量下载
159
+ #### Batch Download
129
160
 
130
- **方式一:命令行参数**
161
+ **Method 1: Command Line Parameters**
131
162
 
132
163
  ```bash
133
- # 下载多个文件,使用 | 分隔文件名和 URL
134
- m3u8dl "1集|https://example.com/ep1.m3u8" "2集|https://example.com/ep2.m3u8" --filename "剧集名称"
164
+ # Download multiple files, use | to separate filename and URL
165
+ m3u8dl "Episode 1|https://example.com/ep1.m3u8" "Episode 2|https://example.com/ep2.m3u8" --filename "Series Name"
135
166
  ```
136
167
 
137
- **方式二:文本文件批量导入**
168
+ **Method 2: Batch Import from Text File**
138
169
 
139
- 创建 `剧集列表.txt` 文件,格式如下(使用 `$` 分隔文件名和 URL):
170
+ Create a `series-list.txt` file with the following format (use `$` to separate filename and URL):
140
171
 
141
172
  ```txt
142
- 1集$https://example.com/ep1.m3u8
143
- 2集$https://example.com/ep2.m3u8
144
- 3集$https://example.com/ep3.m3u8
173
+ Episode 1$https://example.com/ep1.m3u8
174
+ Episode 2$https://example.com/ep2.m3u8
175
+ Episode 3$https://example.com/ep3.m3u8
145
176
  ```
146
177
 
147
- 然后执行:
178
+ Then execute:
148
179
 
149
180
  ```bash
150
- m3u8dl 剧集列表.txt --filename "剧集名称"
181
+ m3u8dl series-list.txt --filename "Series Name"
151
182
  ```
152
183
 
153
- #### 视频解析下载
184
+ #### Video Parsing Download
154
185
 
155
- 支持抖音、微博等平台的分享链接:
186
+ Supports sharing links from platforms like Douyin, Weibo, etc.:
156
187
 
157
188
  ```bash
158
- # 抖音视频分享链接
189
+ # Douyin video sharing link
159
190
  m3u8dl "https://v.douyin.com/xxxxx/" --type parser
160
191
 
161
- # 微博视频分享链接
192
+ # Weibo video sharing link
162
193
  m3u8dl "https://weibo.com/xxxxx" --type parser
163
194
  ```
164
195
 
165
- #### 从网页提取 m3u8 地址
196
+ #### Extract m3u8 Address from Web Page
166
197
 
167
198
  ```bash
168
- # 从视频播放页面自动提取 m3u8 地址并下载
199
+ # Automatically extract m3u8 address from video playback page and download
169
200
  m3u8dl "https://example.com/play/12345" --type web
170
201
  ```
171
202
 
172
- #### 视频搜索下载
203
+ #### Video Search Download
173
204
 
174
205
  ```bash
175
- # 查看搜索命令帮助
206
+ # View search command help
176
207
  m3u8dl search --help
177
208
 
178
- # 指定采集站 API 并搜索下载(会缓存 API 地址)
209
+ # Specify collection site API and search download (will cache API address)
179
210
  m3u8dl search -u https://api.example.com/provide/vod/
180
211
 
181
- # 直接搜索关键词
182
- m3u8dl search "关键词" -u https://api.example.com/provide/vod/
212
+ # Search keyword directly
213
+ m3u8dl search "keyword" -u https://api.example.com/provide/vod/
183
214
  ```
184
215
 
185
- > **声明**:以上仅作示例,请自行搜索查找可用的采集站 API。本工具仅用作技术研究学习,不提供任何具体资源类信息。
216
+ > **Disclaimer**: The above are examples only. Please search for available collection site APIs yourself. This tool is only for technical research and learning purposes and does not provide any specific resource information.
186
217
 
187
- #### 常用命令行选项
218
+ #### Common Command Line Options
188
219
 
189
- | 选项 | 说明 |
190
- |------|------|
191
- | `-f, --filename <name>` | 指定文件名 |
192
- | `-n, --thread-num <number>` | 设置下载线程数(默认 4 |
193
- | `-p, --play` | 启用边下边播模式 |
194
- | `-C, --cache-dir <dirpath>` | 指定缓存目录 |
195
- | `-S, --save-dir <dirpath>` | 指定保存目录 |
196
- | `--no-convert` | 不转换为 mp4 |
197
- | `--no-del-cache` | 下载完成后不删除缓存 |
198
- | `--ffmpeg-path <path>` | 指定 ffmpeg 路径 |
199
- | `-H, --headers <headers>` | 设置请求头(JSON 格式) |
200
- | `-I, --ignore-segments <time>` | 忽略指定时间片段 |
201
- | `--debug` | 启用调试模式 |
202
- | `--lang <lang>` | 设置语言(zh/en |
220
+ | Option | Description |
221
+ |--------|-------------|
222
+ | `-f, --filename <name>` | Specify filename |
223
+ | `-n, --thread-num <number>` | Set download thread count (default 4) |
224
+ | `-p, --play` | Enable play-while-downloading mode |
225
+ | `-C, --cache-dir <dirpath>` | Specify cache directory |
226
+ | `-S, --save-dir <dirpath>` | Specify save directory |
227
+ | `--no-convert` | Don't convert to mp4 |
228
+ | `--no-del-cache` | Don't delete cache after download completes |
229
+ | `--ffmpeg-path <path>` | Specify ffmpeg path |
230
+ | `-H, --headers <headers>` | Set request headers (JSON format) |
231
+ | `-I, --ignore-segments <time>` | Ignore specified time segments |
232
+ | `--debug` | Enable debug mode |
233
+ | `--lang <lang>` | Set language (zh-CN/en) |
203
234
 
204
- ### WebUI 下载管理
235
+ ### WebUI Download Management
205
236
 
206
- 启动 Web 服务,通过浏览器管理下载任务:
237
+ Start web service to manage download tasks through browser:
207
238
 
208
239
  ```bash
209
- # 启动服务(默认端口 6600
240
+ # Start service (default port 6600)
210
241
  m3u8dl server
211
242
 
212
- # 指定端口和访问密码
243
+ # Specify port and access password
213
244
  m3u8dl server -p 8080 -t "your-secret-token"
214
245
  ```
215
246
 
216
- 启动后,在浏览器中访问 `http://localhost:6600` 即可使用 WebUI
217
-
218
- ![](examples/img/m3u8dl-webui-new.jpg)
247
+ After starting, visit `http://localhost:6600` in your browser to use WebUI.
219
248
 
220
- **WebUI 主要功能:**
249
+ **WebUI Main Features:**
221
250
 
222
- - 📥 创建下载任务(支持 m3u8 链接、视频分享链接、网页提取)
223
- - 📊 实时查看下载进度和速度
224
- - ⏸️ 暂停/恢复下载任务
225
- - 🗑️ 删除任务和已下载文件
226
- - ⚙️ 配置下载参数(线程数、保存目录等)
227
- - 🔍 搜索和筛选任务
228
- - 📁 查看已完成的下载
251
+ - 📥 Create download tasks (supports m3u8 links, Weibo and Pipixia video sharing links, video playback page extraction)
252
+ - 📊 View download progress and speed in real-time
253
+ - ⏸️ Pause/Resume download tasks
254
+ - 🗑️ Delete tasks and downloaded files
255
+ - ⚙️ Configure download parameters (thread count, save directory, etc.)
256
+ - 🔍 Search and filter tasks
257
+ - 📁 View completed downloads
229
258
 
230
- **环境变量配置:**
259
+ **Environment Variable Configuration:**
231
260
 
232
261
  ```bash
233
- # 设置端口
262
+ # Set port
234
263
  export DS_PORT=6600
235
264
 
236
- # 设置访问密码
265
+ # Set access password
237
266
  export DS_SECRET=your-secret-token
238
267
 
239
- # 设置保存目录
268
+ # Set save directory
240
269
  export DS_SAVE_DIR=./downloads
241
270
 
242
- # 设置缓存目录
271
+ # Set cache directory
243
272
  export DS_CACHE_DIR=./cache
244
273
 
245
- # 设置 ffmpeg 路径
274
+ # Set ffmpeg path
246
275
  export DS_FFMPEG_PATH=/usr/local/bin/ffmpeg
247
276
 
248
- # 启用调试模式
277
+ # Enable debug mode
249
278
  export DS_DEBUG=1
250
279
 
251
- # 限制文件访问(仅允许访问下载和缓存目录)
280
+ # Limit file access (only allow access to download and cache directories)
252
281
  export DS_LIMTE_FILE_ACCESS=1
253
282
  ```
254
283
 
255
- ### Node.js API 调用
284
+ ### Integration as Node.js API
256
285
 
257
- 在您的项目中使用编程接口:
286
+ Call related APIs in your project. Code examples:
258
287
 
259
288
  ```ts
260
289
  import { m3u8Download, m3u8BatchDownload, VideoParser, getM3u8Urls } from '@lzwme/m3u8-dl';
261
290
 
262
- // 示例 1:单文件下载
291
+ // Example 1: Single file download
263
292
  const result = await m3u8Download('https://example.com/video.m3u8', {
264
- filename: '我的视频',
293
+ filename: 'My Video',
265
294
  saveDir: './downloads',
266
295
  threadNum: 8,
267
296
  debug: true,
268
297
  });
269
298
 
270
299
  if (result.errmsg) {
271
- console.error('下载失败:', result.errmsg);
300
+ console.error('Download failed:', result.errmsg);
272
301
  } else {
273
- console.log('下载成功:', result.filepath);
302
+ console.log('Download successful:', result.filepath);
274
303
  }
275
304
 
276
- // 示例 2:批量下载
305
+ // Example 2: Batch download
277
306
  const fileList = [
278
- '1集$https://example.com/ep1.m3u8',
279
- '2集$https://example.com/ep2.m3u8',
307
+ 'Episode 1$https://example.com/ep1.m3u8',
308
+ 'Episode 2$https://example.com/ep2.m3u8',
280
309
  ];
281
310
  await m3u8BatchDownload(fileList, {
282
- filename: '剧集名称',
311
+ filename: 'Series Name',
283
312
  threadNum: 4,
284
313
  });
285
314
 
286
- // 示例 3:视频解析下载(抖音、微博等)
315
+ // Example 3: Video parsing download (Douyin, Weibo, etc.)
287
316
  const parser = new VideoParser();
288
317
  const parseResult = await parser.parse('https://v.douyin.com/xxxxx/');
289
318
  if (parseResult.data) {
290
- console.log('视频标题:', parseResult.data.title);
291
- console.log('视频地址:', parseResult.data.url);
319
+ console.log('Video title:', parseResult.data.title);
320
+ console.log('Video URL:', parseResult.data.url);
292
321
 
293
- // 下载视频
322
+ // Download video
294
323
  await parser.download('https://v.douyin.com/xxxxx/', {
295
324
  filename: parseResult.data.title,
296
325
  });
297
326
  }
298
327
 
299
- // 示例 4:从网页提取 m3u8 地址
328
+ // Example 4: Extract m3u8 addresses from web page
300
329
  const urls = await getM3u8Urls({
301
330
  url: 'https://example.com/play/12345',
302
331
  headers: {
303
332
  'User-Agent': 'Mozilla/5.0...',
304
333
  },
305
- deep: 2, // 搜索深度
334
+ deep: 2, // Search depth
306
335
  });
307
- console.log('提取到的地址:', Array.from(urls.keys()));
336
+ console.log('Extracted addresses:', Array.from(urls.keys()));
308
337
 
309
- // 示例 5:指定 ffmpeg 路径
338
+ // Example 5: Specify ffmpeg path
310
339
  import ffmpegStatic from 'ffmpeg-static';
311
340
  m3u8Download('https://example.com/video.m3u8', {
312
- filename: '测试视频',
313
- ffmpegPath: ffmpegStatic, // 使用 ffmpeg-static
314
- // 或指定系统路径
341
+ filename: 'Test Video',
342
+ ffmpegPath: ffmpegStatic, // Use ffmpeg-static package. Suitable for scenarios where ffmpeg is not globally installed
343
+ // Or specify the absolute path of installed ffmpeg (if already in PATH environment variable, no need to specify)
315
344
  // ffmpegPath: '/usr/local/bin/ffmpeg',
316
345
  });
317
346
  ```
318
347
 
319
- ### Docker 部署
348
+ ### Docker Deployment
320
349
 
321
- #### 使用 Docker 命令
350
+ #### Using Docker Command
322
351
 
323
352
  ```bash
324
- # 拉取镜像
353
+ # Pull image
325
354
  docker pull renxia/m3u8dl-dl:latest
326
355
 
327
- # 运行容器
356
+ # Run container
328
357
  docker run --rm -it \
329
358
  -v ./cache:/app/cache \
330
359
  -v ./downloads:/app/downloads \
@@ -334,9 +363,9 @@ docker run --rm -it \
334
363
  renxia/m3u8dl-dl:latest
335
364
  ```
336
365
 
337
- #### 使用 Docker Compose
366
+ #### Using Docker Compose
338
367
 
339
- 创建 `docker-compose.yml` 文件:
368
+ Create `docker-compose.yml` file:
340
369
 
341
370
  ```yml
342
371
  services:
@@ -352,127 +381,179 @@ services:
352
381
  DS_PORT: '6600'
353
382
  DS_SAVE_DIR: '/app/downloads'
354
383
  DS_CACHE_DIR: '/app/cache'
355
- DS_SECRET: '' # 设置访问密码
384
+ DS_SECRET: '' # Set access password
356
385
  DS_DEBUG: ''
357
- DS_FFMPEG_PATH: '' # 留空则使用系统 PATH 中的 ffmpeg
358
- DS_LIMTE_FILE_ACCESS: '1' # 限制文件访问
386
+ DS_FFMPEG_PATH: '' # Leave empty to use ffmpeg from system PATH
387
+ DS_LIMTE_FILE_ACCESS: '1' # Limit file access
359
388
  restart: unless-stopped
360
389
  ```
361
390
 
362
- 启动服务:
391
+ Start service:
363
392
 
364
393
  ```bash
365
394
  docker-compose up -d
366
395
  ```
367
396
 
368
- 部署成功后,浏览器访问 `http://your-server-ip:6600` 即可使用。
397
+ After successful deployment, visit `http://your-server-ip:6600` in your browser to use.
369
398
 
370
- > **提示**:Docker 镜像已包含 ffmpeg,无需额外安装。镜像同时包含了 [AriaNg](https://github.com/mayswind/AriaNg) 静态资源。
399
+ > **Tip**: The Docker image already includes ffmpeg, no need for additional installation. The image also includes [AriaNg](https://github.com/mayswind/AriaNg) static resources.
371
400
 
372
- ### Electron 桌面应用
401
+ ### Electron Desktop Application
373
402
 
374
- 项目支持打包为 Electron 桌面应用,提供更丰富的功能:
403
+ The project supports packaging as an Electron desktop application with richer features:
375
404
 
376
- - 🖥️ 原生桌面体验
377
- - 🌐 内置浏览器,支持从网页提取视频链接
378
- - 📱 系统托盘支持
379
- - 🔄 自动更新功能
405
+ - 🖥️ Native desktop experience
406
+ - 🌐 Built-in browser, supports extracting video links from web pages
407
+ - 📱 System tray support
408
+ - 🔄 Auto-update functionality
380
409
 
381
- 构建桌面应用:
410
+ Download the built application:
382
411
 
383
- ```bash
384
- # 进入应用目录
385
- cd packages/m3u8dl-app
412
+ - https://m3u8-player.lzw.me/download.html
413
+ - https://github.com/lzwme/m3u8-dl/releases
386
414
 
387
- # 安装依赖
388
- pnpm install
415
+ ### Browser Script Installation and Usage
389
416
 
390
- # 开发模式运行
391
- pnpm dev
417
+ **Installation Steps:**
392
418
 
393
- # 构建应用
394
- pnpm build
395
- ```
419
+ 1. Install browser extension (choose one):
420
+ - [Violentmonkey](https://violentmonkey.github.io/) (【Recommended】Open-source alternative)
421
+ - [Tampermonkey](https://www.tampermonkey.net/) (【Official】Supports Chrome, Firefox, Edge, Safari, etc.)
422
+ - [Greasemonkey](https://www.greasespot.net/) (Firefox only)
396
423
 
397
- 下载已构建的应用:
424
+ 2. Install script:
425
+ - Open Tampermonkey management panel
426
+ - Click "Add new script"
427
+ - Copy content from `client/m3u8-capture.user.js` file
428
+ - Paste into editor and save
429
+ - Or directly visit the link in browser: [https://raw.githubusercontent.com/lzwme/m3u8-dl/refs/heads/main/client/m3u8-capture.user.js](https://raw.githubusercontent.com/lzwme/m3u8-dl/refs/heads/main/client/m3u8-capture.user.js)
398
430
 
399
- - https://m3u8-player.lzw.me/download.html
400
- - https://github.com/lzwme/m3u8-dl/releases
431
+ 3. Configure WebUI address:
432
+ - Visit any web page, click the 🎬 icon in the top right corner to open the capture panel
433
+ - Click the settings button ⚙️
434
+ - Enter your m3u8-dl WebUI address (e.g., `http://localhost:6600`)
435
+ - Save settings
436
+
437
+ **Feature Description:**
438
+
439
+ - **Auto Capture**: The script automatically monitors network requests in web pages, when m3u8 or mp4 video links are detected, automatically adds them to the list
440
+ - **Video Name Extraction**: Prioritizes extracting video names from page `h1`, `h2`, or `document.title`
441
+ - **Jump to Download**: Click the "Jump to Download" button to automatically jump to m3u8-dl WebUI and fill in video link and name (format: `url|name`)
442
+ - **Exclusion Rules**: In settings, you can configure exclusion URL rule list, matching URLs will not show panel and will not capture video links
443
+ - Supports plain string matching (contains match)
444
+ - Supports regular expressions (starts and ends with `/`, e.g., `/example\.com/`)
445
+
446
+ **Usage Example:**
447
+
448
+ 1. Visit video playback page
449
+ 2. Script automatically captures video links, displayed in the panel in the bottom right corner
450
+ 3. Click "Jump to Download" button
451
+ 4. Automatically jumps to m3u8-dl WebUI, video link and name are automatically filled
452
+ 5. Click "Start Download" in WebUI
453
+
454
+ **Exclusion Rule Configuration Example:**
455
+
456
+ ```
457
+ localhost:6600
458
+ 127.0.0.1
459
+ /example\.com/
460
+ admin
461
+ ```
462
+
463
+ > **Tip**: The script automatically excludes WebUI address pages to avoid capturing in WebUI pages. You can also manually add more exclusion rules.
401
464
 
402
- ## 🛠️ 技术栈
465
+ ## 🛠️ Tech Stack
403
466
 
404
- - **后端**:Node.js + TypeScript + Express + WebSocket
405
- - **前端**:Vue 3 + TypeScript + Vite + Pinia + TailwindCSS
406
- - **桌面应用**:Electron
407
- - **代码质量**:Biome (Linter & Formatter)
408
- - **构建工具**:TypeScript Compiler
467
+ - **Backend**: Node.js + TypeScript + Express + WebSocket
468
+ - **Frontend**: Vue 3 + TypeScript + Vite + Pinia + TailwindCSS
469
+ - **Desktop App**: Electron
470
+ - **Code Quality**: Biome (Linter & Formatter)
471
+ - **Build Tool**: TypeScript Compiler
409
472
 
410
- ## 💻 开发指南
473
+ ## 💻 Development Guide
411
474
 
412
- ### 本地开发
475
+ ### Local Development
413
476
 
414
477
  ```bash
415
- # 克隆项目
478
+ # Clone project
416
479
  git clone https://github.com/lzwme/m3u8-dl.git
417
480
  cd m3u8-dl
418
481
 
419
- # 安装依赖
482
+ # Install dependencies
420
483
  pnpm install
421
484
 
422
- # 开发模式(监听文件变化自动编译)
485
+ # Development mode (watch file changes and auto-compile)
423
486
  pnpm dev
424
487
 
425
- # 构建项目
488
+ # Build project
426
489
  pnpm build
427
490
 
428
- # 代码检查
491
+ # Code check
429
492
  pnpm lint
430
493
 
431
- # 代码格式化
494
+ # Code format
432
495
  pnpm format
433
496
 
434
- # 修复代码问题
497
+ # Fix code issues
435
498
  pnpm fix
436
499
  ```
437
500
 
438
- ### 项目结构
501
+ Build desktop application:
502
+
503
+ ```bash
504
+ # Enter application directory
505
+ cd packages/m3u8dl-app
506
+
507
+ # Install dependencies
508
+ pnpm install
509
+
510
+ # Run in development mode
511
+ pnpm dev
512
+
513
+ # Build application
514
+ pnpm build
515
+ ```
516
+
517
+ ### Project Structure
439
518
 
440
519
  ```
441
520
  m3u8-dl/
442
- ├── src/ # 源代码(TypeScript
443
- │ ├── cli.ts # 命令行入口
444
- │ ├── lib/ # 核心库
445
- │ ├── server/ # Web 服务
446
- │ ├── video-parser/ # 视频解析器
447
- │ └── types/ # 类型定义
521
+ ├── src/ # Source code (TypeScript)
522
+ │ ├── cli.ts # Command line entry
523
+ │ ├── lib/ # Core library
524
+ │ ├── server/ # Web service
525
+ │ ├── video-parser/ # Video parser
526
+ │ └── types/ # Type definitions
448
527
  ├── packages/
449
- │ ├── frontend/ # Vue 3 前端项目
450
- └── m3u8dl-app/ # Electron 桌面应用
451
- ├── cjs/ # 编译后的 CommonJS 代码
452
- └── client/ # 前端构建输出
528
+ │ ├── frontend/ # Vue 3 frontend project
529
+ ├── m3u8dl-app/ # Electron desktop application
530
+ │ └── m3u8-capture/ # Browser userscript (TypeScript + Vite)
531
+ ├── cjs/ # Compiled CommonJS code
532
+ └── client/ # Frontend build output
533
+ └── m3u8-capture.user.js # Browser video address capture userscript (built from packages/m3u8-capture)
453
534
  ```
454
535
 
455
- ### 贡献代码
536
+ ### Contributing
456
537
 
457
- 欢迎提交 Issue Pull Request!
538
+ Welcome to submit Issues and Pull Requests!
458
539
 
459
- 1. [Fork](https://github.com/lzwme/m3u8-dl/fork) 本项目
460
- 2. 创建特性分支 (`git checkout -b feature/AmazingFeature`)
461
- 3. 提交更改 (`git commit -m 'Add some AmazingFeature'`)
462
- 4. 推送到分支 (`git push origin feature/AmazingFeature`)
463
- 5. 开启 Pull Request
540
+ 1. [Fork](https://github.com/lzwme/m3u8-dl/fork) this project
541
+ 2. Create feature branch (`git checkout -b feature/AmazingFeature`)
542
+ 3. Commit changes (`git commit -m 'Add some AmazingFeature'`)
543
+ 4. Push to branch (`git push origin feature/AmazingFeature`)
544
+ 5. Open Pull Request
464
545
 
465
- **欢迎贡献想法与代码!** 🎉
546
+ **Welcome to contribute ideas and code!** 🎉
466
547
 
467
- ## 📚 相关资源
548
+ ## 📚 Related Resources
468
549
 
469
- - [ffmpeg 下载](https://ffmpeg.org/download.html) - 视频处理工具
470
- - [m3u8 格式说明](https://en.wikipedia.org/wiki/M3U) - M3U8 播放列表格式
471
- - [项目更新日志](./CHANGELOG.md) - 查看版本更新历史
550
+ - [ffmpeg Download](https://ffmpeg.org/download.html) - Video processing tool
551
+ - [m3u8 Format Specification](https://en.wikipedia.org/wiki/M3U) - M3U8 playlist format
552
+ - [Project Changelog](./CHANGELOG.md) - View version update history
472
553
 
473
- ## 🙏 致谢
554
+ ## 🙏 Acknowledgments
474
555
 
475
- 感谢以下项目的启发和参考:
556
+ Thanks to the following projects for inspiration and reference:
476
557
 
477
558
  - [m3u8-multi-thread-downloader](https://github.com/sahadev/m3u8Downloader)
478
559
  - [m3u8Utils](https://github.com/liupishui/m3u8Utils)
@@ -481,7 +562,7 @@ m3u8-dl/
481
562
 
482
563
  `@lzwme/m3u8-dl` is released under the MIT license.
483
564
 
484
- 该插件由[志文工作室](https://lzw.me)开发和维护。
565
+ This plugin is developed and maintained by [Zhiwen Studio](https://lzw.me).
485
566
 
486
567
  [stars-badge]: https://img.shields.io/github/stars/lzwme/m3u8-dl.svg
487
568
  [stars-url]: https://github.com/lzwme/m3u8-dl/stargazers