piixishstream 1.0.6 → 1.0.8
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/dist/media/newApi.js +8 -5
- package/package.json +81 -83
- package/src/media/newApi.ts +5 -7
package/dist/media/newApi.js
CHANGED
|
@@ -82,15 +82,17 @@ export function prepareStream(input, options = {}, cancelSignal) {
|
|
|
82
82
|
}
|
|
83
83
|
const output = new PassThrough();
|
|
84
84
|
// command creation
|
|
85
|
-
const command = ffmpeg(input);
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
// input options
|
|
85
|
+
const command = ffmpeg(input);
|
|
86
|
+
// Apply customInputOptions to the FIRST input (video/image) BEFORE adding audioInput
|
|
87
|
+
// so fluent-ffmpeg binds them to the correct input (not to silence.opus)
|
|
90
88
|
if (mergedOptions.customInputOptions &&
|
|
91
89
|
mergedOptions.customInputOptions.length > 0) {
|
|
92
90
|
command.inputOptions(mergedOptions.customInputOptions);
|
|
93
91
|
}
|
|
92
|
+
// Add audio input AFTER customInputOptions so it becomes input 1
|
|
93
|
+
if (mergedOptions.audioInput) {
|
|
94
|
+
command.input(mergedOptions.audioInput).inputOptions(["-stream_loop", "-1"]);
|
|
95
|
+
}
|
|
94
96
|
const { hardwareAcceleratedDecoding, minimizeLatency, customHeaders } = mergedOptions;
|
|
95
97
|
if (hardwareAcceleratedDecoding)
|
|
96
98
|
command.inputOption("-hwaccel", "auto");
|
|
@@ -168,6 +170,7 @@ export function prepareStream(input, options = {}, cancelSignal) {
|
|
|
168
170
|
.audioCodec("libopus")
|
|
169
171
|
.audioBitrate(`${bitrateAudio}k`)
|
|
170
172
|
.audioFilters("volume@internal_lib=1.0");
|
|
173
|
+
}
|
|
171
174
|
// Add custom ffmpeg flags
|
|
172
175
|
if (mergedOptions.customFfmpegFlags &&
|
|
173
176
|
mergedOptions.customFfmpegFlags.length > 0) {
|
package/package.json
CHANGED
|
@@ -1,85 +1,83 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name":
|
|
3
|
-
"version":
|
|
4
|
-
"description":
|
|
5
|
-
"main":
|
|
6
|
-
"exports":
|
|
7
|
-
"types":
|
|
8
|
-
"type":
|
|
9
|
-
"files":
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"publishConfig":
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"dependencies":
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"devDependencies":
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"peerDependencies":
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"engines":
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"scripts":
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"keywords":
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
"repository":
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
"contributors":
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"license":
|
|
73
|
-
"bugs":
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
"homepage":
|
|
77
|
-
"pnpm":
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
2
|
+
"name": "piixishstream",
|
|
3
|
+
"version": "1.0.8",
|
|
4
|
+
"description": "Experiment for making video streaming work for discord selfbots",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"exports": "./dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"type": "module",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"src"
|
|
12
|
+
],
|
|
13
|
+
"publishConfig": {
|
|
14
|
+
"access": "public"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@lng2004/node-datachannel": "0.32.0-20260202",
|
|
18
|
+
"@snazzah/davey": "^0.1.8",
|
|
19
|
+
"debug-level": "^4.1.1",
|
|
20
|
+
"fluent-ffmpeg": "^2.1.3",
|
|
21
|
+
"node-av": "^5.2.2",
|
|
22
|
+
"p-debounce": "^5.1.0",
|
|
23
|
+
"sharp": "^0.34.5",
|
|
24
|
+
"zeromq": "^6.5.0"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@biomejs/biome": "2.3.8",
|
|
28
|
+
"@types/fluent-ffmpeg": "^2.1.28",
|
|
29
|
+
"@types/node": "^25.0.1",
|
|
30
|
+
"discord.js-selfbot-v13": "^3.7.1",
|
|
31
|
+
"pkg-pr-new": "^0.0.62",
|
|
32
|
+
"typescript": "^5.9.3"
|
|
33
|
+
},
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"discord.js-selfbot-v13": "^3.6.0"
|
|
36
|
+
},
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": "\u003e=22.4.0"
|
|
39
|
+
},
|
|
40
|
+
"scripts": {
|
|
41
|
+
"build": "tsc",
|
|
42
|
+
"lint": "biome lint --error-on-warnings .",
|
|
43
|
+
"lint:fix": "biome lint --write .",
|
|
44
|
+
"check": "biome check .",
|
|
45
|
+
"check:fix": "biome check --write ."
|
|
46
|
+
},
|
|
47
|
+
"keywords": [
|
|
48
|
+
"discord",
|
|
49
|
+
"video",
|
|
50
|
+
"voice",
|
|
51
|
+
"stream",
|
|
52
|
+
"go-live",
|
|
53
|
+
"webrtc",
|
|
54
|
+
"dave",
|
|
55
|
+
"selfbot",
|
|
56
|
+
"performance",
|
|
57
|
+
"60fps"
|
|
58
|
+
],
|
|
59
|
+
"repository": {
|
|
60
|
+
"type": "git",
|
|
61
|
+
"url": "git+https://github.com/dank074/Discord-video-stream.git"
|
|
62
|
+
},
|
|
63
|
+
"contributors": [
|
|
64
|
+
"Piixish",
|
|
65
|
+
"Long Nguyen \u003cnguyen.long.908132@gmail.com\u003e",
|
|
66
|
+
"s074 \u003ctorresefrain10@gmail.com\u003e",
|
|
67
|
+
"mrjvs \u003cjellevs@gmail.com\u003e",
|
|
68
|
+
"Elysia \u003c71698422+aiko-chan-ai@users.noreply.github.com\u003e",
|
|
69
|
+
"Fede14 \u003cfede.ferri2001@gmail.com\u003e",
|
|
70
|
+
"Malthe Morsing Larsen \u003c57196060+malthemorsing@users.noreply.github.com\u003e"
|
|
71
|
+
],
|
|
72
|
+
"license": "ISC",
|
|
73
|
+
"bugs": {
|
|
74
|
+
"url": "https://github.com/dank074/Discord-video-stream/issues"
|
|
75
|
+
},
|
|
76
|
+
"homepage": "https://github.com/dank074/Discord-video-stream#readme",
|
|
77
|
+
"pnpm": {
|
|
78
|
+
"onlyBuiltDependencies": [
|
|
79
|
+
"@lng2004/node-datachannel",
|
|
80
|
+
"node-datachannel"
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
83
|
}
|
|
84
|
-
|
|
85
|
-
|
package/src/media/newApi.ts
CHANGED
|
@@ -212,19 +212,17 @@ export function prepareStream(
|
|
|
212
212
|
|
|
213
213
|
// command creation
|
|
214
214
|
const command = ffmpeg(input);
|
|
215
|
-
|
|
216
|
-
command.input(mergedOptions.audioInput).inputOptions(["-stream_loop", "-1"]);
|
|
217
|
-
}
|
|
218
|
-
if (mergedOptions.audioInput) {
|
|
219
|
-
command.input(mergedOptions.audioInput).inputOptions(["-stream_loop", "-1"]);
|
|
220
|
-
}
|
|
221
|
-
// input options
|
|
215
|
+
// Apply customInputOptions to the FIRST input BEFORE adding audioInput
|
|
222
216
|
if (
|
|
223
217
|
mergedOptions.customInputOptions &&
|
|
224
218
|
mergedOptions.customInputOptions.length > 0
|
|
225
219
|
) {
|
|
226
220
|
command.inputOptions(mergedOptions.customInputOptions);
|
|
227
221
|
}
|
|
222
|
+
// Add audio input AFTER so it becomes input 1
|
|
223
|
+
if (mergedOptions.audioInput) {
|
|
224
|
+
command.input(mergedOptions.audioInput).inputOptions(["-stream_loop", "-1"]);
|
|
225
|
+
}
|
|
228
226
|
|
|
229
227
|
const { hardwareAcceleratedDecoding, minimizeLatency, customHeaders } =
|
|
230
228
|
mergedOptions;
|