开发者

how to stream through mms://

开发者 https://www.devze.com 2023-03-12 13:13 出处:网络
There are some posts about this, but so far, i haven\'t seen any good answer. Is there a way i can stream audio from mms:// uris with Android?. MediaPlayer seems not to like these streams. Also changi

There are some posts about this, but so far, i haven't seen any good answer. Is there a way i can stream audio from mms:// uris with Android?. MediaPlayer seems not to like these streams. Also changing mms://开发者_如何学Python with http or rtsp doesn't work either. Did someone find a workaround to this?. Thanks!


  1. Download Android NDK
  2. Then download modified libmms and libffmpeg at http://radiotime.com/apps/android.aspx
  3. basically you has to have 2 threads:
    • 1st thread for downloading the audio data from mms station then write to a wma file
    • 2nd thread decode this wma to PCM data using the libffmpeg.


To save some time you can use the following library for playing mms streams: FFMpegMediaPlayer.

It has the same interface as the android MediaPlayer so its easy to work with and it comes with optional prebuilt binaries too.

I use it in my own mms streaming application and I haven't had any problems.

0

精彩评论

暂无评论...
验证码 换一张
取 消