Audio Files accurate seek to

徘徊边缘 提交于 2019-12-23 20:42:01

问题


Which Audio format should I use to get the best accurate seek to? (play the song from an offset) I whant this to be accurate on the millisecond.

is that Possible?


回答1:


I can say that the format of the audio file matters. I had this problem with long mp3 file. As the mp3 files aren't designed for such accurate seeking you can check this answer for more details

In my case the bitrate of the mp3 file was low, It was 96Kps. and the VBR data wasn't correct which caused the mp3 file to seek wrongly on android.

My intent was to make android and IOS app that seeks accurately through this file but I failed to find the correct format that is suitable for both.

For the IOS, I used MP3 Diags and applied custom transformations to remove and rebuild the VBR

For Android, I converted the file to m4a format and it worked perfectly. I used Audacity and installed the FFmpeg package to be able to export to m4a format.

This is the file sample that contains the problem I mentioned




回答2:


The format doesn't matter, as long as it's compatible with Android's MediaPlayer class. It has a seekTo() method that is accrate to the millisecond.



来源:https://stackoverflow.com/questions/7645190/audio-files-accurate-seek-to

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!