Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid to Wowza streaming issue
    text
    copied!<p>I have very rare problem. I have split screen on my phone which consists of <code>SurfaceView</code> and <code>VideoView</code>. <code>SurfaceView</code> is used to capture video from camera and send it to Wowza server. <code>VideoView</code> is used to receive the same stream from Wowza server.</p> <p>Sometimes (I can't understand how to reproduce it) streaming works as it should, but 99% of times I don't have video in stream. I've done simple html page to identify where the problem is (in sending or in receiving) and I'm sure something is wrong with receiving (because html page shows video when there is no <code>VideoView</code>.</p> <p>Here is the code I use to play stream on phone:</p> <pre><code> android.os.Handler h = new android.os.Handler(); h.postDelayed(new Runnable() { @Override public void run() { Uri wowzaUri = Uri.parse("rtsp://192.168.0.100:1935/live/test.stream");//Uri.parse("rtmp://192.168.0.100:1935/live/test"); mVideoView.setVideoURI(wowzaUri); mVideoView.setMediaController(new MediaController(MainActivity.this)); mVideoView.requestFocus(); mVideoView.setOnErrorListener(new MediaPlayer.OnErrorListener() { @Override public boolean onError(MediaPlayer mp, int what, int extra) { mVideoView.setVideoURI(Uri.parse("rtsp://192.168.0.100:1935/live/test.stream")); return true; } }); mVideoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() { @Override public void onPrepared(MediaPlayer mp) { mVideoView.bringToFront(); mp.start(); Toast.makeText(mContext, "Started", Toast.LENGTH_LONG).show(); } }); } }, 5000); </code></pre> <p>It wrapped in Handler because it's get called in <code>AsyncTask.onPostExecute()</code> method (when streaming starts).</p> <p>PS. Everything works fine when playing video rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov .</p> <p>Can anyone help me to identify the problem?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload