Playing sdp file (rtsp stream) from http url in android

浪子不回头ぞ 提交于 2019-12-04 17:13:28

RTSP and HTTP are different protocols. An HTTP server is not going to serve the data in the same way. It's going to send HTTP headers, etc. VLC may be somehow smart enough to infer the protocol based on the data it receives, but Android's NuPlayer is probably not so sophisticated.

RTSP "Real Time Streaming Protocol" is for streaming media server. You can watch live video broadcasting from remote server on your computer/mobile device through RTSP protocol. This protocol only handle playback of media files. Below are some features of RTSP:

  1. This works on TCP connection
  2. RTSP requests are all sent on the same TCP connection
  3. This protocol has very less end-to-end delay
  4. This is also called "true streaming"
  5. No file is downloaded to user's system
  6. Play movie in real time
  7. Can do live broadcast
  8. Some firewall blocks this protocol on user's machine

HTTP "Hypertext Transfer Protocol" is for transferring files (text, graphic images, sound, video, and other multimedia files) on the World Wide Web. HTTP protocol communicate between Web pages (Contain text, graphic images, sound, video and other multimedia) hosted on remote server and the user's browsers on their system. We can watch streaming video through HTTP protocol. Below are some features of HTTP:

  1. This works on TCP connection
  2. HTTP will typically send each request on a separate TCP
  3. This protocol has high end-to-end delay as compared to RTSP
  4. Serve content from standard web server
  5. This support progressive download from a web server
  6. File is downloaded to user's system but can start playing before completely downloaded
  7. This works on all firewall because it uses standard HTTP protocol

SDP "Session Description Protocol" consists of a set of communications end points along with a series of interactions among them. SDP contains information about streaming media. It contains mainly three parts about media - Session description, Time description and Media description. SDP not itself is a file type but it is a protocol and responsible for steaming media. HTTP and RTSP both support SDP.

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