[英]Android Java Video Live Streaming
I'm creating an application that can stream live video from an HTTP url. 我正在创建一个可以从HTTP URL流式传输实时视频的应用程序。 Is it possible to create a native Android app that can stream live videos directly?
是否可以创建可以直接流式传输实时视频的本地Android应用程序? Or do I still need a media server to transcode video into a format supported by Android before it is sent from the server to Android via RTSP?
还是在通过RTSP将视频从服务器发送到Android之前,我是否仍需要媒体服务器将视频转码为Android支持的格式? Any help would greatly be appreciated.
任何帮助将不胜感激。 Thank you.
谢谢。
As long as you have a proper rtsp URL for example : rtsp://somewhere/vod/mp4:sample.mp4
只要您具有正确的rtsp URL,例如:
rtsp://somewhere/vod/mp4:sample.mp4
You can open an intent by using 您可以通过使用打开意图
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(your_rtsp_address));
startActivity(browserIntent);
use VideoView
. 使用
VideoView
。 by using VideoView.setVideoURi method you can show streaming. 通过使用VideoView.setVideoURi方法,可以显示流。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.