简体   繁体   English

Android:直播视频网址播放器

[英]Android: Live Stream Video URL Player

We are trying to develop an app for Android where you can play a live streaming URL. 我们正在尝试开发适用于Android的应用,您可以在其中播放实时流媒体网址。 I tried several approaches using the MediaPlayer and StreamPlayer... but no luck with the URL playing. 我尝试了几种使用MediaPlayer和StreamPlayer的方法...但是没有运气的URL播放。

I can of cause play a static MP4 or MP3 file using the URL (hosted on a server) but when I try to play a stream URL it doesn't play or give an error. 我可以使用URL(托管在服务器上)播放静态MP4或MP3文件,但是当我尝试播放流URL时无法播放或出现错误。

Any thoughts? 有什么想法吗?

Mp3 stream works well on Mediaplayer from Android 2.2 and above. Mp3流在Android 2.2及更高版本的Mediaplayer上运行良好。 If you want to play the Content below 2.2 then its better to use local proxy server implementation. 如果要播放2.2以下的内容,则最好使用本地代理服务器实现。 check Npr . 检查Npr Which uses the same approach. 哪个使用相同的方法。

If you want to play wma audio you should convert that into PCM and play it. 如果要播放wma音频,则应将其转换为PCM并进行播放。 check aacplaye r. 检查aacplaye r。 In aacplayer project he gets wma content from mms:// stream and plays it . 在aacplayer项目中,他从mms:// stream获取wma内容并播放它。 You can edit that to play only wma content. 您可以编辑它以仅播放wma内容。 But i haven't tried playing any wmv videos. 但我还没试过播放任何wmv视频。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM