I am a php mysql developer ... just an (below) average. and i am interested in the way television and radio are broadcasted over internet live. i want to know how it works and and what are its requirements. i must admit that i am a complete layman but i expect it do by next half month or year or so.
there're a couple of network protocols for multimedia streaming. most popular atm are RTSP and RTMP. typically you need to setup streaming server that takes audio/video from some source and streams to all connected clients. popular streaming servers are Adobe Flash Media Server, Wowza Media Server and others.
Streaming is done over TCP or UDP, depending on your requirements. TCP guarantees that no packets are lost but they can be significantly delayed. This can be smoothed by large enough jitter buffer. Streaming over TCP is often used for one-way streaming from server to client when that delay can be tolerated. UDP is used for "live" streaming, especially in chat/conference, when you cannot tolerate several seconds delay.
RTSP is open standard. You can receive and play RTSP streaming by VLC player (free). RTSP provides a "media session setup" and goes over TCP. Actual streaming is done by RTP/RTCP protocols over UDP or "interleaved" with RTSP packets over TCP.
RTMP is proprietary protocol of Adobe.
Related
I am trying to wrote a VR remote gaming system.
A TCP video streaming program which only send H.264 frames of screenshots from desktop to my android phone. and an Android app sending orientation data in UDP to desktop. Everything was tested in local network
If I only run the sensor sender program. I can see the game camera rotating in real-time.
But if I run the two program at the same time. TCP Screen streaming is always smooth but sensor data receiving start to delay.
Then I lower down the sending fps. It gets smoother but still not acceptable.
TCP traffic has 500KBps~1000KBps
UDP has 600Bps
Does it mean network congestion occuring? How can I overcome this?
What if I change video streaming protocal to UDP? but an I-frame may be larger than 65KB
For a server which tries implement video chatting or (multimedia or text chatting for that matter) using RTP which one should be used for control? SIP or RTSP? I went through the abstract of the corresponding RFCs however I could only see that both of them are used for just controls and the actual transmission of data is done using other protocols like UDP or RTP over UDP. From my understanding, SIP is for controlling transmission of data where sessions between two users are involved and RTSP otherwise. Of course it is a very basic understanding. What are the actual differences between these 2 protocols ? A simple google search did not give me a comparison.
Both SIP and RTSP are signalling protocols. SIP can handle more diverse and sophisticated scenarios than RTSP and I can't think of anything significant that RTSP can do that SIP can't. The advantage of RTSP over SIP is that it's a lot simpler to use and implement.
RTSP is suited for client-server applications, for example where one server has a media stream to feed to multiple clients. SIP is suited for peer-to-peer scenarios where media streams need to flow both ways.
One way to think of it is that RTSP is kind of like using the television where the broadcaster is the server and your tv is the client; you turn your tv on and can switch between a certain number of pre-defined channels. SIP is like using the phone (not surprising given it was mainly designed for VoIP), you can call anyone you want or they can call you.
Both SIP and RTSP use exactly the same media transfer mechanisms such as SDP and RTP so they aren't a consideration when choosing between them.
I have mp4 stream available over HTTP to single client
How to broadcast it to multiple clients?
I can write code that will read MP4 stream over HTTP and copy to multiple clients.
But is there some initial frame, header in MP4 stream?
May be some framework or existing server can broadcast mp4 stream?
Use VLC, it has nice streaming possibilities (VLC is for Video Lan Client, by the way).
Just fire up VLC, go to File->Stream..., select the source you want to distribute, choose e.g. http as method, transcode (or don't), and select the port to listen on. From there on, your clients can connect :)
I'm developing a kind of proxy for video streaming and I'm now dealing with an issue related to packets received out-of-order (without losses). This issue (maybe) is the reason why there are frequent noises in the video playback.
Do you know by chance if VLC is able to reorder packets? If so, it would mean that the reason why there are some noises in the playback is something else, if not, I should just develop an additional layer that ensure the reception with the correct order.
Thanks.
Assuming that you are talking about RTP over UDP, AFAIK VLC uses live555 libraries for client-side RTSP/RTP functionality and live555 has a built in jitter buffer that should take care of re-ordering for you. I can't recall the size of the jitter buffer of hand but 100ms seems to ring a bell.
In case you didn't know: When developing media streaming applications (esp. over UDP) it is important to increase the size of the receiver buffer. If it is full and packets get dropped, which could explain your artifacts.
Also, UDP being unreliable means that you will experience artifacts if packets are lost/corrupted and you have no suitable mechanism to deal with it.
I'm looking for a solution to provide streaming video to a variety of clients. I have iPhone clients as well as Flash-based clients. I'd like to not have to provide two separate mechanisms for delivering streaming content. Apple has decreed that HTTP Live Streaming is the way to provide streaming video to the iPhone (though does carve out an exception for small progressive downloads).
My question: Are there examples of Flash implementations consuming HTTP Live Streaming content? What challenges might be faced if I were to try and implement such a player? Are there other technologies I should consider?
Thanks!
Not yet. Maybe never. But...
What you could do is stream from a Wowza Media Server, which will allow you to publish one stream that can be consumed by various clients, including both Apple client devices and Flash browser clients.