使用 RTSP 的视频流:Android
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3186950/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Video streaming using RTSP: Android
提问by success_anil
I'm trying to install a Wowza server on my Linux machine to enable the RTSP streaming for my Android application.
我正在尝试在我的 Linux 机器上安装一个 Wowza 服务器,以便为我的 Android 应用程序启用 RTSP 流。
On Android client side what sort of changes do I need to make in my application? I'm using Videoview to simply play a video file stored locally.
在 Android 客户端,我需要在我的应用程序中进行哪些更改?我正在使用 Videoview 来简单地播放本地存储的视频文件。
Now I want to get the video content get streamed through the server that I've installed. If necessary I can move to any other streaming server as right now I'm doing a research on streaming servers.
现在我想通过我安装的服务器流式传输视频内容。如果有必要,我可以转移到任何其他流媒体服务器,因为现在我正在研究流媒体服务器。
采纳答案by Dariusz Bacinski
For rtsp streaming you can also try following servers:
对于 rtsp 流,您还可以尝试以下服务器:
- Darwin Streaming Server- linux package is available
- Windows Media Services- can be installed on Windows Server Trial
- VLC- standalone application
- Darwin Streaming Server- linux 包可用
- Windows Media Services- 可以安装在 Windows Server 试用版上
- VLC- 独立应用程序
For testing purposes of your application i would also recommend you to use existing mobile video services like:
为了测试您的应用程序,我还建议您使用现有的移动视频服务,例如:
You can extract video links from those sites and use them to test your application.
您可以从这些站点中提取视频链接并使用它们来测试您的应用程序。
Try to follow Android ApiDemos, you can find video streaming player example at:
尝试关注Android ApiDemos,您可以在以下位置找到视频流播放器示例:
...android-sdk-windows\platforms\android-x\samples\ApiDemos\src\com\example\android\apis\media\MediaPlayerDemo_Video.java
回答by Brad Hein
VLC+Android Owns.
VLC + Android 拥有。
I used the following one-liner to stream video of our kittens to our cell phones.
我使用以下 one-liner 将我们小猫的视频传输到我们的手机。
We used the launchRTSP free app to leverage the built-in RTSP viewing capabilities of Android, to access the URL over the internet.
我们使用 launchRTSP 免费应用程序来利用 Android 的内置 RTSP 查看功能,通过互联网访问 URL。
You may want to tweak the frame rate and such. As shown below, it's perfect for webcam streaming.
您可能想要调整帧速率等。如下所示,它非常适合网络摄像头流媒体。
vlc -vvvvvvvvvvvvvvvvvvvvvvv -I dummy v4l2://:vdev=/dev/video:width=640:height=480:fps=2 --sout "#transcode{vcodec=mp4v,fps=5,vb=800,acodec=mpga,samplerate=8000,ab=64,deinterlace,channels=1,sfilter='mosaic:marq{marquee=%m-%d-%Y_%H:%M:%S,size=16,color=16711680,position=5,opacity=64}'}:rtp{sdp=rtsp://0.0.0.0:5858/kittens.sdp}"
回答by ankitr
WCS4 servercan deliver WebRTC stream as RTSP.
WCS4 服务器可以将 WebRTC 流作为 RTSP 传送。
So you can send WebRTC live stream from Android or desktop Chrome/FF browser and then connnect to this stream via VLC or Android by RTSP.
因此,您可以从 Android 或桌面 Chrome/FF 浏览器发送 WebRTC 实时流,然后通过 VLC 或 Android 通过 RTSP 连接到此流。