Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Media streaming basics - HTTP vs RTMP

I am very new to media streaming, and I have some basic doubts to clear :

  1. As far as I can understand, the difference between HTTP streaming (say through Apache) and a RTMP streaming (through Red5) is that streaming servers provide buffering and advance controls like seek, etc. Am I right ?

  2. Can I stream only flash videos from RTMP servers like Red5 ? If I have to stream varying formats of files, do I have to go for HTTP streaming ? Can I use tools like xuggler to dynamically transcode files and send according to the request from the Red5 server ?

I am posing all these doubts because I have to provide streaming to all mobile clients - iPhone, Blackberry, Android - iPhone does not support flash, so is it a good idea to go for Red5 ?

like image 259
WinOrWin Avatar asked Apr 30 '11 15:04

WinOrWin


People also ask

Is RTMP an HTTP?

RTMP is a live streaming protocol that transmits video files from an encoder to an online video hosting platform. RTMP and its variations stream on TCP and UDP (User Datagram Protocol). RTMP doesn't stream on HTTP (whereas standards like HLS do). RTMP supports audio codecs like AAC and MP3.

Which protocol is best for live streaming?

HLS is the most commonly used protocol for streaming today.

Is RTMP outdated?

RTMP was originally designed for streaming with Adobe's Flash player and is often simply called Flash streaming, but this use is now quite outdated.

Does HTTP support streaming?

HTTP Streaming is a push-style data transfer technique that allows a web server to continuously send data to a client over a single HTTP connection that remains open indefinitely.


1 Answers

Let me be a bit verbose to clear details.

1) What is "streaming". Usually in world of video streaming is delivery of frames according to realtime. If you have 30-minutes video it will be delivered to user in 30 minutes.

There are special protocols dedicated exclusively for streaming: RTSP (perhaps the ancient of living today), RTMP, MJPEG, family of http-based protocols (apple,abobe,microsoft) and some other closed vendor protocols.

2) what is "http-streaming" or "pseudo-streaming". If you just put your file on HTTP server, user can download it and watch. If he downloads full video, he can even seek in it. But what happens if user want to seek to the middle of film without downloading first part? It should somehow tell to server: open file container, seek to this moment and pack file back. So HTTP server must know about structure of file container to deliver seek functionality to client.

nginx and apache can do it for flv and mp4 containers, which is ok for 100% of video, possible to play via Flash Player.

3) what is http-streaming messed with nowadays. Apple, Adobe and microsoft has designed and implemented streaming on top of HTTP. It means that client downloads 10-seconds segment, still keeping proper framerate. 30-minutes film is still downloaded in 30 minutes, but there are big delays between segment downloadings. It is possible to seek in such "format", to switch bitrates, etc.

4) RTMP Streaming servers like Red5 or erlyvideo can stream H.264, H.263, VP6 and Screen video. MPEG-4 (Xvid/DivX) or MPEG-2 is not supported.

like image 145
Max Lapshin Avatar answered Sep 24 '22 08:09

Max Lapshin