By Scott Grizzle, M.A
From time to time I hear a lot of people throwing around impressive words and phrases. But what do they actually mean and what do they mean to you? I mean can you really live your life not knowing the difference between a codec and containers, protocols or wrappers? I mean will my life end today if the mystery of h.263 and h.264 isn't solved? Well I can tell you right now you will live another day. But if you buy a cell phone or a device that only supports h.263 then you got ripped off and your quality isn't going to be the best.
A good starting point might be to talk about the difference of a Codec and a container/protocol or wrapper. I like to use transportation analogies. The definition of a Codec is it’s a process or application of Encoding-Decoding or COding-DECoding. Truth is it's like the payload. It’s all of the important and valuable information of how things should operate and does all of the important work. While the containers and wrappers are more of train Freight car. They carry the payload and get them from point A to point B.
General Codec:
There are a lot of differences in Codecs along including subsets of other codecs. For instance there is an older codec still widely used called MPEG 2. This Codec is still widely used in over the Air Television and older Satellite systems. The newer MPEG 4 is used for a variety of things from BluRays, to Newer Satellite Systems and streaming. You may have heard of h.264 which is a variant of MPEG 4. Technically its MPEG 4 part 10. The main difference is there is a transport layer which allows the video to go from location to location with a wrapper or container. While other MPEG 4’s like the one used for DVD’s and similar devices do not have this Transport Stream layer because they are designed for other purposes.
H.2xx
As mentioned previously h.263 and h.264 are widely used codecs and compression standards. H.263 is still widely used in some VOIP (voice over IP) phone systems and was originally designed for telephony and video conferencing systems. While h.264 was designed with a higher purpose of broadcast and online video in mind. You will also see this referred to as AVC or Advanced Video Coding or even MPEG 4 AVC. This is the most commonly used Codec/ Compression used for anything online today. For a short time there was another version called Scalable Video Coding (SVC) which there was a lot of hype about and then died. It's mostly used in telepresence and high end video conferencing systems. Microsoft did have a competing codec with their VC-1. It was popular and a direct competitor for a while and then the industry went with h.264.
You may be hearing a lot of buzz about HEVC (High Efficiency Video Coding) h.265. This is a codec that is still very young and still under development. The framework and specifications of version 1 were ratified in 2013. The concept and theory is this will be double the compression and efficiency of the h.264 AVC codec. HEVC is being called the codec of the future and the must for HD streaming. Well that will be determined and there are a lot of players now getting into the HD streaming and compression scene now.
Back to the Analogy of if the Codec is like the payload then the Containers, Wrappers and Protocols are like an Airplane, Train or Ground, Containers like UPS, FedEx & USPS and the codecs are like the individual boxes inside those vehicles. Currently there are 3 main protocols, wrappers, or containers. You will see these terms generally used interchangeably. Actually a protocol, wrapper and container are different. But not enough for this discussion at this time. As mentioned there are 3 mainstream protocols today: RTSP (Real Time Streaming Protocol), RTMP (Real Time Messaging Protocol), and HLS (HTTP Live Streaming). There is a new protocol being worked on called MPEG DASH (Dynamic Adaptive Streaming over HTTP)
Good Old Codecs:
There are some great old codecs out there that have been around a long time and are still widely used. RTSP is one of those. Originally designed by RealNetworks back in 1996. This is still widely used for IP camera and some lower end video encoders. It can carry both h.263 and h.264. Some of core delivery of this protocol is the packet string. This is designed to deliver a 5 second buffer into a viewable string. Actually to view you would need to deliver several packet buffers to begin playback. While it does have forward error correction which is pretty cool and can allow the expedited of the recovery of lost packets. Also sometimes RTSP is referred to as the Internet VCR remote control protocol due to some of the functionality of the protocol. However it's not as mainstream as some of the other codecs out there and doesn't work with all devices.
So in between RTSP and the newer protocols out there is RTMP. This is one of the most widely used if not the most widely used protocol in the industry. It’s also basically known as Flash. A few years ago it was flash vs the world where RTMP wouldn't work on every device unless you downloaded a flash player. Like RTSP, RTMP is often referred to as a traditional streaming protocol due to the packet delivery parameters and the assembly of the string. However the packet sizes can be smaller but still need several assembled together to be viewable. All of the mainstream Encoders on the market output RTMP and most servers for distribution preferred this protocol. There are also various flavors of RTMP depending on needs and environments. (Security, tunneling, and chunking) This is why and how it became very popular.
Apple / Microsoft Battles:
With apple being apple and Microsoft having windows media and then Adobe having Flash they needed to get back into the streaming market. They were already known for MOV files and QuickTime but not really considered to be a player in streaming media for a while. In 2009 Apple came out with a Proprietary format called HTTP Live Streaming. (HLS) Actually this name confused people because people have been streaming using HTTP for 10 years before the launch of this protocol. Apple actually wanted to call it Apple Live Streaming (ALS) but ALS obviously has a negative connotation which is also known as Lou Gehrig’s disease. So actually HLS isn't that bad. HLS is known as an Adaptive codec which allows it to have a manifest and the opportunity to select from multiple video resolutions and bit rates that have been multiplexed (combined) into one stream. So unlike RTSP and RTMP is the delivery of video with HLS. It's not that string of multiple packets that have to be assembled together to be viewed. Technically with HLS and similar HTTP delivery you actually get a lot of very small files that can be assembled to a larger strain or used by themselves. Also since this is a HTTP stream which is port 80 and possibly 443 this allows the stream to be capable of traversing any firewall or proxy server that lets through standard HTTP traffic. So if you are looking at a normal website without video then you can video HLS. If you are in a corporation and you can't videos from a variety of sources then those videos probably aren't HLS or HTTP. Current HLS is gaining traction on becoming the most popular video protocol. The reason is it works on almost every device including (obviously) IOS (apple) devices and most Android plus desktop computers plus Roku.
Like HLS is MPEG Dash Dynamic Adaptive Streaming over HTTP. Dash works by breaking the content into a sequence of small HTTP-based file segments (Chunks), each segment containing a short interval of playback time. However unlike HLS this is being designed with a unifying concept in mind. This is being built by an international consortium that is taking the best of all adaptive protocols. Including two which were mentioned here due to basically they are dying off or are dead already. But HDS which is Adobe’s Dynamic streaming and Smooth which was Microsoft’s replacement for Windows media and VC-1. In many cases DASH is being paired up with the h.265 codec mentioned earlier. The conceivable roadmap is for the future of HD Video delivery and streaming. But like h.265 that has yet to be seen and things may change with future initiatives that may come.
Summary:
So now that you have been bored out of your wits here are a couple things to take away. In most general terms Protocols and Codecs work together. Like previously mentioned the protocol is like a delivery service and the codec is the expensive package you have been waiting for all day. Without the delivery vehicle you will never get it and without the package there is no point in having the delivery vehicle. So it doesn't matter if a wrapper or container or protocol is called by another name. It's designed to get the package (the gorgeous video) through the internet, and possibly past your firewall to your computer or screen where you can view and watch those majestic eagles.
Comments