wudicgi / SpleeterMsvcExe

Windows command line program for Spleeter, pure C, no Python. GUI: https://github.com/wudicgi/SpleeterGui | Spleeter 的 Windows 命令行程序,纯 C 语言编写,无需 Python.
MIT License
213 stars 33 forks source link

你好,博主,感谢你提供这样的工具。不过,我在使用时报错了,能看下吗? #6

Closed nottellyou closed 1 year ago

nottellyou commented 1 year ago

你好,博主,感谢你提供这样的工具。不过,我在使用时报错了,能看下吗?

E:\AI\SpleeterMsvcExe-v1
λ Spleeter.exe test.mp3
Input file:
test.mp3

Output files:
test.vocals.mp3
test.accompaniment.mp3

[  0.00%] Reading audio samples, 0/3359232
[  1.00%] Reading audio samples, 1679663/3359232
[  2.00%] Reading audio samples, 3358127/3358127
[  2.00%] Loading spleeter model, 0/1
2023-05-23 14:53:19.715000: I tensorflow/cc/saved_model/reader.cc:31] Reading SavedModel from: E:\AI\SpleeterMsvcExe-v1\models\2stems
2023-05-23 14:53:19.740000: I tensorflow/cc/saved_model/reader.cc:54] Reading meta graph with tags { serve }
2023-05-23 14:53:19.763000: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
2023-05-23 14:53:19.838000: I tensorflow/cc/saved_model/loader.cc:202] Restoring SavedModel bundle.
2023-05-23 14:53:20.184000: I tensorflow/cc/saved_model/loader.cc:151] Running initialization op on SavedModel bundle at path: E:\AI\SpleeterMsvcExe-v1\models\2stems
2023-05-23 14:53:20.267000: I tensorflow/cc/saved_model/loader.cc:311] SavedModel load for tags { serve }; Status: success. Took 551000 microseconds.
[  5.00%] Loading spleeter model, 1/1
[ 38.49%] Processing segment, 1323000/3358127
[ 71.97%] Processing segment, 2646000/3358127
[ 90.00%] Processing segment, 3358127/3358127
[mp3_mf @ 000000000056eb80] could not find any MFT for the given media type
[mp3_mf @ 000000000056eb80] could not create MFT
Error: Failed to write output file "test.vocals.mp3".

E:\AI\SpleeterMsvcExe-v1
λ

我是在cmder命令行下运行的。 请问博主,该如何解决此错误?

nottellyou commented 1 year ago

测试音频:http://test.apptj.net/tmpimg/test.rar

wudicgi commented 1 year ago

你好,我查了一下,应该是 ffmpeg 的 avcodec_find_encoder() 查找 encoder 时的优先级问题 https://superuser.com/questions/1592352/mft-not-found-when-changing-tempo-of-mp3

2021 年发布的 v1.0 版本用的 ffmpeg 还是 4.3 版本的, 在同样一个 Win10 系统中,这个版本对于 AV_CODEC_ID_MP3 会返回 mp3_mf 这个 encoder, 而本项目 develop 分支中目前使用 ffmpeg 6.0 的版本会返回 libmp3lame

我也试了下本项目 develop 分支在 2021 年 10 月时将 ffmpeg 库升级到 4.4 版本后的提交 (https://github.com/wudicgi/SpleeterMsvcExe/commit/67f8fd9d53bd194a93a359e81529768b64e6837d), 也是会返回 libmp3lame

大概率就是 4.3 版本的 ffmpeg, 或 ffmpeg.zeranoe.com 版本二进制文件的编译参数里存在问题 (4.4 版本开始直到现在用的都是 https://github.com/BtbN/FFmpeg-Builds 的二进制文件了)

wudicgi commented 1 year ago

这个项目最近马上要发 2.0 的版本了,还会一同发布一个图形界面的 SpleeterGui 项目

如果你急用可以把这个项目 clone 下来,用 https://github.com/wudicgi/SpleeterMsvcExe/commit/67f8fd9d53bd194a93a359e81529768b64e6837d 这个提交的版本中 third_party\ffmpeg-win64\dll 里的 dll 覆盖 release 版本中的

nottellyou commented 1 year ago

我只是觉得有意思,测试了一下,期待2.0版本