dsh-vidi 0.8.4 → 0.8.6
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/lib/client.js +3 -1
- package/lib/index.mjs +15 -4
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -36436,7 +36436,7 @@ function LiveView(props) {
|
|
|
36436
36436
|
!accessIssue && (error || job?.status === "error") && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
36437
36437
|
className: "dshl-note warn",
|
|
36438
36438
|
children: [
|
|
36439
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: error || (job?.message === "device-blocked" ? t("dev.blocked") : job?.message === "restored" ? t("st.failedEarlier") : job?.message) }),
|
|
36439
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: error || (job?.message === "device-blocked" ? t("dev.blocked") : job?.message === "device-stalled" ? t("dev.stalled") : job?.message === "restored" ? t("st.failedEarlier") : job?.message) }),
|
|
36440
36440
|
job?.message === "device-blocked" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
36441
36441
|
className: "dshl-link",
|
|
36442
36442
|
onClick: () => openPrivacy(blockedKind()),
|
|
@@ -37359,6 +37359,7 @@ const en = {
|
|
|
37359
37359
|
"dev.blocked": "No picture or sound from the device: DeepSeek Harness needs the system’s permission. Open System Settings, switch DeepSeek Harness on, then retry.",
|
|
37360
37360
|
"dev.denied": "DeepSeek Harness needs permission to use the {d}. Open System Settings, switch it on in the list, then retry.",
|
|
37361
37361
|
"dev.and": " and ",
|
|
37362
|
+
"dev.stalled": "The camera sent pictures but they could not be recorded. Retry; if it happens again, pick another camera.",
|
|
37362
37363
|
"st.failedEarlier": "This one did not finish last time.",
|
|
37363
37364
|
"dev.k.camera": "camera",
|
|
37364
37365
|
"dev.k.microphone": "microphone",
|
|
@@ -37798,6 +37799,7 @@ const zh = {
|
|
|
37798
37799
|
"dev.blocked": "设备没有传来画面和声音:DeepSeek Harness 需要系统授权。点「打开系统设置」,在列表里打开 DeepSeek Harness,再点重试。",
|
|
37799
37800
|
"dev.denied": "DeepSeek Harness 需要{d}权限。点「打开系统设置」,在列表里打开它,再点重试。",
|
|
37800
37801
|
"dev.and": "和",
|
|
37802
|
+
"dev.stalled": "摄像头有画面传来,但没能录下来。点重试;还不行就换一个摄像头试试。",
|
|
37801
37803
|
"st.failedEarlier": "上次这个没有成功。",
|
|
37802
37804
|
"dev.k.camera": "摄像头",
|
|
37803
37805
|
"dev.k.microphone": "麦克风",
|
package/lib/index.mjs
CHANGED
|
@@ -1912,11 +1912,13 @@ function deviceInput(c, q) {
|
|
|
1912
1912
|
if (process.platform === "darwin") return {
|
|
1913
1913
|
args: [
|
|
1914
1914
|
...q,
|
|
1915
|
+
"-use_wallclock_as_timestamps",
|
|
1916
|
+
"1",
|
|
1915
1917
|
"-f",
|
|
1916
1918
|
"avfoundation",
|
|
1917
1919
|
"-framerate",
|
|
1918
1920
|
"30",
|
|
1919
|
-
...c.video ? ["-capture_cursor", "1"] : [],
|
|
1921
|
+
...c.video ? /^Capture screen/.test(c.video) ? ["-capture_cursor", "1"] : ["-video_size", "1280x720"] : [],
|
|
1920
1922
|
"-i",
|
|
1921
1923
|
`${c.video ?? "none"}:${c.audio}`
|
|
1922
1924
|
],
|
|
@@ -2232,7 +2234,8 @@ var LiveJob = class LiveJob extends EventEmitter {
|
|
|
2232
2234
|
this.title = c.title || "Camera";
|
|
2233
2235
|
return {
|
|
2234
2236
|
...deviceInput(c, q),
|
|
2235
|
-
vcodec: "rawvideo"
|
|
2237
|
+
vcodec: "rawvideo",
|
|
2238
|
+
fps: 30
|
|
2236
2239
|
};
|
|
2237
2240
|
}
|
|
2238
2241
|
if (source === "push") {
|
|
@@ -2384,7 +2387,13 @@ var LiveJob = class LiveJob extends EventEmitter {
|
|
|
2384
2387
|
"-pix_fmt",
|
|
2385
2388
|
"yuv420p",
|
|
2386
2389
|
"-g",
|
|
2387
|
-
"50"
|
|
2390
|
+
"50",
|
|
2391
|
+
...input.fps ? [
|
|
2392
|
+
"-r",
|
|
2393
|
+
String(input.fps),
|
|
2394
|
+
"-tune",
|
|
2395
|
+
"zerolatency"
|
|
2396
|
+
] : []
|
|
2388
2397
|
]
|
|
2389
2398
|
] : input.cover ? [
|
|
2390
2399
|
"-loop",
|
|
@@ -2464,7 +2473,7 @@ var LiveJob = class LiveJob extends EventEmitter {
|
|
|
2464
2473
|
if (this.ffmpeg !== ff || this.segments().length) return;
|
|
2465
2474
|
this.ffmpeg = void 0;
|
|
2466
2475
|
ff.kill("SIGKILL");
|
|
2467
|
-
this.setStatus("error", "device-blocked");
|
|
2476
|
+
this.setStatus("error", flowing ? "device-stalled" : "device-blocked");
|
|
2468
2477
|
}, 12e3);
|
|
2469
2478
|
if (this.opts.source === "push") {
|
|
2470
2479
|
const wait = setInterval(() => {
|
|
@@ -2479,8 +2488,10 @@ var LiveJob = class LiveJob extends EventEmitter {
|
|
|
2479
2488
|
}, 400);
|
|
2480
2489
|
}
|
|
2481
2490
|
let rejected = false;
|
|
2491
|
+
let flowing = false;
|
|
2482
2492
|
ff.stderr.on("data", (d) => {
|
|
2483
2493
|
appendFileSync(join(this.deps.dir, "ffmpeg.log"), d);
|
|
2494
|
+
if (!flowing && /pts|dts|frame|Past duration/i.test(d.toString())) flowing = true;
|
|
2484
2495
|
if (this.opts.source === "push" && !rejected && /Unexpected stream/.test(d.toString())) {
|
|
2485
2496
|
rejected = true;
|
|
2486
2497
|
ff.kill("SIGKILL");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-vidi",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.6",
|
|
4
4
|
"description": "A video tool for DeepSeek Harness: watch live streams, videos and podcasts with real-time subtitles in any language, then clip and download",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "PolyForm-Noncommercial-1.0.0",
|