mirror of
https://github.com/imputnet/cobalt.git
synced 2026-05-22 06:18:25 -05:00
Bug: On Linux, ffmpeg-static binary is unable to download content if nscd daemon is not running.
#54
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jojobii-arks on GitHub (Mar 29, 2023).
New info, see https://github.com/wukko/cobalt/issues/101#issuecomment-1494822258
Previously titled - Bug: Unable to download content in formats that rely on
ffmpegwhen running Cobalt in Ubuntu/WSLOriginal Issue below:
Issue
ffmpegto process results in the downloaded file being blank.Steps to Reproduce.
npm run setupwith default values for localhost environment.npm startand open Cobalt on browser. Attempt to download a YouTube Video in different formats and observe normal behavior.Additional Notes
-reporttoffmpegArgsinconfig.jsonand attempted to download the following: https://www.youtube.com/watch?v=RxhCfYsqbSM@wukko commented on GitHub (Mar 29, 2023):
main cobalt instance runs on ubuntu, and it's just fine.
what version of ubuntu on wsl are you running exactly?
@jojobii-arks commented on GitHub (Mar 29, 2023):
v18.15.0. I downgraded tov17.9.1, redid setup, but still ran into the same issue.@wukko commented on GitHub (Mar 30, 2023):
is there a ffmpeg executable in
node_modules/ffmpeg-static?@jojobii-arks commented on GitHub (Mar 30, 2023):
ffmpegbinary is innode_modules/ffmpeg-static.ffmpeginstalled locally throughapt, version7:4.4.2-0ubuntu0.22.04.1, if that causes any issues... When the runtime launches the child process, it still launches the binary provided by theffmpeg-staticmodule.cwd:
./node_modules/ffmpeg-static@jojobii-arks commented on GitHub (Apr 1, 2023):
@wukko could I ask what node version of Node you're running on https://co.wukko.me?
@jojobii-arks commented on GitHub (Apr 3, 2023):
More Research:
With
-reportflag, I attempted to download files that use the binarynode_modules/ffmpeg-static/ffmpegon both Windows and WSL. Audio Only +.mp3. Using the following video: https://www.youtube.com/watch?v=a6TRa36bymoUltimately, seems like an issue with
ffmpegin WSL being able to access the remote file over HTTPS in the first place... I'll update if I find anything else.Logs:
WSL
Windows
@jojobii-arks commented on GitHub (Apr 3, 2023):
Ahhh... it's a segfault with the binary 😭😭😭😭😭😭😭
@jojobii-arks commented on GitHub (Apr 3, 2023):
SOLVED IT
well, someone else solved it. I found the solution though: https://stackoverflow.com/questions/60528501/ffmpeg-segmentation-fault-with-network-stream-source
Turns out,
nscdneeds to be installed and running so that theffmpeg-staticbinary can resolve DNS.From
./node_modules/ffmpeg-static/ffmpeg.READMEin Ubuntu.Should the installation of this package be added to the setup script somehow? Or maybe a note saying that it should be installed and running?
@wukko commented on GitHub (Apr 6, 2023):
OHHHHH so that's why ffmpeg wouldn't download stuff on 22.04
does this mean that 20.04 comes with
ncsdbut 22.04 doesn't? how does that make any sense...thank you, i'll make sure to add a note about this somewhere (or maybe i should just move networking stuff away from ffmpeg) :D
@jojobii-arks commented on GitHub (Apr 6, 2023):
Between both manifests (Ubuntu 22.04.2 LTS and Ubuntu 20.04.6 LTS), doesn't seem like
nscdis present in either. 🤔I'll rename the issue as well to better reflect the issue 👍
@wukko commented on GitHub (May 8, 2023):
finally came around to updating the readme, thank you :D