我有以下网址:rtmp://95.87.101.64:1935 / live / mtv-ifilm-ifilm-live-16x9-SDq
我想在我的Android手机中直播这个视频,我的实时流媒体代码是
MediaController mediacontroller = new MediaController(VideoViewActivity.this);
mediacontroller.setAnchorView(videoview);
// Get the URL from String VideoURL
Uri video = Uri.parse(VideoURL);
Log.e("Video uri", "" + video);
videoview.setMediaController(mediacontroller);
videoview.setVideoURI(video);
videoview.setOnPreparedListener(new OnPreparedListener() {
// Close the progress bar and play the video
public void onPrepared(MediaPlayer mp) {
pDialog.dismiss();
videoview.start();
}
});
但是我无法播放视频,当我检查logcat时发现了这个错误
09-09 14:43:19.887:E / MediaPlayer(11277):错误(1,-2147483648)
但当我将视频网址更改为rtmp://bomtv.5centscdn.com时:1935 / asianetmovie / c1c120277d434ca3b8a2d3bdf654dcba.sdp 它完美地运作。
请在我做错的地方帮忙。