Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]使用amr时显示当前状态不支持音频 #14

Closed
WNCX opened this issue Jan 1, 2021 · 10 comments
Closed

[BUG]使用amr时显示当前状态不支持音频 #14

WNCX opened this issue Jan 1, 2021 · 10 comments

Comments

@WNCX
Copy link

WNCX commented Jan 1, 2021

描述bug问题

就跟题目一样

如何重现

就是普通输入#点歌 网易 AMR hello

你希望的修复后结果

能够正常使用,输出相关信息

截屏/报错信息

2021-01-01 21:39:55 W/stderr: java.io.FileNotFoundException: .\temp\wv1609508394741.amr (系统找不到指定的文件。) 2021-01-01 21:39:55 W/stderr: at java.io.FileInputStream.open0(Native Method) 2021-01-01 21:39:55 W/stderr: at java.io.FileInputStream.open(Unknown Source) 2021-01-01 21:39:55 W/stderr: at java.io.FileInputStream.<init>(Unknown Source) 2021-01-01 21:39:55 W/stderr: at com.khjxiaogu.MiraiSongPlugin.cardprovider.AmrVoiceProvider.process(AmrVoiceProvider.java:71) 2021-01-01 21:39:55 W/stderr: at com.khjxiaogu.MiraiSongPlugin.MiraiSongPlugin.lambda$onEnable$4(MiraiSongPlugin.java:230) 2021-01-01 21:39:55 W/stderr: at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) 2021-01-01 21:39:55 W/stderr: at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 2021-01-01 21:39:55 W/stderr: at java.lang.Thread.run(Unknown Source)

@WNCX
Copy link
Author

WNCX commented Jan 1, 2021

补充:已经使用提供的三个文件并置于mirai项目同目录下

@khjxiaogu
Copy link
Owner

请把配置文件中的ffmpeg路径设置为绝对路径。

@WNCX
Copy link
Author

WNCX commented Jan 6, 2021

请把配置文件中的ffmpeg路径设置为绝对路径。

已经照做了,但输出仍然是
2021-01-06 23:02:58 W/stderr: java.io.FileNotFoundException: .\temp\wv1609945376495.amr (系统找不到指定的文件。) 2021-01-06 23:02:58 W/stderr: at java.io.FileInputStream.open0(Native Method) 2021-01-06 23:02:58 W/stderr: at java.io.FileInputStream.open(Unknown Source) 2021-01-06 23:02:58 W/stderr: at java.io.FileInputStream.<init>(Unknown Source) 2021-01-06 23:02:58 W/stderr: at com.khjxiaogu.MiraiSongPlugin.cardprovider.AmrVoiceProvider.process(AmrVoiceProvider.java:71) 2021-01-06 23:02:58 W/stderr: at com.khjxiaogu.MiraiSongPlugin.MiraiSongPlugin.lambda$onEnable$4(MiraiSongPlugin.java:230) 2021-01-06 23:02:58 W/stderr: at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) 2021-01-06 23:02:58 W/stderr: at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 2021-01-06 23:02:58 W/stderr: at java.lang.Thread.run(Unknown Source)
配置文件是这样写的

ffmpeg_path: "D:\Program Files(Non-inst)\mirairobot\old-mirai-console-launcher\ffmpeg.exe"
silkenc_path: "silk_v3_encoder.exe"
adddefault: true
amrqualityshift: false
amrwb: false
extracommands:
"#分享":
source: all
card: Share

"#搜歌":
source: 网易
card: XML

@khjxiaogu
Copy link
Owner

mirai目录下是否有一个名为temp的文件夹?

@khjxiaogu
Copy link
Owner

khjxiaogu commented Jan 7, 2021

请把路径配置改为:"D:\\Program Files(Non-inst)\\mirairobot\\old-mirai-console-launcher\\ffmpeg.exe"再试试

@WNCX
Copy link
Author

WNCX commented Jan 8, 2021

请把路径配置改为:"D:\Program Files(Non-inst)\mirairobot\old-mirai-console-launcher\ffmpeg.exe"再试试

可能是github的转义导致“\\”显示成了\,我在一开始的时候就是写"\\"的
另外mirai目录下的确有temp的文件夹,但并没有错误里所说的amr文件

@khjxiaogu
Copy link
Owner

khjxiaogu commented Jan 9, 2021

有可能是ffmpeg安装问题,请准备一个音频文件并打开命令行输入
"D:\\Program Files(Non-inst)\\mirairobot\\old-mirai-console-launcher\\ffmpeg.exe"-i 输入音频文件路径 -ab 12.2k -ar 8000 -ac 1 -fs 1000000 -y test.amr并把命令行输出发上来

@khjxiaogu khjxiaogu reopened this Jan 9, 2021
@WNCX
Copy link
Author

WNCX commented Jan 10, 2021

有可能是ffmpeg安装问题,请准备一个音频文件并打开命令行输入
"D:\\Program Files(Non-inst)\\mirairobot\\old-mirai-console-launcher\\ffmpeg.exe"-i 输入音频文件路径 -ab 12.2k -ar 8000 -ac 1 -fs 1000000 -y test.amr并把命令行输出发上来

