.netcore 6 console app on mac - "Specified method is not supported"
See original GitHub issueWhen compiling the example found for fingerprinting video, an exception “Specified method is not supported” is thrown.
To Reproduce
public class Playground
{
// save fingerprints in Emy Community Edition https://hub.docker.com/repository/docker/addictedcs/soundfingerprinting.emy
private readonly IModelService modelService = EmyModelService.NewInstance("localhost", 3399);
//private readonly IModelService modelService = new InMemoryModelService();
// use FFmpeg to extract samples and frames from files: https://github.com/AddictedCS/soundfingerprinting/wiki/Audio-Services
private readonly IMediaService mediaService = new FFmpegAudioService();
public async Task AddClip(string location)
{
Console.WriteLine("Add Clip " +location);
var avHashes = await FingerprintCommandBuilder.Instance
.BuildFingerprintCommand()
.From(location, MediaType.Video)
.UsingServices(mediaService)
.Hash();
Console.WriteLine("added, create track");
var track = new TrackInfo("1234", "BWM", "", MediaType.Video);
Console.WriteLine("track has been created, now to insert it");
modelService.Insert(track, avHashes);
Console.WriteLine("Track has been inserted into model");
}
}
Program.cs
Playground playground = new Playground();
await playground.AddClip("file.mp4");
Exception is thrown on the " var avHashes = await FingerprintCommandBuilder.Instance…" line.
Exception
System.NotSupportedException: "Specified method is not supported."
at FFmpeg.AutoGen.Bindings.DynamicallyLoaded.DynamicallyLoadedBindings.<>c.<Initialize>b__6_1428()\n at SoundFingerprinting.Emy.FFmpeg.Demuxer.OpenInputFile(String file)\n at SoundFingerprinting.Emy.FFmpeg.Demuxer..ctor(String file, MediaType mediaType, CancellationToken cancellationToken)\n at SoundFingerprinting.Emy.AudioVideo.Data.FFmpegDataService.<ReadAVTrack>d__4.MoveNext()\n at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)\n at SoundFingerprinting.Emy.AudioVideo.Data.FFmpegDataService.ReadTrack(String file, MediaType mediaType, Double seconds, AVTrackReadConfiguration configuration)\n at SoundFingerprinting.Emy.FFmpegAudioService.ReadFramesFromFile(String pathToFile, VideoTrackReadConfiguration configuration, Double seconds, Double startsAt)\n at SoundFingerprinting.Command.FingerprintCommand.<>c__DisplayClass13_0.<From>b__0()\n at System.Threading.Tasks.Task`1.InnerInvoke()\n at System.Threading.Tasks.Task.<>c.<.cctor>b__272_0(Object obj)\n at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)\n--- End of stack trace from previous location ---\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\n at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)\n at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)\n--- End of stack trace from previous location ---\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\n at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\n at Newsfinder.Playground.<AddClip>d__3.MoveNext() in Playground.cs:line 35\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\n at System.Runtime.CompilerServices.TaskAwaiter.GetResult()\n at Program.<<Main>$>d__0.MoveNext() in Program.cs:47
I have the community edition of Envy running in docker, but I also tried InMemoryModelService instead and have the same issue.
Thanks 😃
Issue Analytics
- State:
- Created 9 months ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Running a .NET 5 project on macOS M1 with .NET 6 leads ...
I would expect to see a better error message, either indicating that .NET 5 is not installed, or that an available SDK/runtime is...
Read more >Create signed and notified MacOS installer for .net core ...
The problem is straightforward: I have a console app written in .Net Core 3.1, which I would like to distribute to MacOS, among...
Read more >C# console app template generates top-level statements
The .NET 6+ project template for C# console apps uses top-level statements. Understand what changed and how to use existing learning ...
Read more >Cannot debug net6.0-macos Apps - Developer Community
When I hit debug, the following error is shown in the Terminal: Possible reasons for this include: * You misspelled a built-in dotnet...
Read more >How to Build Cross-Platform .NET Core Apps
Running the app on Windows and macOS. So now, we have two . NET Core console applications; one framework-dependent and one self-contained. Let' ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Unfortunately, brew does not link the contents of
/usr/local/opt/ffmpeg@4/lib/
to/usr/local/lib
, as it considers it to be just a keg (whatever that means, installing older versions does not link it automatically), so you can either link it manually, or wait until I add a probe path to v8.18.0. The following command will link FFmpeg libraries to/usr/local/lib
such that they are available in the executable probingsame thing happened to me on a fedora system. Luckily I was using Docker anyway and could switch over to a ubuntu image