real-zony/ZonyLrcToolsX

mac os 12.6 下载歌词提示这个错误怎么办

zlfengshare opened this issue · 4 comments

下载的是这个版本 :ZonyLrcTools_osx-x64_2022092248.zip

./ZonyLrcTools.Cli download -d "/Users/kunka/Music/我的音乐" -l -n 2

[14:18:58 INF] 已经扫描到了 134 个音乐文件。
[14:18:59 INF] 开始加载音乐文件的标签信息...
[14:18:59 ERR] 出现了未处理的异常: Unable to load shared library 'mfplat.dll' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(libmfplat.dll, 0x0001): tried: 'libmfplat.dll' (no such file), '/usr/local/lib/libmfplat.dll' (no such file), '/usr/lib/libmfplat.dll' (no such file), '/Users/kunka/Downloads/ZonyLrcTools_osx-x64_2022092248/libmfplat.dll' (no such file)
调用栈:
at NAudio.MediaFoundation.MediaFoundationInterop.MFStartup(Int32 version, Int32 dwFlags)
at NAudio.MediaFoundation.MediaFoundationApi.Startup()
at NAudio.Wave.MediaFoundationReader.Init(MediaFoundationReaderSettings initialSettings)
at NAudio.Wave.MediaFoundationReader..ctor(String file, MediaFoundationReaderSettings settings)
at NAudio.Wave.MediaFoundationReader..ctor(String file)
at NAudio.Wave.AudioFileReader.CreateReaderStream(String fileName)
at NAudio.Wave.AudioFileReader..ctor(String fileName)
at ZonyLrcTools.Cli.Commands.SubCommand.DownloadCommand.<>c.b__30_1(MusicInfo m) in /home/runner/work/ZonyLrcToolsX/ZonyLrcToolsX/src/ZonyLrcTools.Cli/Commands/SubCommand/DownloadCommand.cs:line 140
at ZonyLrcTools.Cli.Infrastructure.Extensions.LinqHelper.Foreach[T](IEnumerable1 items, Action1 action) in /home/runner/work/ZonyLrcToolsX/ZonyLrcToolsX/src/ZonyLrcTools.Cli/Infrastructure/Extensions/LinqHelper.cs:line 20
at ZonyLrcTools.Cli.Commands.SubCommand.DownloadCommand.LoadMusicInfoAsync(IReadOnlyCollection1 files) in /home/runner/work/ZonyLrcToolsX/ZonyLrcToolsX/src/ZonyLrcTools.Cli/Commands/SubCommand/DownloadCommand.cs:line 140 at ZonyLrcTools.Cli.Commands.SubCommand.DownloadCommand.OnExecuteAsync(CommandLineApplication app) in /home/runner/work/ZonyLrcToolsX/ZonyLrcToolsX/src/ZonyLrcTools.Cli/Commands/SubCommand/DownloadCommand.cs:line 74 at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.InvokeAsync(MethodInfo method, Object instance, Object[] arguments) at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.OnExecute(ConventionContext context, CancellationToken cancellationToken) at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.<>c__DisplayClass0_0.<<Apply>b__0>d.MoveNext() --- End of stack trace from previous location --- at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync(String[] args, CancellationToken cancellationToken) at McMaster.Extensions.Hosting.CommandLine.Internal.CommandLineService1.RunAsync(CancellationToken cancellationToken)
at McMaster.Extensions.Hosting.CommandLine.Internal.CommandLineLifetime.<>c__DisplayClass10_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.Extensions.Hosting.HostExtensions.RunCommandLineApplicationAsync(IHost host, CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.HostBuilderExtensions.RunCommandLineApplicationAsync[TApp](IHostBuilder hostBuilder, String[] args, Action`1 configure, CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.HostBuilderExtensions.RunCommandLineApplicationAsync[TApp](IHostBuilder hostBuilder, String[] args, CancellationToken cancellationToken)
at ZonyLrcTools.Cli.Program.Main(String[] args) in /home/runner/work/ZonyLrcToolsX/ZonyLrcToolsX/src/ZonyLrcTools.Cli/Program.cs:line 34

看起来是一个已知 BUG,在最新版本中使用了 NAudio 来获取媒体文件时长,请考虑使用老版本或者虚拟机使用 windows 版本进行下载,下个版本会修复该问题。
详情: naudio/NAudio#516

WIN10 也出现了类似的问题:

调用栈:
   at NAudio.MediaFoundation.MediaFoundationInterop.MFCreateSourceReaderFromURL(String pwszURL, IMFAttributes pAttributes, IMFSourceReader& ppSourceReader)
   at NAudio.Wave.MediaFoundationReader.CreateReader(MediaFoundationReaderSettings settings)
   at NAudio.Wave.MediaFoundationReader.Init(MediaFoundationReaderSettings initialSettings)
   at NAudio.Wave.MediaFoundationReader..ctor(String file, MediaFoundationReaderSettings settings)
   at NAudio.Wave.MediaFoundationReader..ctor(String file)
   at NAudio.Wave.AudioFileReader.CreateReaderStream(String fileName)
   at NAudio.Wave.AudioFileReader..ctor(String fileName)
   at ZonyLrcTools.Cli.Commands.SubCommand.DownloadCommand.<>c.<LoadMusicInfoAsync>b__30_1(MusicInfo m) in /home/runner/work/ZonyLrcToolsX/ZonyLrcToolsX/src/ZonyLrcTools.Cli/Commands/SubCommand/DownloadCommand.cs:line 140
   at ZonyLrcTools.Cli.Infrastructure.Extensions.LinqHelper.Foreach[T](IEnumerable`1 items, Action`1 action) in /home/runner/work/ZonyLrcToolsX/ZonyLrcToolsX/src/ZonyLrcTools.Cli/Infrastructure/Extensions/LinqHelper.cs:line 20
   at ZonyLrcTools.Cli.Commands.SubCommand.DownloadCommand.LoadMusicInfoAsync(IReadOnlyCollection`1 files) in /home/runner/work/ZonyLrcToolsX/ZonyLrcToolsX/src/ZonyLrcTools.Cli/Commands/SubCommand/DownloadCommand.cs:line 140
   at ZonyLrcTools.Cli.Commands.SubCommand.DownloadCommand.OnExecuteAsync(CommandLineApplication app) in /home/runner/work/ZonyLrcToolsX/ZonyLrcToolsX/src/ZonyLrcTools.Cli/Commands/SubCommand/DownloadCommand.cs:line 74
   at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.InvokeAsync(MethodInfo method, Object instance, Object[] arguments)
   at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.OnExecute(ConventionContext context, CancellationToken cancellationToken)
   at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.<>c__DisplayClass0_0.<<Apply>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync(String[] args, CancellationToken cancellationToken)
   at McMaster.Extensions.

@jexjws 有问题歌曲的文件么?

@zlfengshare @jexjws 修复版本已经发布,请到 Release 重新下载。