sipsorcery-org / SIPSorceryMedia.FFmpeg

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

System.NotSupportedException: Specified method is not supported. Since 5b2dbe2dabef1131f214632346bde2ada9f8e229 #63

Open Todilo opened 1 year ago

Todilo commented 1 year ago

Prior to the update of the ffmpeg version 6 no errors but now this code breaks with error System.NotSupportedException: Specified method is not supported

ffmpeg.av_hwdevice_iterate_types(type))

System.NotSupportedException: Specified method is not supported. at FFmpeg.AutoGen.DynamicallyLoadedBindings.<>c.<Initialize>b__2_953(AVHWDeviceType <p0>) at FFmpeg.AutoGen.DynamicallyLoadedBindings.<>c.<Initialize>b__2_243(AVHWDeviceType prev) at FFmpeg.AutoGen.ffmpeg.av_hwdevice_iterate_types(AVHWDeviceType prev)

I have installed latest ffmpeg ffmpeg version 6.0-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers built with gcc 12.2.0 (Rev10, Built by MSYS2 project)

Runnning on windows 11.

Gartarr commented 8 months ago

I have the same issue.

sipsorcery commented 8 months ago

Most likely means your ffmpeg binaries cannot be found. Try installing with the command below:

winget install "FFmpeg (Shared)"

After that you can pass an empty string to the initialise method:

SIPSorceryMedia.FFmpeg.FFmpegInit.Initialise(SIPSorceryMedia.FFmpeg.FfmpegLogLevelEnum.AV_LOG_VERBOSE, string.Empty, logger);

ChristopheI commented 8 months ago

You need to use the "ffmpeg full build shared" versions. Available here for windows: https://github.com/GyanD/codexffmpeg/releases/tag/6.0