Files
GMW/patches
MythEclipse 1565a326d0 build(deps): patch node-crc to resolve native build issues
Add a patch for node-crc@4.0.0 in pnpm-workspace.yaml to address build failures related to native dependency compilation.
2026-06-08 20:11:34 +07:00
..
2026-06-02 18:34:55 +07:00

Patches

This directory contains patches for vendor dependencies that have local modifications.

ffmpeg-headers-fix.patch

Issue: Screen share streaming fails with ffmpeg error:

[NULL @ ...] Unable to find a suitable output format for 'Mozilla/5.0'

Root Cause: The @dank074/discord-video-stream library's prepareStream function passes HTTP headers to ffmpeg without proper quoting. The fluent-ffmpeg-simplified library uses parseArgsStringToArgv to parse command-line arguments, which splits strings by spaces. This causes the User-Agent header value (with spaces) to be split into multiple separate arguments instead of being kept as a single value.

Fix: Wrap the entire headers string in quotes so parseArgsStringToArgv treats it as a single argument:

// Before (broken)
command.inputOptions(
  "-headers",
  Object.entries(customHeaders)
    .map(([k, v]) => `${k}: ${v}`)
    .join("\r\n"),
);

// After (fixed)
const headersString = Object.entries(customHeaders)
  .map(([k, v]) => `${k}: ${v}`)
  .join("\r\n");
command.inputOptions(`-headers "${headersString}"`);

Applied To: vendor/discord-video-stream/src/media/newApi.ts (lines 263-269)

Status: Patch is applied locally. The compiled output in dist/media/newApi.js reflects this fix.

Note: This is a local patch to the vendor submodule. To make this permanent, it should be submitted as a PR to the upstream repository: https://github.com/dank074/discord-video-stream