dsh-ffmpeg 0.1.0 → 0.1.1
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.en.md +2 -0
- package/README.md +8 -0
- package/lib/tools.js +2 -1
- package/package.json +4 -3
package/README.en.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
# dsh-ffmpeg
|
|
4
4
|
|
|
5
|
+
[](https://awesome-dsh-plugin.com)
|
|
6
|
+
|
|
5
7
|
DSH (DeepSeek Harness) video-processing plugin: seven tools covering probing, cutting, concatenation, transcoding, subtitles, extraction and GIF creation — all powered by ffmpeg/ffprobe.
|
|
6
8
|
|
|
7
9
|
## Installation
|
package/README.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
# dsh-ffmpeg
|
|
4
4
|
|
|
5
|
+
> **你的 agent 会剪视频了**:探测/剪辑/拼接/转码/字幕/抽帧/GIF,七个工具一条命令。
|
|
6
|
+
|
|
7
|
+
   
|
|
8
|
+
|
|
9
|
+
[](https://awesome-dsh-plugin.com)
|
|
10
|
+
|
|
11
|
+
|
|
5
12
|
DSH(DeepSeek Harness)视频处理工具插件:七个工具覆盖探测、剪辑、拼接、转码、字幕、提取与 GIF 制作,全部由 ffmpeg/ffprobe 完成。
|
|
6
13
|
|
|
7
14
|
## 安装
|
|
@@ -66,3 +73,4 @@ pnpm test # 构建 + 50 个测试(含真实 ffmpeg 端到端集成,缺
|
|
|
66
73
|
## License
|
|
67
74
|
|
|
68
75
|
MIT
|
|
76
|
+
|
package/lib/tools.js
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* @module dsh-ffmpeg/tools
|
|
6
6
|
*/
|
|
7
7
|
import { rmSync, writeFileSync } from 'node:fs';
|
|
8
|
+
import { randomUUID } from 'node:crypto';
|
|
8
9
|
import { tmpdir } from 'node:os';
|
|
9
10
|
import { basename, dirname, extname, join } from 'node:path';
|
|
10
11
|
import { concatArgs, concatListContent, cutArgs, ENCODE_PRESETS, encodeArgs, extractArgs, fmtSeconds, gifPaletteArgs, gifUseArgs, probeArgs, subtitleArgs, } from './args.js';
|
|
@@ -217,7 +218,7 @@ export function buildFfmpegTools(config, runner) {
|
|
|
217
218
|
const firstExt = extname(absolute[0]) || '.mp4';
|
|
218
219
|
const output = resolveOutputPath(absolute[0], optionalString(args, 'output'), '.concat', firstExt, cfg.overwrite);
|
|
219
220
|
if (!reencode) {
|
|
220
|
-
const listPath = join(tmpdir(), 'dsh-ffmpeg-concat-' + Date.now() + '-' +
|
|
221
|
+
const listPath = join(tmpdir(), 'dsh-ffmpeg-concat-' + Date.now() + '-' + randomUUID().slice(0, 8) + '.txt');
|
|
221
222
|
writeFileSync(listPath, concatListContent(absolute), 'utf8');
|
|
222
223
|
try {
|
|
223
224
|
await runChecked(runner, concatArgs(cfg.ffmpegPath, { inputs: absolute, listFilePath: listPath, output, overwrite: cfg.overwrite, reencode: false }), timeout, 'ffmpeg 拼接');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-ffmpeg",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "DSH 视频处理工具插件:ffmpeg_probe/cut/concat/encode/subtitle/extract/gif 七工具,进程走官方 subprocess 服务,零运行时依赖(ffmpeg 本体除外)。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -37,7 +37,8 @@
|
|
|
37
37
|
"plugin",
|
|
38
38
|
"ffmpeg",
|
|
39
39
|
"video",
|
|
40
|
-
"media"
|
|
40
|
+
"media",
|
|
41
|
+
"dsh-plugin"
|
|
41
42
|
],
|
|
42
43
|
"license": "MIT",
|
|
43
44
|
"engines": {
|
|
@@ -49,7 +50,7 @@
|
|
|
49
50
|
},
|
|
50
51
|
"repository": {
|
|
51
52
|
"type": "git",
|
|
52
|
-
"url": "https://github.com/STARDUSTLC666/dsh-ffmpeg"
|
|
53
|
+
"url": "git+https://github.com/STARDUSTLC666/dsh-ffmpeg.git"
|
|
53
54
|
},
|
|
54
55
|
"bugs": {
|
|
55
56
|
"url": "https://github.com/STARDUSTLC666/dsh-ffmpeg/issues"
|