Click here to Skip to main content
6,629,885 members and growing! (21,427 online)
Email Password   helpLost your password?
Languages » C# » Applications     Intermediate

Transport Stream Analyzer for HDTV standard

By ro_angel_bv

A program that analyzes a transport stream.
C#.NET 1.0, Win2K, WinXP, Win2003, Dev
Posted:7 May 2004
Views:95,302
Bookmarked:46 times
Announcements
Loading...
 
Search    
Advanced Search
Add to IE Search
printPrint   add Share
      Discuss Discuss   Broken Article?Report  
32 votes for this article.
Popularity: 6.46 Rating: 4.29 out of 5
3 votes, 9.4%
1
2 votes, 6.3%
2

3
5 votes, 15.6%
4
22 votes, 68.8%
5

Intro

This program deals with Transport Stream files. Basically, Transport Stream means one or more streams (usually, MPEG-2 files) multiplexed into a single stream. That's what the HDTV is using (the digital television).

The concept:

A Transport Stream consists of fixed length packets. There can be more sizes but the standard one is 188 bytes. A packet can contain info from a Program Stream, can be a null packet, a Program Association Table or a Conditional Access Table. The PID is the field deciding the packet.

Mainly, the TS packets transport data from Program Streams at a fixed bit rate which must be greater than the sum of Program Streams bit rate. For example, if a standard MPEG-2 is encoded at a few Mbits per second, the Transport Stream usually has bigger bit rate values.

To better understand the composition of a Transport Stream, take a look at the picture below:

Sample screenshot

The program:

TS_Analyzer reads each packet from the input stream and analyzed it. You can view the packets as a graphical display of fields, or use the "write to file" option to list individual packets info or statistics.

I know that a Transport Stream is not so easy to find as a MPEG-2 file, so I've included a sample at the downloads section above. If you'll play this sample with Media Player, you'll hear about 1s of sound, and if you have the appropriate codec, you'll also see an image. It's a small part (4000 packs) of a larger transport stream (about 400,000 packs) but can give you an idea about the concept. Another player you can use is DVD2AVI.

If you would like to try a real transport stream, download mp2tsmpdex.exe from here. This is a Transport Stream Demo producer that will give you a 10s transport stream that can be analyzed by my program.

To use the program, just read the readme file included.

Main window:

Sample screenshot

This is how the program looks when you start it.

Browse window:

Sample screenshot

This is the browse window used to change the current directory.

Analyzer window:

Sample screenshot

That's how the analyzer window looks.

Output text file "tsinfo.txt":

That's what you'll see in the output text file after processing a Transport Stream:

Sample screenshot

Output text file "ts_stats.txt":

These are statistics about your input Transport Stream:

Sample screenshot

Author notes:

I don't really know of how much interest this subject really is. It's not a very known one and might not be the thing you're looking for. Still, the HDTV standard uses it and some VPN networks also. It's fun to see how digital TV signal is formed, and surely this is not an obsolete subject.

For impressions regarding this program or discussions related to this subject, feel free to contact me by e-mail (ro_angel_bv@hotmail.com or ro_angel_bv@fastmail.fm).

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

ro_angel_bv


Member
Dumitru Bogdan - alias Angel

Born 1980 , Brasov , Romania

Final year student at Transilvania University of Brasov , Faculty of Electrical Engineering & Computer Science , Department of Electronics & Computers

Programming : Visual C++ , Visual Fox Pro , Assembler & later , C#

Motto : "Nothing Last Forever" , and software is no exception
Occupation: Web Developer
Location: Malaysia Malaysia

Other popular C# articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 14 of 14 (Total in Forum: 14) (Refresh)FirstPrevNext
GeneralHow to Create Transport Stream file Pinmemberanujverm0001:36 14 Jul '09  
GeneralHow to get frame type PinmemberSudhanshu Gupta20:29 23 Dec '08  
GeneralBit rate information PinmembervishwamysTEL23:39 25 Oct '07  
GeneralRe: Bit rate information PinmemberTrollslayer1:01 24 Aug '08  
GeneralI wanna analise the TS Pinmemberlaxmiprashanth22:02 19 Jul '07  
GeneralMacro-Block DCT Coefficients of MPEG-2 TS PinmemberAniket Salunkhe0:18 15 May '07  
Generalgreat Pinmembermars_mars16:45 14 Nov '06  
GeneralThanks! PinmemberRadha Krishna. S.21:43 27 Feb '06  
GeneralBitrate Pinmemberdavid_I23:47 14 Dec '05  
GeneralI found a bug in your program Pinmembermatt ting13:47 1 Dec '05  
Generalnewbi PinsussAnonymous9:54 23 Jun '05  
GeneralHow to playback the Transport Stream file? Pinmemberxiyuxi30007:30 13 Apr '05  
GeneralRe: How to playback the Transport Stream file? PinsussAnonymous7:23 17 Apr '05  
GeneralD-VHS VCR Emulation Pinmembertomdoyle6:12 28 Jun '04  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 7 May 2004
Editor: Smitha Vijayan
Copyright 2004 by ro_angel_bv
Everything else Copyright © CodeProject, 1999-2009
Web21 | Advertise on the Code Project