Talk:MPEG transport stream

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
WikiProject Telecommunications (Rated C-class, Low-importance)
WikiProject iconThis article is within the scope of WikiProject Telecommunications, a collaborative effort to improve the coverage of Telecommunications on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
C-Class article C  This article has been rated as C-Class on the project's quality scale.
 Low  This article has been rated as Low-importance on the project's importance scale.
 
WikiProject Television / Broadcast engineering and technology (Rated C-class, High-importance)
WikiProject iconThis article is within the scope of WikiProject Television, a collaborative effort to develop and improve Wikipedia articles about television programs. If you would like to participate, please visit the project page where you can join the discussion. To improve this article, please refer to the style guidelines for the type of work.
C-Class article C  This article has been rated as C-Class on the project's quality scale.
 High  This article has been rated as High-importance on the project's importance scale.
Taskforce icon
This article is supported by the Broadcast engineering and technology task force.
 

Cuts[edit]

Hope nobody gets too worried by the amount I just cut out, but there was just too much wrong and confused stuff. This article still needs major help. The bottom stuff is just sort of random unstructured meandering around things that are vaguely related. Preferably, most of that would be cut out, or at least organized, and the article would be fleshed out with stuff like specification details and applications.Snacky 05:36, 27 May 2006 (UTC)

State was is wrong or confused or clean it up. I'll restore some of it. Appreciate your additions, they look very nice. Daniel.Cardenas 14:12, 27 May 2006 (UTC)

Hardware interface[edit]

Is there a standard hardware interface that people use to get the transport stream from one device to another? DVB vaguely mentions "a synchronous parallel interface (SPI), synchronous serial interface (SSI), or asynchronous serial interface (ASI)".

But asynchronous serial interface focuses on ASCII over RS-232. So do people really send video over RS-232? If not, what (specifically) *do* people use to carry video from one device to another? —Preceding unsigned comment added by 65.70.89.241 (talkcontribs) 15:30, 10 August 2006

You can use whatever you want. For digital video equipment, ASI over BNC-terminated coax is probably the most common mechanism, making it something of a de facto requirement within the industry. But there's nothing that says you HAVE to use it (why should there be)? Snacky 18:33, 10 August 2006 (UTC)

Sample of tools: Verticle lists versus Horizontal[edit]

What is the point of making the lists vertical and creating all that white space? I prefer the more compact horizontal list. Daniel.Cardenas 16:29, 27 December 2006 (UTC)

Hey, what about VLC player?[edit]

VLC player can play TS files too, so I think it should be included in the tools... 216.49.71.146 19:42, 25 September 2007 (UTC)

I think the purpose of the tools section, are tools that help analyze the transport stream, more then superficially viewing the contents. Daniel.Cardenas 01:28, 26 September 2007 (UTC)

PID? Program Number ?[edit]

In "Program" section, it reads:

  Transport stream has a concept of programs. A single program has a unique PID and 
  the elementary streams associated with that program have the same PID.

A single program has a unique program_number, not PID, doesn't it? —Preceding unsigned comment added by Motonari (talkcontribs) 16:19, 29 September 2007 (UTC)

I'm not aware of program numbers, where are they? I am aware of PIDs in the TS packet header. Daniel.Cardenas 17:18, 29 September 2007 (UTC)
program_number is a unique numeric value to identify a program, which is coded in PAT. You can find a formal definition in ISO/IEC 13818-1 2.4.4.3. Motonari 18:02, 29 September 2007 (UTC)

Purpose of slice[edit]

In Layers of communication, the explanation of slice says

 lowest layer that encoder can change DCT coding values to manage bit rate

I'm not sure where this explanation come from. The only bit rate related parameter in splice is quantiser_scale_code (ISO/IEC 13818-2 6.3.16) but even this parameter can be changed in macroblock layer.

The purpose of slice is not explicitly explained in the standard, but it's obvious based on the syntax; it's an error propagation preventer. Since all intra predictions and motion vectors are reset at the start of each slice, errors in a splice are not propagated to another slice. —Preceding unsigned comment added by Motonari (talkcontribs) 01:05, 30 September 2007 (UTC)

M2TS[edit]

What about M2TS which has 192 bytes per packet? Mikus (talk) 01:45, 23 January 2008 (UTC)

Nice job on the edit. :-) Thanks! Daniel.Cardenas (talk) 04:32, 23 January 2008 (UTC)

wrong template?[edit]

While the text at the beginning of the article lines nicely with the box on the right, if you look at the subsequent sections you see that the text column (on the left) is too near to the boxes on the right, to the point that it touches them. I suspect it is a bug in the template used, could anyone with the right knowledge correct the problem? --Pot (talk) 13:26, 8 May 2009 (UTC)

