Closed hossam14102010 closed 1 month ago
I'm getting the same error:
at FFmpeg.AutoGen.DynamicallyLoadedBindings.<>c.<Initialize>b__2_1244()
at FFmpeg.AutoGen.DynamicallyLoadedBindings.<>c.<Initialize>b__2_525()
at FFmpeg.AutoGen.ffmpeg.avdevice_register_all()
at SIPSorceryMedia.FFmpeg.FFmpegInit.SetFFmpegBinariesPath(String path)
at SIPSorceryMedia.FFmpeg.FFmpegInit.RegisterFFmpegBinaries(String libPath)
at SIPSorceryMedia.FFmpeg.FFmpegInit.Initialise(Nullable`1 logLevel, String libPath, ILogger appLogger)
at demo.Program.CreatePeerConnection(X509Certificate2 cert) in C:\src\sipsorcery\examples\WebRTCExamples\WebRTCTestPatternServer\Program.cs:line 132
at demo.Program.<>c__DisplayClass7_0.<Main>b__2() in C:\src\sipsorcery\examples\WebRTCExamples\WebRTCTestPatternServer\Program.cs:line 85
at SIPSorcery.Net.WebRTCWebSocketPeer.<OnOpen>d__19.MoveNext()
I was able to get it working with version 6.0. I haven't tried others yet
PS C:\Users\iguan> winget search --id Gyan.FFmpeg.Shared --versions
Found FFmpeg (Shared) [Gyan.FFmpeg.Shared]
Version
-------
7.0.1
7.0
6.1.1
6.1
6.0
5.1.2
same with sipsorcery-org/sipsorcery#1141 right.
Support for FFmpeg 7.x is not yet in sight, in the meantime use FFmpeg 6.x.
I have tried version 6.0 and 6.1 in a simple .NET console app:
using SIPSorceryMedia.FFmpeg;
FFmpegInit.Initialise();
and I am getting the same Exception
The problem was the PATH
environment variable has value that is set to C:\Users\{UserName}\AppData\Local\Microsoft\WinGet\Links
and this directory contains shortcut for FFmpeg.exe, although this works properly when I launch powershell in this directory and type ffmpeg, but this didn't work in the app. so I deleted the shortcuts in this directory and added another value to the PATH
environment variable to where the winget installed the package (C:\Users{UserName}\AppData\Local\Microsoft\WinGet\Packages\Gyan.FFmpeg.Shared_Microsoft.Winget.Source_8wekyb3d8bbwe\ffmpeg-6.0-full_build-shared\bin)
I have installed the bin using
winget install "FFmpeg (Shared)"
on Windows 11 22631.3810. it installs successfully but when runningFFmpegInit.Initialise()
I getSystem.NotSupportedException: 'Specified method is not supported.'
I have also tried setting the logLevel toFfmpegLogLevelEnum.AV_LOG_FATAL
, and I got the same exception. I tried to set the libPath toC:\Users\UserName\AppData\Local\Microsoft\WinGet\Packages\Gyan.FFmpeg.Shared_Microsoft.Winget.Source_8wekyb3d8bbwe\ffmpeg-7.0.1-full_build-shared\bin
and I got the same exeption