sipsorcery-org / SIPSorceryMedia.FFmpeg

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

.NET Framework support #20

Closed thomasmauerer closed 2 years ago

thomasmauerer commented 2 years ago

Hi,

the latest release 0.0.12-pre targets .NET Standard 2.1 and can therefore not be referenced in a .NET framework project. I saw that the target version has been changed to .NET Standard 2.0 in the meantime, so it should be compatible with the full framework.

Would it be possible to create a new release in order to support referencing this library in a framework project?

Thanks a lot for this amazing library and all its components.

sipsorcery commented 2 years ago

I had a few issues but a new package has been released as v0.0.18-pre.

Thank @ChristopheI for all the recent work and improvements!

thomasmauerer commented 2 years ago

Wow that was fast, thanks for the release. There were some issues in the nuspec file which I have corrected, see my PR #21

With those changes it can be referenced successfully in a framework project. However, for some reason the ffmpeg Dlls are not found, I always get a DllNotFoundException. The Dlls are present in the bin folder and the correct version of FFmpeg.AutoGen is referenced.

Don't know what's causing this. I now changed to NetCore3.1 and here everything works as expected.

ChristopheI commented 2 years ago

You need to use this method to specify the folder where FFmpeg libraries/binaries are stored.

For example: SIPSorceryMedia.FFmpeg.FFmpegInit.Initialise(SIPSorceryMedia.FFmpeg.FfmpegLogLevelEnum.AV_LOG_VERBOSE, Environment.CurrentDirectory);

ChristopheI commented 2 years ago

I will close the issue, as it seems solved. Feel free to ask any other question, or reopen issue.