Remove bundled custom GStreamer binaries in favor of platform-native GStreamer
- Linguagem predominante
- TypeScript
- Estrelas
- 38
- Forks
- 78
- Merge médio
- 4d 4h
- PRs com merge (30d)
- 7
Descrição
### Problem Summary
In PR #388, Rein introduced automated downloading of precompiled GStreamer binaries into `bin/gstreamer/` via `scripts/install-gstreamer.js` (hooked into `"postinstall"` in `package.json`). `src/server/gstreamer/gstPaths.ts` was modified to prefer this bundled folder over system-installed GStreamer by default (`resolveGstPaths()`).
In practice, distributing custom precompiled GStreamer binaries across diverse OS environments has caused severe portability regressions:
1. **Dynamic Linker & GLIBC Incompatibility**:
- The bundled Linux archive was compiled against `GLIBC_2.43`. Standard production Linux distributions (Ubuntu 22.04/24.04 LTS, Debian, Fedora, Arch, NixOS) fail with:
```
gst-launch-1.0: /lib/x86_64-linux-gnu/libc.so.6: version 'GLIBC_2.43' not found
```
2. **Missing Plugins & Shared Libraries**:
- The bundled archive is missing shared libraries (such as `libgstx264.so`), causing pipelines using `x264enc` to peg the CPU at 100% or terminate abruptly with exit code 1.
### Codebase Changes Required
1. **Remove Postinstall Download Hook & Script**:
- Remove `"postinstall": "node scripts/install-gstreamer.js"` from `package.json`.
- Remove `scripts/install-gstreamer.js`.
2. **Simplify `src/server/gstreamer/gstPaths.ts`**:
- Remove `getBundledGstreamerRoot()` and `bundledPaths()`.
- Make `resolveGstPaths()` resolve directly to the system `gst-launch-1.0` (and `gst-launch-1.0.exe` on Windows) via PATH.
- Remove the complex `LD_LIBRARY_PATH` / `DYLD_LIBRARY_PATH` / `GST_PLUGIN_PATH` overrides that interfere with system libraries.
3. **Update Electron Packaging**:
- In `package.json`, remove `{ "from": "bin", "to": "bin" }` from `build.extraResources`.
4. **Update `src/server-config.json`**:
- Remove or deprecate `"useSystemGstreamer": false`.
5. **Documentation**:
- Add concise, single-command GStreamer setup instructions for Linux, macOS, and Windows in the `README.md` and onboarding docs.
Guia de contribuição
Avaliação
Esta issue ainda não foi avaliada.