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.
@@ -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
- if (mergedOptions.audioInput) {
87
- command.input(mergedOptions.audioInput).inputOptions(["-stream_loop", "-1"]);
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": "piixishstream",
3
- "version": "1.0.6",
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": ">=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 <nguyen.long.908132@gmail.com>",
66
- "s074 <torresefrain10@gmail.com>",
67
- "mrjvs <jellevs@gmail.com>",
68
- "Elysia <71698422+aiko-chan-ai@users.noreply.github.com>",
69
- "Fede14 <fede.ferri2001@gmail.com>",
70
- "Malthe Morsing Larsen <57196060+malthemorsing@users.noreply.github.com>"
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
- }
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
-
@@ -212,19 +212,17 @@ export function prepareStream(
212
212
 
213
213
  // command creation
214
214
  const command = ffmpeg(input);
215
- if (mergedOptions.audioInput) {
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;