sipsorcery-org / SIPSorceryMedia.FFmpeg

GNU Lesser General Public License v2.1
31 stars 24 forks source link

Initialize: Method not supported #70

Closed Gartarr closed 5 months ago

Gartarr commented 5 months ago

When I try to initialize FFmpeg i get the following error:

System.NotSupportedException
  HResult=0x80131515
  Message=Specified method is not supported.
  Source=FFmpeg.AutoGen
  StackTrace:
   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 Frodo.Services.JanusClasses.RTCSession..ctor(Int32 missionId) in C:\FrodoNet\Services\WebRTC\RTCSession.cs:line 21
   at Frodo.Services.JanusClasses.JanusSession.<OnOfferReceived>d__47.MoveNext() in 
ChristopheI commented 5 months ago

You have to use FFmpeg 6 binaries - see https://github.com/sipsorcery-org/SIPSorceryMedia.FFmpeg/commit/5b2dbe2dabef1131f214632346bde2ada9f8e229

maaft commented 3 months ago

I use ffmpeg 6.1 on ubuntu and still have the same isssue.

static void Main()
{
   FFmpegInit.Initialise(FfmpegLogLevelEnum.AV_LOG_FATAL, "/usr/bin/");
}
ffmpeg version 6.1-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
Unhandled exception. System.NotSupportedException: Specified method is not supported.
   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.Main() in /home/mawe/Downloads/WebRTCExamples/WebRTCGetStarted.Testing/Program.cs:line 46

EDIT:

Also with "shared" version of ffmpeg its not working:

ffmpeg version 6.1-1build2~22.04 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
Unhandled exception. System.NotSupportedException: Specified method is not supported.
   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.Main() in /home/mawe/Downloads/WebRTCExamples/WebRTCGetStarted.Testing/Program.cs:line 46