D:\Program Files(Non-inst)\mirairobot\old-mirai-console-launcher>ffmpeg.exe -i testering.flac -ab 12.2k -ar 8000 -ac 1 -fs 1000000 -y test.amr FFmpeg version SVN-r11143, Copyright (c) 2000-2007 Fabrice Bellard, et al. configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --enable-liba52 --enable-avisynth --enable-libamr-nb --enable-libamr-wb --enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --cpu=i686 --enable-memalign-hack --extra-ldflags=-static libavutil version: 49.5.0 libavcodec version: 51.48.0 libavformat version: 52.1.0 built on Dec 3 2007 17:42:57, gcc: 4.2.2 (mingw32) Input #0, flac, from 'testering.flac': Duration: N/A, bitrate: N/A Stream #0.0: Audio: flac, 44100 Hz, stereo Output #0, amr, to 'test.amr': Stream #0.0: Audio: libamr_nb, 8000 Hz, mono, 12 kb/s Stream mapping: Stream #0.0 -> #0.0 Press [q] to stop encoding size= 512kB time=327.4 bitrate= 12.8kbits/s video:0kB audio:512kB global headers:0kB muxing overhead 0.001145%
大概是这样,amr也顺利转出来了
github这里没有显示出换行,可能很乱,将就着看吧

@khjxiaogu
Copy link
Owner

khjxiaogu commented Jan 10, 2021

有可能是ffmpeg安装问题,请准备一个音频文件并打开命令行输入
"D:\\Program Files(Non-inst)\\mirairobot\\old-mirai-console-launcher\\ffmpeg.exe"-i 输入音频文件路径 -ab 12.2k -ar 8000 -ac 1 -fs 1000000 -y test.amr并把命令行输出发上来

D:\Program Files(Non-inst)\mirairobot\old-mirai-console-launcher>ffmpeg.exe -i testering.flac -ab 12.2k -ar 8000 -ac 1 -fs 1000000 -y test.amr FFmpeg version SVN-r11143, Copyright (c) 2000-2007 Fabrice Bellard, et al. configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --enable-liba52 --enable-avisynth --enable-libamr-nb --enable-libamr-wb --enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --cpu=i686 --enable-memalign-hack --extra-ldflags=-static libavutil version: 49.5.0 libavcodec version: 51.48.0 libavformat version: 52.1.0 built on Dec 3 2007 17:42:57, gcc: 4.2.2 (mingw32) Input #0, flac, from 'testering.flac': Duration: N/A, bitrate: N/A Stream #0.0: Audio: flac, 44100 Hz, stereo Output #0, amr, to 'test.amr': Stream #0.0: Audio: libamr_nb, 8000 Hz, mono, 12 kb/s Stream mapping: Stream #0.0 -> #0.0 Press [q] to stop encoding size= 512kB time=327.4 bitrate= 12.8kbits/s video:0kB audio:512kB global headers:0kB muxing overhead 0.001145%
大概是这样,amr也顺利转出来了
github这里没有显示出换行,可能很乱,将就着看吧

请不要使用cd,请直接按照命令行执行。

@WNCX
Copy link
Author

WNCX commented Jan 11, 2021

有可能是ffmpeg安装问题,请准备一个音频文件并打开命令行输入
"D:\\Program Files(Non-inst)\\mirairobot\\old-mirai-console-launcher\\ffmpeg.exe"-i 输入音频文件路径 -ab 12.2k -ar 8000 -ac 1 -fs 1000000 -y test.amr并把命令行输出发上来

D:\Program Files(Non-inst)\mirairobot\old-mirai-console-launcher>ffmpeg.exe -i testering.flac -ab 12.2k -ar 8000 -ac 1 -fs 1000000 -y test.amr FFmpeg version SVN-r11143, Copyright (c) 2000-2007 Fabrice Bellard, et al. configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --enable-liba52 --enable-avisynth --enable-libamr-nb --enable-libamr-wb --enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --cpu=i686 --enable-memalign-hack --extra-ldflags=-static libavutil version: 49.5.0 libavcodec version: 51.48.0 libavformat version: 52.1.0 built on Dec 3 2007 17:42:57, gcc: 4.2.2 (mingw32) Input #0, flac, from 'testering.flac': Duration: N/A, bitrate: N/A Stream #0.0: Audio: flac, 44100 Hz, stereo Output #0, amr, to 'test.amr': Stream #0.0: Audio: libamr_nb, 8000 Hz, mono, 12 kb/s Stream mapping: Stream #0.0 -> #0.0 Press [q] to stop encoding size= 512kB time=327.4 bitrate= 12.8kbits/s video:0kB audio:512kB global headers:0kB muxing overhead 0.001145%
大概是这样,amr也顺利转出来了
github这里没有显示出换行,可能很乱,将就着看吧

请不要使用cd,请直接按照命令行执行。

C:\Users\Administrator>"D:\\Program Files(Non-inst)\\mirairobot\\old-mirai-console-launcher\\ffmpeg.exe" -i F:\tester.flac -ab 12.2k -ar 8000 -ac 1 -fs 1000000 -y test.amr FFmpeg version SVN-r11143, Copyright (c) 2000-2007 Fabrice Bellard, et al. configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --enable-liba52 --enable-avisynth --enable-libamr-nb --enable-libamr-wb --enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --cpu=i686 --enable-memalign-hack --extra-ldflags=-static libavutil version: 49.5.0 libavcodec version: 51.48.0 libavformat version: 52.1.0 built on Dec 3 2007 17:42:57, gcc: 4.2.2 (mingw32) Input #0, flac, from 'F:\tester.flac': Duration: N/A, bitrate: N/A Stream #0.0: Audio: flac, 44100 Hz, stereo Output #0, amr, to 'test.amr': Stream #0.0: Audio: libamr_nb, 8000 Hz, mono, 12 kb/s Stream mapping: Stream #0.0 -> #0.0 Press [q] to stop encoding size= 512kB time=327.4 bitrate= 12.8kbits/s video:0kB audio:512kB global headers:0kB muxing overhead 0.001145%
amr文件人工找不到,包括ffmpeg.exe的目录还是被转的音频的目录

khjxiaogu added a commit that referenced this issue Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants