开发者

Android RTSP streaming failing

开发者 https://www.devze.com 2023-01-06 12:53 出处:网络
I \'ve Set up wowza streaming server in my ubuntu box for RTSP streaming video files. The video gets stream perfectly when I \'ve Totem video player at client开发者_StackOverflow中文版 side. The same

I 've Set up wowza streaming server in my ubuntu box for RTSP streaming video files. The video gets stream perfectly when I 've Totem video player at client开发者_StackOverflow中文版 side. The same url or video is failing to work on android device and the application that tries to access that rtsp url breaks with Mediaplayer error (1,-1).


I recently also set up a Wowza streaming server, and had three things trip me up before I could get it to work. One or more of these may help you out.

Wowza Settings:

1) In the Vhost.xml file, make sure that <port>1935</port> is changed to <port> 1935,554 </port> (You may have to use ROOT to start the Wowza server after this. 554 is a reserved port for RTSP streaming).

2) In the Application.xml file make sure PlayMethod is set like this: <PlayMethod>none</PlayMethod>

In your Android Code:

3) In your Android code, the URL needs to follow the format rtsp://serverip/live/myStream.sdp

so NO port number in the URL. This is the one that tripped me up the longest.

After this, I was able to play my video by passing the url right to the MediaPlayer.

0

精彩评论

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

关注公众号