Open ghost opened 2 years ago
Sounds like it could be a ABI compatability issue. If your C runtime is different to the one I built the dll with you can get these sort of problems.
Before going down that path below do a search of the issues. I do recall seeing this come up previously. Maybe that will provide an easier solution.
You can build a verion of the vpxmd.dll
that matched your system using the instructions here.
Hi, I'm facing similar issue. Tried executing mentioned steps. But while executing below cmd for generating 32 bit vpxmd.dll '../configure --disable-static --disable-examples --disable-tools --disable-docs --target=x86-win32-vs16' getting exception as 'configure' is not recognized as an internal or external command'. For that tried setting up MSYS, but getting 'SSL certificate problem: unable to get local issuer certificate' even after adding ssl certificate. Any step I'm missing while execution? Any pointer would help. Thanks
Try using WSL, it's way better than msys or cygwin.
Hi,
Thank you for your Solution , In WSL "./configure --disable-static --disable-examples --disable-tools --disable-docs --target=x86-win32-vs17'" executed Successfully. vpx.sln is also generated. By following other steps I build 32 bit vpxmd.dll in Visual Studio 19. when I used 32 bit vpxmd.dll I got below exception .
Unhandled Exception: System.ApplicationException: Failed to initialise VP8 encoder, ABI version mismatch. at SIPSorceryMedia.Encoders.Codecs.Vp8Codec.InitialiseEncoder(UInt32 width, UInt32 height) at SIPSorceryMedia.Encoders.VpxVideoEncoder.EncodeVideo(Int32 width, Int32 height, Byte[] sample, VideoPixelFormatsEnum pixelFormat, VideoCodecsEnum codec) at SIPSorceryMedia.Encoders.VideoEncoderEndPoint.ExternalVideoSourceRawSample(UInt32 durationMilliseconds, Int32 width, Int32 height, Byte[] sample, VideoPixelFormatsEnum pixelFormat)
From SIPSorceryMedia.Encoders got to know that VPX_ENCODER_ABI_VERSION = 23 can you please suggest me in which Visual studio version should I use to build vpxmd.dll so that I will not get ABI mismatch exception. or Any step I'm missing while execution? Any pointer would help.
Thanks
I would have built the nuget package with Visual Studio 2019 and probably C++ SDK version v1.41.
You don't need to use my verison though. If you can build vpxmd.dll then you can rebuild the .NET SIPSorceryMediaEncoders assembly using it. That way you can guarantee that all the relevant dll's are using the same SDK version.
According to this article, since Visual Studio 2015 ABI has been preserved. If you install the latest Microsoft C++ runtime you should be able to run an app, or consume a library built with any version of the msvc toolset sicne VS 2015.
I'm not completely convinced by the above article though. I regularly build another C++ prioject that uses a bunch of vcpkg dependencies. It's happended quite a few times that an updte to Visual Studio results in an ABI issue with one of the dependencies requiring them all o be rebuilt.
This scenario is the biggest pain point with C++. Rebuilding complete dependency tress is not fun. It's why .NET is so great, that whole category of problems go away. For libvpx the hope is that one day VP8.Net will be production ready and vpxmd.dll will no longer be required.
Hi, sorry to bother you again
I have followed the approach you mentioned, but still facing same exception, can you please share VS build version details which is being used for building sipsorcery dll and related other dlls.
Thanks
Visual Studio 2019 Community Edition
My linker at the time I built the dll's using in the SIPSorceryMedia.Encoder nuget package was: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\HostX86\x86\link.exe
What is the platform toolset used in VS 2019. I still get Unhandled Exception: System.ApplicationException: Failed to initialise VP8 encoder, ABI version mismatch. at SIPSorceryMedia.Encoders.Codecs.Vp8Codec.InitialiseEncoder(UInt32 width, UInt32 height) in ..\SIPSorceryMedia.Encoders-master\src\codecs\Vp8Codec.cs:line 107
Visual Studio 2019 is used with WSL. Thank you for the support
I run into this issue also, anyone can help? i have build vpxmd.dll using the instructions here. Do i need to regen the "vpxmd.g.cs"? i follow the "Vpx.AutoGen" project but failed, only get he empty "Std.cs" file...
Hi Experts,
I am using SIPSorceryMedia.Encoder for streaming image frames as video and facing following problem.
Any pointer would help.
regards, Suresh