sipsorcery-org / SIPSorceryMedia.FFmpeg

GNU Lesser General Public License v2.1
34 stars 26 forks source link

FFmpeg in MacOS #43

Open mail2mhossain opened 2 years ago

mail2mhossain commented 2 years ago

I have installed brew install ffmpeg and brew install mono-libgdiplus both.

But getting following error:

System.DllNotFoundException: Unable to load DLL avutil.56 - The specified module could not be found.

How to find following libraries for MacOS:

libavcodec libavformat libavutil libavfilter libavdevice libswresample libswscale

It will be very helpful if you provide these like Windows OS.

mail2mhossain commented 2 years ago

I have set the path /opt/homebrew/Cellar/ffmpeg@4/4.4.2_3/lib where libavdevice.58.dylib and others are present. But still getting error: Unhandled Exception Occured. System.DllNotFoundException: Unable to load DLL 'avdevice.58 under /opt/homebrew/Cellar/ffmpeg@4/4.4.2_3/lib': The specified module could not be found.

I have renamed the file from "libavdevice.58.dylib" to "avdevice.58.dylib" OR "avdevice.58". BUT STILL GETTING SAME ERROR.

mail2mhossain commented 2 years ago

Is this a version issue? If so, pls let me know which version to use OR your testing version.

ChristopheI commented 2 years ago

You have to install the developer version of ffmpeg. then using command line "ffmpeg -version" you should see the "libdir" parameter

See screenshot: image (9)

mail2mhossain commented 2 years ago

So, for Linux and Mac in both case I have to install developer version 4.2.4 of ffmpeg, right?

Would you please provide the download link.

brew install ffmpeg@4 is not working too. How could I install dev version of ffmpeg (brew install ffmpeg@4 )

mail2mhossain commented 2 years ago

Any help in this regards ( developer version of ffmpeg for MacOS)?

Dylan-DutchAndBold commented 1 year ago

Got a working solution for MacOS here.

  1. Download the ffmpeg@4 version

    brew install ffmpeg@4
  2. Configure to use the lib directory under the ffmpeg4 installation location

    FFmpegInit.Initialise(libPath: "/usr/local/Cellar/ffmpeg@4/4.4.3_4/lib");
mail2mhossain commented 1 year ago

Thank you very much for your solution. I'll try with it.

BTW: have you use SIPSorceryMedia.Abstractions.RawImage in MAC?