Video streaming using RTSP: Android

家住魔仙堡 提交于 2019-11-26 08:07:26

问题


I\'m trying to install a Wowza server on my Linux machine to enable the RTSP streaming for my Android application.

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.

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.


回答1:


For rtsp streaming you can also try following servers:

  • Darwin Streaming Server - linux package is available
  • Windows Media Services - can be installed on Windows Server Trial
  • VLC - standalone application

For testing purposes of your application i would also recommend you to use existing mobile video services like:

  • m.youtube.tv
  • m.wp.tv

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-sdk-windows\platforms\android-x\samples\ApiDemos\src\com\example\android\apis\media\MediaPlayerDemo_Video.java



回答2:


VLC+Android Owns.

I used the following one-liner to stream video of our kittens to our cell phones.

We used the launchRTSP free app to leverage the built-in RTSP viewing capabilities of Android, to access the URL over the internet.

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}"



回答3:


WCS4 server can deliver WebRTC stream as 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.



来源:https://stackoverflow.com/questions/3186950/video-streaming-using-rtsp-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!