-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@discordjs/opus version mismatch on linux #36
Comments
That's strange: I tested it once under Ubuntu with exactly the same broken preview as in your screenshot. I then enabled "Headless" mode and disabled "frameless" mode. For "headless" mode I've seen that my "Sample Rate" was not set, so I set it and I got a preview afterwards, too. Now the strange thing: I now switched back to "frameless" mode and it works now. Can it be that also for you in the fields of "headless" mode there are some problems? Can you show me the entire config or just export it and append it here? |
Sure, exported config %YAML 1.2
##
## Vingester Configuration
## Version: Vingester 2.2.5
## Date: 2021-06-10 00:56
##
---
- BrowserTitle: "The-Expert-4"
BrowserInfo: "The Expert: IT Support (Square Project Episode 2)"
BrowserWidth: 854
BrowserHeight: 480
BrowserColor: "transparent"
BrowserZoom: 1
BrowserTrust: false
BrowserNodeAPI: false
BrowserOBSDOM: false
BrowserPersist: false
InputURL: "https://www.youtube.com/embed/ZOzzRlc_qho?autoplay=1&controls=0&rel=0"
PatchDelay: 0
PatchFrame: ""
PatchStyleType: "inline"
PatchStyleCode: ""
PatchScriptType: "inline"
PatchScriptCode: ""
Output1Enabled: true
Output1VideoPositionX: 0
Output1VideoPositionY: 0
Output1VideoDisplay: 1
Output1VideoPinTop: false
Output1AudioDevice: ""
Output2Enabled: false
Output2VideoFrameRate: 30
Output2VideoAdaptive: false
Output2VideoDelay: 0
Output2AudioSampleRate: 48000
Output2AudioChannels: 2
Output2AudioDelay: 0
Output2SinkNDIEnabled: false
Output2SinkFFmpegEnabled: true
Output2SinkFFmpegMode: "cbr"
Output2SinkFFmpegFormat: "mpegts"
Output2SinkFFmpegOptions: "srt://127.0.0.1:10000?&pkt_size=1316&mode=caller"
PreviewEnabled: true
ConsoleEnabled: true
DevToolsEnabled: false
Collapsed: false |
Very strange. If I wouldn't have seen the bug on my initial test, I wouldn't believe it. I've removed my entries, imported your file, enabled PREVIEW and it worked just fine (at least under this Ubuntu 20/04 under WSL under Windows 10, as I've no Linux desktop around, just servers): Unfortunately, unless I can repeat the problem, I cannot figure out a solution, of course. We have to find a way to repeat the problem. Hmm... |
I'll try to reproduce environment where this issue appears |
Just installed Vingester from git (version 2.2.6)
During install got @discordjs/opus related messages (and @discordjs/opus starts compiling):
After running npm start - preview works fine, main.log - without errors. After starting downloaded from github (release 2.2.6) Vingester app - preview is missing (with same configs), and I see en error in the main.log file:
|
Ah, ok. I see. The build-time warning indicated that you have a Linux system which does NOT match x64/glibc-2.33, because no pre-built binary was found. The run-time error in the second case indicates that the binary I have built under my Linux system does also not match your Linux system and hence it fails. The missing preview then is just a subsequence side-effect. So, we have to find out why the pre-build binaries do not match and break. According to your initial information, that's a latest Fedora 34/x64 system, right? I've no such system currently available, so first have to setup it in a VM in order to better understand the particular problem. But in general, it is clear that a pre-built Linux binary can easily crash on certain Linux systems, as there are just too many small differences between the Linux systems. I built under Ubunti 20/04, you are under Fedora 34. This seems to be already far away. But good that we already figured out that the preview problem is actually just a side-effect or a completely different problem. Let's see what we can do... |
One more side effect I met on linux with opus version mismatch - not working headless ffmpeg output. |
Let me guess: the FFmpeg does not work for the same reason: the FFmpeg binary (built under Debian) does not run under this latest Fedora or at least crashes there. |
I'm pretty sure that prebult opus for glibc-2.27 will work on most linux distros from debian stable to latest Ubuntu or Fedora because older glibc is compatible with newer versions (not vice versa).
After npm start - preview and ffmpeg output works. |
As I see Vingester uses static ffmpeg from https://johnvansickle.com/ffmpeg/
|
Then the FFmpeg problem is also a side-effect of the @discord/opus trouble |
But we cannot control what pre-built binary electron-builder fetches during the building of the Vingester binary on Ubuntu 20/04... |
Sure. Its a dirty hack, but for public release build process you can somehow "hardcode" prebuilt opus for your node version and glibc-2.27 Any dinamically linked lib on different linux distros/versions can be showstopper. For most glibc based distros it will be working sulution. Not sure about musl libc based distros (https://wiki.musl-libc.org/projects-using-musl.html) but IMHO musl is more "exotic" case. |
Interesting: just a few hours ago Discord released version 0.5.3 of their NPM module, including new pre-build binaries. But in order to understand the situation: you have a Fedora Linux 34 and it actually HAS a glibc 2.33. Nevertheless the binary bundled by Vingester crashes. But the glibc 2.27 version worked? Strange... So, your recommendation is that Vingester replaces the glibc 2.33 binary with the glibc 2.27 one as this way Vingester has more chance to work, even under newer Linux versions (based on glibc 2.33), right? |
A propos I see a comment about static ffmpeg on Ubuntu
It's pretty strange. These crashes observed on a "real" Ubuntu OS or WSL/WSL2 ? |
The crashes were under non-WSL systems and with my other Electron application LiVE Receiver (but it uses FFmpeg the same way than Vingester). Mint Linux and Ubuntu Linux were those problematic platforms, as far as I can remember. |
Before I hack in the glibc-2.27 workaround, can you recheck the situation with the glibc-2.33 binaries for the just released @discord/opus 0.5.3? Not that we apply a downgrade workaround, although the newer pre-build binaries would work now. |
Yes, Fedora 34 ships with glibc 2.33. I'll try to explain the situation
I see as a possible solution:
|
cloned 77b9642 built on my machine works (preview, frameless out, headless ffmpeg output to mkv/m4v/srt). Can you share for tests 2.2.7 beta compiled on your build host? |
Just installed and updated Ubuntu 20.10 x86_64, ffmpeg 4.4 static amd64 from https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz |
JFYI - as a workaround on my linux machines I building Vingester from sources on target system and it works fine for me. |
Yes, that's the usual trouble under Linux all the time: the differences in the ABIs between different Linux distros are large enough that pre-built binaries can fail. It's the trouble with FFmpeg and here again with the Node module @discordjs/opus. I've no solution at hand beside the possibility to provide N different Vingester binaries for lots of Linux distros. |
Vingester 2.2.5 for linux
OS: Fedora 34 x86_64, kernel 5.12.9-300, GPU Nvidia GeForce GT 755M, Gnome 40.1.0, Wayland 1.19.0, nouveau 1.0.17
While running frameless output with preview enabled - preview shows nothing on a linux Vingester version.
Same source with same settings on Windows version - works fine.
Screenshot:
The text was updated successfully, but these errors were encountered: