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

amr文件seekto无效 #218

Open
lichenchenisapuppy opened this issue Jul 28, 2023 · 3 comments
Open

amr文件seekto无效 #218

lichenchenisapuppy opened this issue Jul 28, 2023 · 3 comments

Comments

@lichenchenisapuppy
Copy link

lichenchenisapuppy commented Jul 28, 2023

使用amr格式的音频url播放的时候,seekto后会从头开始播放
测试步骤:
替换demo中TestActivity.kt第157行的url为任意一个amr文件的url复现

目前为找到原因,也未搜索到相关的issues,所以请大佬看看是否有什么办法处理,3q。
另外这个库个人感觉很好用

@lichenchenisapuppy
Copy link
Author

aac的文件也不行 不知道是不是录制出来就不行
我试了下MP4 wav都可以 。

@lichenchenisapuppy
Copy link
Author

mediarecorder对象如下设置时可以:
setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
setAudioEncoder(MediaRecorder.AudioEncoder.AAC);
如果换成
setOutputFormat(MediaRecorder.OutputFormat.RAW_AMR);
setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB)
使用seekto的时候就不行了

@0toN
Copy link

0toN commented Dec 22, 2023

mediarecorder对象如下设置时可以: setOutputFormat(MediaRecorder.OutputFormat.MPEG_4); setAudioEncoder(MediaRecorder.AudioEncoder.AAC); 如果换成 setOutputFormat(MediaRecorder.OutputFormat.RAW_AMR); setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB) 使用seekto的时候就不行了

mediarecorder对象在哪里设置呢?

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