Does RTSP live streaming just not work on Android 1.5/1.6?
My main dev phone is a Nexus 1 running 2.2. I have successfully been streaming live video to this device from a Wowza server for several weeks now.
I have now taken my applicat开发者_如何学Goion (without modifications) and put it on a Sony Ericsson Xperia running 1.6. The video will not play. I get the following errors:
MediaPlayer: Couldn't open file on client side, trying server side
...
MediaPlayer: info/warning (1/26)
PlayerDriver: Command PLAYER_INIT completed with an error or info PVMFFailure
MediaPlayer: Error:(1,-1)
VideoView: Error: 1,-1
I've been googling around, but just can't seem to get a clear answer. Does anyone know if live streaming just doesn't work on some versions of Android?
video stream for android:
package com.test.videodemo;
import android.app.Activity;
import android.graphics.PixelFormat;
import android.net.Uri;
import android.os.Bundle;
import android.widget.MediaController;
import android.widget.VideoView;
public class videodemo extends Activity {
VideoView v1;
String path;
Uri url;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().setFormat(PixelFormat.TRANSLUCENT);
setContentView(R.layout.main);
VideoView videoHolder = new VideoView(this);
videoHolder.setMediaController(new MediaController(this));
setContentView(videoHolder);
videoHolder.setVideoURI(Uri.parse("http://bitcast-in.bitgravity.com/web18/web18/3gp/indo_china_suhasini.3gp"));
videoHolder.requestFocus();
videoHolder.start();
}
}
We have used RTSP Live streaming on 1.5, 1.6, and 2.1; so you should be able to get this to work; but you may have an encoding that only works on 2.2. What type of stream are you streaming?
精彩评论