2012-02-07 113 views
2

我想将Wowza视频流式传输到Android。我尝试设置MediaPlayer()和路径"rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov",但没有成功。我得到这个:Wowza和Android流式传输

ARTSPConnection:服务器意外关闭连接。

关于如何解决这个问题的任何建议?

+0

您是否找到解决方案?我需要这个,但我无法找到解决方案... :) – Jovan 2012-04-20 06:47:51

回答

1

那么我soltuion是要建立一个HTML页面,将采取作为参数的RTMP网址和使用Flash媒体播放将发挥通过Flash流...

<!DOCTYPE html> 
<html> 
    <head> 
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
     <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=1;" /> 
     <meta name="apple-mobile-web-app-capable" content="yes" /> 
     <meta names="apple-mobile-web-app-status-bar-style" content="black-translucent" /> 
     <title>#############</title> 
     <script type="text/javascript"> 
      function resizeHandler() 
      { 
       var flash = document.getElementById("FlashMovie"); 
       window.scrollTo(0, 1); 
       flash.focus(); 
       flash.focus(); 
      } 

      window.onresize = resizeHandler; 
      window.onload = resizeHandler; 

     </script> 
    </head> 

    <body style="margin:0; padding:0; background: #000;"> 
     <div style="margin:0; padding:0; width:100%; height:100%"> 
      <embed id="FlashMovie" style="width:100%; height:100%" src="http://fpdownload.adobe.com/strobe/FlashMediaPlayback.swf" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" fullScreenOnSelection="true" scale="showall" flashvars="src=rtmp%3A%2F%2F########%2Flive%2FmyStream.sdp&playButtonOverlay=true&loop=true&autoPlay=true&streamType=live&initialBufferTime=2" pluginspage="https://play.google.com/store/apps/details?id=com.adobe.flashplayer"></embed> 
     </div> 
     <br /><br /><br /> 
    </body> 
</html> 
+0

它不是最好的你可以得到...但它是一个散步.... – 2012-04-21 16:40:22

3

这是我们需要流从wowza:

String SrcPath ="rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov"; 

/** Called when the activity is first created. */ 
@Override 
public void onCreate(Bundle savedInstanceState) { 
    super.onCreate(savedInstanceState); 
    setContentView(R.layout.main); 
    VideoView myVideoView = (VideoView)findViewById(R.id.myvideoview); 
    myVideoView.setVideoURI(Uri.parse(SrcPath)); 
    Log.i("parse path",Uri.parse(SrcPath)+""); 
    myVideoView.setMediaController(new MediaController(this)); 
    myVideoView.requestFocus(); 
    myVideoView.start();} 

但是你做到这一点,复制“bigbuckbunny”视频文件“VOD”文件夹中wowza安装程序之前。