exelix11 / SysDVR

Stream switch games to your PC via USB or network
GNU General Public License v2.0
1.51k stars 90 forks source link

[Help] with Macbook 16inch 2021 #230

Closed nguyentungvna closed 1 year ago

nguyentungvna commented 1 year ago

[To submit a request fill all the parts of the template, then remove all the text within square brackets "[ ]" ] [Issues that don't follow the template will be closed] [Note that you can also ask for help on the discord server]

Where do you get stuck ? [when i'm using command dotnet /Users/admin/Downloads/SysDVR-Client\ 3/SysDVR-Client.dll usb ]

What's the error message you get ? [Full error message: System.DllNotFoundException: Unable to load DLL 'avcodec.59 under /opt/homebrew/lib/': The specified module could not be found. at FFmpeg.AutoGen.ffmpeg.LoadLibrary(String libraryName, Boolean throwException) at FFmpeg.AutoGen.ffmpeg.<>c.<.cctor>b__7_0(String libraryName) at FFmpeg.AutoGen.ffmpeg.<>c.<.cctor>b__7_18() at FFmpeg.AutoGen.ffmpeg.av_packet_alloc() at SysDVR.Client.Player.H264StreamTarget..ctor() at SysDVR.Client.Player.PlayerManager..ctor(Boolean HasVideo, Boolean HasAudio, Boolean hwAcc, String codecName, String quality) at SysDVR.Client.Program.HandleStreamingCommands() at SysDVR.Client.Program.ProgramMain() at SysDVR.Client.Program.Main(String[] args) ]

Setup information

Additional context Add any other context about the problem here.

exelix11 commented 1 year ago

Arn or Intel model ? Post the full message you see on the terminal.

nguyentungvna commented 1 year ago

I'm using ARM version

admin@tung-coi84 ~ % dotnet /Users/admin/Downloads/SysDVR-Client\ 3/SysDVR-Client.dll usb You're using the intel version of dotnet on an arm mac, this is not supported and will likely not work. Delete intel dotnet and install the native arm64 one. SysDVR-Client - SysDVR 5.5.5 by exelix https://github.com/exelix11/SysDVR

There was an error loading a dynamic library. Make sure you installed all the dependencies and that you have the correct version of the libraries. If all libraries are properly installed ensure their path is set in your dynamic loader environment variable (PATH on Windows, LD_LIBRARY_PATH on Linux and DYLD_LIBRARY_PATH on MacOS)

In case of problems specific to ffmpeg or libavcodec you can override the loader path by adding to the command line --libdir where is the folder containing the dyamic libraries of ffmpeg (or symlinks to them). For example on MacOS you can try --libdir $(brew --prefix)/lib/ If you're using an arm based mac make sure you're using native arm dotnet and not the intel one.

Full error message: System.DllNotFoundException: Unable to load DLL 'avcodec.59 under /opt/homebrew/lib/': The specified module could not be found. at FFmpeg.AutoGen.ffmpeg.LoadLibrary(String libraryName, Boolean throwException) at FFmpeg.AutoGen.ffmpeg.<>c.<.cctor>b__7_0(String libraryName) at FFmpeg.AutoGen.ffmpeg.<>c.<.cctor>b__7_18() at FFmpeg.AutoGen.ffmpeg.av_packet_alloc() at SysDVR.Client.Player.H264StreamTarget..ctor() at SysDVR.Client.Player.PlayerManager..ctor(Boolean HasVideo, Boolean HasAudio, Boolean hwAcc, String codecName, String quality) at SysDVR.Client.Program.HandleStreamingCommands() at SysDVR.Client.Program.ProgramMain() at SysDVR.Client.Program.Main(String[] args)

exelix11 commented 1 year ago

You're using the intel version of dotnet on an arm mac, this is not supported and will likely not work. Delete intel dotnet and install the native arm64 one.

The problem is written there, uninstall dotnet and install the native arm version from Microsoft's site

nguyentungvna commented 1 year ago

Even i deleted dotnet in /usr/local/share and install ARM64 on Microsoft website . Message still unchanged :(

exelix11 commented 1 year ago

I can't provide assistance with mac os, as long as you see that message it means sysdvr is running inside rosetta and that is not supported.

Properly uninstall dotnet or just as a workaround fix your path environment variable to point to the native one.

nguyentungvna commented 1 year ago

Thanks alot for your help

jayli3010 commented 1 year ago

I also met this problem in my m1 macbook air, could you solve it?

jayli3010 commented 1 year ago

I also met this problem in my m1 macbook air, could you solve it?

and I can ensure my dotnet is run in arm environment

/usr/local/share/dotnet/dotnet: Mach-O 64-bit executable arm64

c01dc0ffee commented 1 year ago

Run whereis libavcodec.so.59 and post the result. Should be like libavcodec.so: /opt/homebrew/lib/libavcodec.so.59

jayli3010 commented 1 year ago

whereis libavcodec.so.59

libavcodec.so.59: it's not exist

c01dc0ffee commented 1 year ago

Try what I wrote here: https://gist.github.com/c01dc0ffee/8acbd11bbd4b5c18ba4c5de288deb423

exelix11 commented 1 year ago

An update on this: there's a bug in architecture detection and will cause the message to be shown when it's not needed, will fix it later today. For the time being read the troubleshooting steps in the previous message

exelix11 commented 1 year ago

I updated the release build with the CI build from here this should fix the message being wrongly shown.

nguyentungvna commented 1 year ago

Try what I wrote here: https://gist.github.com/c01dc0ffee/8acbd11bbd4b5c18ba4c5de288deb423

admin@tung-coi84 ~ % find /opt/homebrew -name "libavcodec.*.dylib" /opt/homebrew/lib/libavcodec.60.3.100.dylib /opt/homebrew/lib/libavcodec.60.dylib /opt/homebrew/Cellar/ffmpeg/6.0/lib/libavcodec.60.3.100.dylib /opt/homebrew/Cellar/ffmpeg/6.0/lib/libavcodec.60.dylib /opt/homebrew/Cellar/ffmpeg@5/5.1.3/lib/libavcodec.59.37.100.dylib /opt/homebrew/Cellar/ffmpeg@5/5.1.3/lib/libavcodec.59.dylib

Hello there . Could you please show me what should i do next

c01dc0ffee commented 1 year ago

You need to add /opt/homebrew/Cellar/ffmpeg@5/5.1.3/lib to your PATH environment variable. Follow the link in the next step of the guide. Edit ~/.zshrc instead of ~/.bash_profile

The easy way to fix this is updated in the guide I posted previously. Copy libavcodec.59.* and libavutil.57.* into either /opt/homebrew/lib or /usr/local/lib depending on which folder displays in your error message.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 14 days since being marked as stale.