Better Start[edit]

It seems to me that computer and IS people have a difficult time properly describing things like this. I can't tell from the article what a transport stream is in a physical sense. Is it just a data format that does not have any particular physical characteristics? Is it a disk file? Is it data that is moving from one place to another via some kind of cable? Or via RF transmission? Is it something else? Or some combination of the above? Where exactly does it fit in the physical world? If it can exist in two or more physical forms, which are more common? I have read this article and many other items on MPEG but am still confused on this point. Shouldn't an article like this, which is intended for the world at large and not just computer specalists, start out with a basic explanation? EPA3 (talk) 18:49, 16 September 2009 (UTC)

It starts by saying that it is a protocol, and goes on saying that it is a digital container that encapsulate various things. Why is it unclear? Are you saying that we should avoid the words protocol and digital container in the first lines and substitute them with more common words? --Pot (talk) 06:50, 17 September 2009 (UTC)

if every article start with a basic explanation in which amatures and nonspecialists can understand easily, then for each subject we should have a lot of unnecessary and repetitive text and articles. it is up to the reader to read prerequisites for the subject. and these prerequisites must be linked to, everywhere which is referenced to in the article. —Preceding unsigned comment added by 91.184.72.22 (talk) 12:08, 7 June 2010 (UTC)

That's fine, but there's nothing wrong with a decent introduction. It's writing fundamentals. 173.11.177.129 (talk) 03:24, 8 June 2010 (UTC)
That's right, but "Decent" does not mean "complicated". Scaring off readers with redundant words such as "multiplexed" and "synchronized" is unwarrented. Fleet Command (talk) 19:31, 8 June 2010 (UTC)
I am not sure that "communications protocol" is an accurate description of an MPEG TS. In fact, it is a multiplexing format that is used for transmission and storage in unreliable environments. --Pot (talk) 15:37, 9 June 2010 (UTC)
Alright then, what do you say to "standard"? Is MPEG TS a standard? How about we change "communication protocol" to "standard"? Fleet Command (talk) 20:34, 9 June 2010 (UTC)
Standard alone is too vague. A "standard format" would be more accurate, but standard is not very informative either. What about A format for transmission and storage ... ? Or A digital format. Or An encapsulation format (maybe more accurate, but also less widely comprehensible. --Pot (talk) 15:45, 10 June 2010 (UTC)
I agree with "standard format". Fleet Command (talk) 23:46, 10 June 2010 (UTC)

SPTS, TP, M2T ?[edit]

I don't think "SPTS", "TP" or "M2T" are widely used abbreviations for describing an MPEG transport stream.

  • What is "TP"? Does that mean "Transport Protocol"? If so, I think it is wrong, because there are various transport protocols.
  • "SPTS" is used for a Single-Program Transport Stream, but AFAIK that is only one particular type of MPEG Transport Stream. There is also MPTS - Multi Program Transport Stream. I think these abbreviations are not typically used for "any" MPEG Transport stream.
  • M2T - I think it is used as a filename extension ".m2t" and not as an abbreviation for MPEG transport stream (or am I wrong?). Filename extensions should be placed in the file type infobox and not as an "other name" for the article. (Look at MPEG program stream article.)

--89.173.66.229 (talk) 17:24, 8 June 2010 (UTC)

Perhaps you are right. Anyways, they lack citations. I'm deleting them. Fleet Command (talk) 19:25, 8 June 2010 (UTC)

Programs that open TS files[edit]

Deleted the section because it is a spam magnet. Perhaps it can be brought back as "notable Programs that open TS files", and require any program to have at least 3 references and or wikipedia article? Daniel.Cardenas (talk) 17:58, 13 December 2010 (UTC) it looks like the section is back with comically few programs listed. It needs to be deleted, expanded, or have the selection criteria detailed.70.75.81.177 (talk) 18:09, 4 March 2012 (UTC)

seems fien to me it has some references and it linked to the programs on wikipedia articles--Andrewcrawford (talk - contrib) 18:28, 4 March 2012 (UTC)
I have split this out to List of programs that open TS files. Doing so has improved the article in my judgement. --Kvng (talk) 17:23, 20 May 2012 (UTC)


How is the data stored in a file (.ts)?[edit]

Byte 1 is always 0x47.

However the next section comprises 2 bytes

Partial Transport Stream Packet Format
Name Number
of bits
Description
Transport Error Indicator (TEI) 1 Set by demodulator if can't correct errors in the stream, to tell the demultiplexer that the packet has an uncorrectable error [1]
Payload Unit Start Indicator 1 1 means start of PES data or PSI otherwise zero only.
Transport Priority 1 1 means higher priority than other packets with the same PID.
PID 13 Pack

This is where the EXACT manner that the data is stored becomes important. While the data is a 16bit integer, remember those 16bits are divided evenly into 2 bytes. And just HOW they are divided into those 2 bytes will depend on how the program I'm about to write will have to go about reading the PID.

The 2 things to look at is BYTE ORDER, and BIT ORDER. The byte order will either be big endian (most significant byte first)or little endian (least significant byte first). And within each byte it can either be MSB first (bit7 first), or LSB first (bit0 first). And so there is a question of exactly which combination is used in an Mpeg2 Transport Stream. And the EXACT combination of these will become very tricky when trying to read data that is not a nice multiple of 8bits, in this case the PID which is 13 bits long, so while it crosses byte boundaries, it does NOT completely fill both bytes.

Therefore BOTH the BIT ORDER as well as BYTE ORDER will be EXTREMELY IMPORTANT for me to know, if I am to successfully write this program that I'm trying to write, who's purpose will be to extract the PID out of every packet of an MPEG2 Transport Stream file.

Please help. Thanks in advance.

76.104.145.19 (talk) 10:50, 17 August 2012 (UTC)


Nevermind the above question, I finally figured it out. I even created a sample program in VB6 that works. It reads and then outputs to a textfile the packet header data from a 188 byte MPEG2 Transport Stream (.ts) file. It's a very simple program, and doesn't really do a lot, but at least it works so far.

Private Type TsPacket
SyncByte As Byte
Flags1(1) As Byte
Flags2 As Byte
TsData(183) As Byte
End Type

Dim Flags1() As Byte
Dim TEI As Boolean
Dim PUSI As Boolean
Dim TP As Boolean
Dim PID As Integer

Dim Flags2 As Byte
Dim Scrambling As Byte
Dim AdaptationFieldIndicator As Byte
Dim ContinuityCounter As Byte


Private Sub Form_Load()
Dim TS() As TsPacket

Open "C:\testvideo.ts" For Binary Access Read As #1
ReDim TS(LOF(1) \ 188 - 1)
Get #1, 1, TS()
Close #1

Open "C:\test.txt" For Output As #2

For n = 0 To UBound(TS)
If TS(n).SyncByte = &H47 Then
Flags1() = TS(n).Flags1()
Flags2 = TS(n).Flags2

TEI = Flags1(0) And (2 ^ 7)
PUSI = Flags1(0) And (2 ^ 6)
TP = Flags1(0) And (2 ^ 5)

PID = 0
For i = 0 To 4
PID = PID + ((Flags1(0) And (2 ^ (4 - i))) \ (2 ^ (4 - i))) * (2 ^ (12 - i))
Next i

For i = 0 To 7
PID = PID + ((Flags1(1) And (2 ^ (7 - i))) \ (2 ^ (7 - i))) * (2 ^ (12 - (i + 5)))
Next i

Scrambling = (Flags2 And 64) \ 64
Scrambling = Scrambling + ((Flags2 And 128) \ 64) * 2

AdaptationFieldIndicator = (Flags2 And 16) \ 16
AdaptationFieldIndicator = AdaptationFieldIndicator + ((Flags2 And 32) \ 32) * 2

ContinuityCounter = Flags2 And 15

Print #2, TEI, PUSI, TP, GetHex(PID), Scrambling, AdaptationFieldIndicator, ContinuityCounter
End If
Next n
Close #2

End Sub


Private Function GetHex(ByVal Value As Integer) As String
GetHex = String$(4 - Len(Hex(Value)), "0") & Hex(Value)
End Function


76.104.145.19 (talk) 12:10, 17 August 2012 (UTC)


I don't think the mask given for PID is correct: 0x1fff00. I believe it should be 0x1fff, being the least significant 13 bits (big endian) Manolan1 (talk) 15:54, 22 April 2020 (UTC)

 Ah, scratch that, I see what you have done! Manolan1 (talk) 15:56, 22 April 2020 (UTC)

PowerPoint Presentation (MPEG2.PPT)Can't Be Opened by Power Point[edit]

Can the file/link be updated or corrected? Jeris0102 (talk) 20:33, 4 June 2014 (UTC)

External links modified[edit]

Hello fellow Wikipedians,

I have just modified 3 external links on MPEG transport stream. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:

When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.

checkY An editor has reviewed this edit and fixed any errors that were found.

  • If you have discovered URLs which were erroneously considered dead by the bot, you can report them with this tool.
  • If you found an error with any archives or the URLs themselves, you can fix them with this tool.

Cheers.—InternetArchiveBot (Report bug) 00:08, 29 May 2017 (UTC)

  1. ^ "TSReader". Coolstf.com. 2008-04-07. Retrieved 2012-05-17. CS1 maint: discouraged parameter (link)