This article explains, in layman’s terms, what the basic difference between Program Stream and Transport Stream is, and why it is still relevant today.
The two major ways in which video data is used
This is simple. Data is like water. Data is either stored or it flows.
Either you store data on drives or discs or tapes, etc., or you stream data via cables or the airways.
If you’re working on your computer, and creating and sharing files with your friends, you are only using data in ‘storage’ mode. If you are uploading content to Youtube or downloading movies from iTunes, you are still using data in ‘storage’ mode. ‘Copy and paste’ is as exciting as it gets in this mode.
However, when data flows (streams), things get a bit more complicated. You have to make sure data stays within bounds, exactly like how water needs to be contained in pipes or reservoirs.
In ‘Streaming’ mode, Control is the key word. Furthermore, when you get your data at the end of the pipeline (cable or air), you also need strict error checking systems in place to make sure bits haven’t been lost.
You might be asking: But why is downloading and uploading (or copy-paste) not streaming? Data is flowing, isn’t it?
Excellent question. Data is flowing (after all, data is meant to flow), but in this case, all of the data is being transferred from one point to another – just like if one is transferring a glass full of water to another. There still are some checks and balances in place, but you’re not throwing data into the air for the world to catch. It’s a lot more easier on the nerves.
Data meant to be stored and copy-pasted is encoded in a Program Stream. The word ‘Program’ is just a name, don’t attach any meaning to it.
We have already learnt that audio, video and metadata is interleaved together to create files, a process called multiplexing. This is done so that a video file can be shared easily (rather than sharing each individual content separately).
Why is it called ‘stream’ if it is meant for storage? Like I said, all data is meant to flow at some point. Video as a program stream will also be played back or recorded or copy-pasted at some point. There still has to be some level of control to ensure these ‘basic’ tasks are performed without any data corruption or loss.
The most common use of the program stream is the VOB container format for DVDs.
The Program Stream specification was primarily created for ‘reliable’ media. You know your boundaries (Hard drives, DVDs, etc.). Think of it as a bull pen for domesticated animals.
There’s one more defining feature: A Program Stream can only contain one content channel. One image-sound combo, that’s it. If a DVD needs special features, it’s written as another Program Stream.
The MPEG transport stream (MPEG-TS, MTS or TS) is a container format for transmission as well as storage of audio, video and metadata.
The two major features of the Transport Stream are error checking/correction and stream synchronization. When they designed this system, they knew that data will be transmitted over wide distances over many kinds of cables, technologies and boxes. This exponentially increases the chances of error and corruption, not to mention signal degradation (loss of signal strength).
So, if program stream is a bull pen for domesticated animals, the Transport Stream is an iron cage for wild animals. It is far stricter, and stronger, overall. What do I mean by ‘stronger’? To put it jokingly, if Program Stream faced Transport Stream in a boxing match, TS would win in the first round via knockout. That tough.
This robustness of the transport stream is one reason why it is widely used in terrestrial and satellite broadcast, even today. The MPEG TS is the container of choice for 90% of the world’s broadcast. No matter what you shoot in: RAW, H.264, HDCAM SR or film, your beloved content is converted and broadcast as MPEG-TS.
Finally, there’s one more major advantage to Transport Stream: It can carry multiple ‘programs’ in a single container.
This is why Blu-ray uses MPEG Transport Stream for its content.
Wait a minute! Isn’t the purpose of Blu-ray similar to DVDs? Shouldn’t it be using Program Stream instead?
The makers of Blu-ray decided that it is important for blu-ray to offer greater features when compared to DVD. One of these features is the ‘picture in picture’ effect, where you can actually playback multiple videos at the same time from the disc.
Also, broadcast programs (content) can be recorded to Blu-ray without altering the format. The same disc can be read from and re-edited without further alteration, too. It all stays as MPEG-TS.
Or maybe, they don’t like the idea of ‘copy-paste’.
Which is better quality, PS or TS?
Neither. Don’t confuse the word MPEG with MPEG-1, MPEG-2, MPEG-4, etc. The latter are compression specifications, while PS and TS are container formats, which I’ve outlined here. They are all made by the parent body MPEG, hence the title.
E.g., Blu-ray can be compressed as MPEG-2, MPEG-4, H.264 and sometimes AVCHD, all within the MPEG-TS container (.M2TS). The reason why people confuse TS with MPEG-2 is because the most widely used compression system for broadcast is MPEG-2.
Both PS and TS are containers, and have nothing to do with video quality.