How to avoid 15 second delay/caching in Android Media Player when playing stream

后端 未结 4 2234
迷失自我
迷失自我 2021-02-15 17:57

I am implementing a media player that plays a stream from a remote machine. Via my app I can control the remote machine (e.g. seek to second). Works like charm, but: The Android

4条回答
  •  逝去的感伤
    2021-02-15 18:30

    One thing I realized in the newer Android versions is that it seems to have issues with VBR MP3 files. It plays them, but buffers way too much data before it starts. (3+ MB, the majority of my test files).

    A (bad hack) workaround is to remove the XING header from the MP3 files (this is where the VBR information is stored). This seems to make the player fall back to a simpler algorithm and start playback successfully for all my files after buffering only 100kb...

提交回复
热议问题