GithubHelp home page GithubHelp logo

Unable to find encoder about sunshine HOT 21 CLOSED

lizardbyte avatar lizardbyte commented on May 22, 2024
Unable to find encoder

from sunshine.

Comments (21)

cyl3x avatar cyl3x commented on May 22, 2024 5

I fixed my issue by adding -DLIBSWSCALE_INCLUDE_DIR=/usr/include/ffmpeg4.4 -DLIBSWSCALE_LIBRARIES=/usr/lib/ffmpeg4.4/libswscale.so as CMAKE Flags in the PKGBUILD from AUR

from sunshine.

emmyoh avatar emmyoh commented on May 22, 2024

Perhaps this is related to the FFmpeg 5.0 release? The Arch Linux package ffmpeg4.4 was used to build Sunshine on my system, so the recent 5.0 release is not the cause.
How may I help with debugging this?

from sunshine.

Theslees avatar Theslees commented on May 22, 2024

I'm also having this issue, same OS and terminal output, but using a different GPU. (AMD)

from sunshine.

cyl3x avatar cyl3x commented on May 22, 2024

same issue here, Arch and NVIDIA Card

from sunshine.

ReenigneArcher avatar ReenigneArcher commented on May 22, 2024

@hadogenes any thoughts?

from sunshine.

JPenuchot avatar JPenuchot commented on May 22, 2024

Same issue, same config. I switched to this fork because of an AUR update and now I can't get Sunshine to run. However I tried building the package at its last version targeting the original repo and I still run into this problem, so it might not be a regression. I'm also seeing CMake not detecting any CUDA compiler despite CUDA_HOME and CUDA_PATH both being set to /opt/cuda, so I'm suspecting a build system issue to be the root cause.

PS: CUDA compiler not being detected happens on both the original repo and this fork. I guess it's worth fixing this repo as it's more reactive to PRs and already being tracked by the AUR package.

from sunshine.

JPenuchot avatar JPenuchot commented on May 22, 2024

Update: The CMake script actually finds the CUDA install present on my system, although not when being called through makepkg when building the AUR package. Not sure the lack of a CUDA compiler is what's causing the error, but maybe what's causing CMake to not find nvcc could also be causing it to not find an essential library.

from sunshine.

JPenuchot avatar JPenuchot commented on May 22, 2024

After a bit of debugging it turns out the issue happens here:
https://github.com/SunshineStream/Sunshine/blob/4a483078ad983b159d349e8056fccf61d918dc74/sunshine/video.cpp#L740

Both this fork and the original repo are impacted.

from sunshine.

JPenuchot avatar JPenuchot commented on May 22, 2024

Another note: I don't get this issue on my laptop with Intel integrated graphics. It's possible that it was caused by a libdrm or Nvidia update too.

from sunshine.

emmyoh avatar emmyoh commented on May 22, 2024

OK … so it's not a regression introduced from the fork (so is not due to a code change), is not unique to Nvidia, but may possibly still be connected to something with Arch Linux? I'm quite lost as to what the cause could be. I had the pre-fork version of Sunshine installed an hour before opening this issue, and my system was 100% up-to-date at the time, so the only updates that could've possibly affected things is anything statically-linked to the compiled binary. The fact that it works on Intel is interesting.

from sunshine.

ReenigneArcher avatar ReenigneArcher commented on May 22, 2024

The AUR was recently updated and there were changes in the build besides pointing to this repo. There were 3 commits a few days ago https://aur.archlinux.org/cgit/aur.git/log/?h=sunshine

from sunshine.

JPenuchot avatar JPenuchot commented on May 22, 2024

OK … so it's not a regression introduced from the fork (so is not due to a code change), is not unique to Nvidia, but may possibly still be connected to something with Arch Linux? I'm quite lost as to what the cause could be. I had the pre-fork version of Sunshine installed an hour before opening this issue, and my system was 100% up-to-date at the time, so the only updates that could've possibly affected things is anything statically-linked to the compiled binary.

The issue points to avcodec, and it is statically linked indeed. I'll have a look at their bug tracker to find out if there's been any sort of regression.

The fact that it works on Intel is interesting.

Not 100% sure but as far as I know my 6300U doesn't have any hardware encoder

from sunshine.

JPenuchot avatar JPenuchot commented on May 22, 2024

And there it is: https://trac.ffmpeg.org/ticket/9666

from sunshine.

JPenuchot avatar JPenuchot commented on May 22, 2024

Sorry I just found out I forgot to build Sunshine with ffmpeg 4.4, so I just polluted this issue with something that's already been solved here: #63

I've added the CMake flags to link against ffmpeg 4.4 and I'm back to the Couldn't expose some/all drm planes for card: /dev/dri/card0 error

from sunshine.

pogojotz avatar pogojotz commented on May 22, 2024

I can confirm that @cyl3x's solution works. Cheers for that 🍻

from sunshine.

JPenuchot avatar JPenuchot commented on May 22, 2024

Back to business indeed. Thanks a lot :)

from sunshine.

pogojotz avatar pogojotz commented on May 22, 2024

This has been resolved in the AUR. Can be closed.

from sunshine.

mdeguzis avatar mdeguzis commented on May 22, 2024

In my case, I needed to make sure I set the DISPLAY in the systemd unit file. I noticed things would run fine if I didn't launch the app image via systemd

[gamer@chimeraos tmp]$ cat ~/.config/systemd/user/sunshine.service 
[Unit]
Description=Sunshine self-hosted game stream host for Moonlight.
StartLimitIntervalSec=500
StartLimitBurst=5

[Service]
ExecStart=%h/software/sunshine.AppImage
Restart=on-failure
RestartSec=5s
Environment=DISPLAY=chimeraos:10.0
#Flatpak Only
#ExecStop=flatpak kill dev.lizardbyte.sunshine

[Install]
WantedBy=graphical-session.target

from sunshine.

VRKade11 avatar VRKade11 commented on May 22, 2024

do you mind if you elaborate on the solution a little bit I have the code but I don't know where to put it

from sunshine.

ReenigneArcher avatar ReenigneArcher commented on May 22, 2024

@VRKade11 you need to set the DISPLAY environment variable

from sunshine.

VRKade11 avatar VRKade11 commented on May 22, 2024

Well I figured it out it was the output name and adapter name needed to be blank or I messed something up with the name

from sunshine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.