Skip to content Skip to sidebar Skip to footer

Audio Files Accurate Seek To

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?

Solution 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

Solution 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.

Post a Comment for "Audio Files Accurate Seek To"