TSReader Support Information

Updated December 7, 2004

Support Information

This document is a FAQ. Please scan through it to see if there's an answer - if not, please send us email. We also suggest reading the README file - it contains lots of useful info, including command-line parameters used by TSReader.

General Issues

What are the two bars at the bottom of the TSReader window?

These both show buffer fullness. If these indicators reach full a buffer overrun has occurred. You should shutdown TSReader and find out which process is taking CPU time up since typically that's what causes these buffers to overrun.

The right-hand indicator shows the fullness of the buffer that's used to keep data coming in from the source (the satellite, cable, terrestrial tuner or a file). If this indicator overflows it's because the main processing thread that TSReader runs to parse the stream can't keep up with the data coming from the source.

The left-hand indicator shows the fullness of the buffer that's used to stream a program out of TSReader when you use the Stradis, XNS, VLC or D-VHS interfaces. If this indicator overflows it's because the destination you're stream to can't keep up with the stream TSReader is sending it.

I've got a problem with TSReader. Is there debug trace information available to help diagnose the problem?

Yes, TSReader has a lot of debug output! You can catch this by running a third-party debug trace program such as dbgvnt:

What do the icons superimposed on the thumbnails mean?

Icon Meaning Defined in Used in
Program video is 4:3 aspect WSS packet DVB
Program video is 14:9 aspect WSS packet DVB
Program video is 16:9 aspect WSS packet DVB
VBI data carried as 4:2:2 encoded monochrome bitmaps Teletext/VBI stream DVB
Program is carrying closed-captions ATSC: User data in the video stream carrying ATSC captions (EIA608)
DVB: Teletext/VBI stream
ATSC
DVB
Program is carring DTV closed-captions User data in the video stream carrying ATSC captions (EIA708) ATSC
Inveterted teletext data Teletext/VBI stream DVB
Redistribution Control PMT descriptor ATSC
Program is carrying subtitles Teletext/VBI stream DVB
Program is carrying teletext Teletext/VBI stream DVB
Program is carrying VPS (Video Program Service) data Teletext/VBI stream DVB
Program is carrying WSS (Wide Screen Signaling) data Teletext/VBI stream DVB

Why do some PIDs on the PID chart have ~ between the percentage and data rate and others have - ?

The PIDs that have the "-" between the mux percentage and bitrate have an accurate bitrate because the PID is carrying PCR packets. As a result, TSReader is able to calculate the exact data rate for this PID. Those that have the "~" character have the bitrate calculated by taking the mux rate divided the percentage of the mux being used by that PID, therefore the results aren't as accurate.

Recording Issues

I recorded an entire transport stream because there were two programs I wanted to capture on at the same time. I now want to split out each of these two programs into individual files. How can I do this with TSReader?

This is called demultiplexing and that's what TSReader's Record Program function is for. It generates a single program transport stream by removing packets that aren't part of the current program and builds new tables to tell the decoder what PIDs the single program is using. Follow these steps to demux the file:

When the files have been demultiplexed and you're ready to do the second program simply click on it's PMT entry and drop the file onto TSReader again.

I recorded a stream with TSReader and want to record to DVD. What do I do?

Answer goes here! Anyone want to volunteer to write this?

What does the "Force PIDs to be ATSC compatible" option in the record program dialog do?

The ATSC system used to have a requirement that specific PIDs were used for the video and audio streams based on channel number within the mux. For example the video stream for program 1 in ATSC should use PID 0x0011 and it's primary audio stream uses PID 0x0014. I'm pretty sure this requirement has now been dropped by the ATSC, but there is probably software out there that uses this model.

Checking this option forces the PMT onto PID 0x0010, the video onto PID 0x0011 and audio to PID 0x0014 which matches channel 1 in the ATSC fixed-PID model. Leaving this unchecked causes PID 0x0020 for the PMT and the video/audio streams use their original PIDs.

What's are the "Defacto" and "ETSI" radio buttons on the record dialog for?

As usual, this MPEG-2 oddity can be blamed on General Instrument which is now part of Motorola. When the MPEG-2 specification was written there was only support for MPEG-1 or MPEG-2 audio. General Instrument wanted to use Dolby AC3 for their audio coding but had no way to tell the receiver that a PID contained AC3 audio because MPEG-2 didn't allocate a PMT type field for AC3 - just for MPEG audio. So GI used one of the user defined PMT types of 0x81 for AC3 and this has now become the standard in North America - it's used on ATSC terrestrial transmissions, Dish Network's DBS service in addition to the Digicipher II system from Motorola.

When Australia was deciding which digital terrestrial standard to use (either DVB-T or ATSC), they decided they wanted DVB-T but with the ability to send either MPEG or AC3 audio. The DVB Group wanted to accomodate the Australians so they did a revision to the specs (which are published by ETSI) and now AC3 is officially supported in DVB. The problem though is that DVB used a different way to tell the receiver that an AC3 stream was present - they used PMT type 0x06 which had previously been used pretty much only for Teletext in Europe. To let receivers know that there's an AC3 stream there (and not Teletext), a special descriptor is included with the PMT - if the receiver sees this registration descriptor and it's the right value, then the receiver can conclude the stream is AC3.

On the input side, when TSReader looks at a stream it can handle either "Defacto" or "ETSI" ways of doing non-MPEG audio. The following table lists the additional audio formats supported by TSReader:

PMT Type Descriptors Resulting Audio
0x06 AC-3 descriptor AC3
0x06 BSSD descriptor LPCM
0x06 DTS1/DTS2/DTS3 descriptor DTS
0x81 None AC3
0x83 None LPCM
0x85 None DTS

The "Defacto" and "ETSI" options are only used for recording or streaming from TSReader. TSReader always adds descriptors to the stream regardless of whether the PMT type is Defacto or ETSI.

Audio Stream Defacto/ETSI Resulting PMT Type
AC3 Defacto 0x81
AC3 ETSI 0x06
DTS Defacto 0x85
DTS ETSI 0x06
LPCM Defacto 0x83
LPCM ETSI 0x06

Playback & Streaming Issues

How do I play a channel with XBox Media Player?

This assumes you've already got XBox Media Player operational and you know how to FTP into your XBox.

<share>
 <name>TSReader via XNS</name>
 <url>c:\@10.10.10.15</url>
 <cachesize>8192</cachesize>
</share>

How to do I play a channel with XBox Media Center?

Same guidelines for XBox Media Player, but the XML is slightly different. You need to:

<bookmark>
 <name>TSReader via XNS</name>
 <path>xns://10.10.10.15:1400/</path>
</bookmark>

What are the steps to stream over a network using TSReader and VLC?

Let's imagine your PC with the card running TSReader has an IP address of 1.2.3.4 and the computer you want to stream to is 4.3.2.1.

:sout=#duplicate{dst=std{access=udp,mux=ts,url=4.3.2.1:1235}}

<IP> :sout=#duplicate{dst=std{access=udp,mux=ts,url=4.3.2.1:1235}}

You now may want to experiment with the Stream Output settings. For example you can check the audio and video transcode options and reduce a high-bandwidth MPEG-2 stream into an MPEG-4 stream to send over the Internet. Obviously lots of bandwidth and fast processors on both ends are required to make this reliable.

What are the steps required to stream to a Roku HD-1000?

Follow these steps:

Roku HD1000 IP/Name IP address of the Roku HD-1000. This can be obtained by selecting the Setup option on the Roku HD-1000. It's shown at the top the screen.
Username root
Password (blank)
MpegPSPlay Location /mnt/flash1

Stream Issues

Please explain what continuity errors mean?

An MPEG-2 transport stream contains data in 188-byte packets. The first four byes of each packet are header and flags and then there's 184 bytes of payload data - video, audio, tables, IP data -- you name it.

In the header, there's a 13-bit field (range 0-8191 decimal) which is the Packet ID (PID) of the packet currently being sent. There is also a four bit field (range 0-15) called the continuity counter. This field increments for each packet sent on that PID. For example, one might see a sequence like:

PID 0 - continuity 0
PID 1 - continuity 0
PID 0 - continuity 1
PID 0 - continuity 2
...
PID 0 - continuity 15
PID 0 - continuity 0
PID 1 - continuity 1
PID 0 - continuity 2

This field is used by receivers (and programs like TSReader) to make sure that the transport stream data is continuous, i.e. it hasn't lost packets. If a receiver tracks the continuity it can determine if packets on a particular PID were lost -- for example if the satellite signal is interrupted. It handles cases except the case when exactly 16 packets (or multiples of 16 packets) were lost on a single PID which is unlikely.

So, given that they indicate packet loss, there are a few reasons why you might see continuity errors displayed in TSReader:

The general rule is that if you see only one or two continuity errors per second you're probably OK but if the continuity counter increments quickly, there's something wrong.

What about TEI errors?

Most MPEG-2 networks use some form of forward error correction on the stream as it is transmitted so that errors in stream as seen by the receiver can be corrected. Some MPEG networks use multiple error correction schemes because they "do better" handling different types of interference to the transmitted signal. Generally speaking most MPEG networks use at least the Reed-Solomon error correction algorithm. On MPEG networks this error correction code can fix up to eight errored bytes in each transport stream packet with only a 16 byte overhead.

However, if the Reed-Solomon decoder isn't able to correct the errors (too many of them), demodulators change a bit in the transport stream header to tell the demultiplexor that the packet has an uncorrectable error. This is flag is called the Transport Error Indicator or TEI.

What causes "ES has been blacklisted" when I click on an elementary stream?

TSReader tries to figure out encoder parameters for video and audio streams it encounters in the mux. To do this, it demultiplexes the transport stream packets associated with the stream down to PES packets which is what's really carried on the PID. Once TSReader has built a PES packet, it scans the packet to find the encoder parameters - resolution and framerate for video, bitrate and sampling frequency for audio for example.

There are a number of things that can prevent TSReader from doing this right. For example, if the transport stream packets being looked at have the scrambled bits set (indicating a scrambled stream), TSReader ignores that stream. This situation doesn't cause blacklisting because the stream might later be scrambled, but say for example that an encoder is setup to generate a video stream and two audio streams and both are described in the PAT/PMT in the mux. Imagine the encoder has a problem and is acutally only outputting one audio stream - TSReader has been told via the PAT/PMT that a stream is there but no packets are received on that PID and as a result, the code that's trying to parse the elemetary streams hangs waiting for that data on the PID.

So, ES blacklisting occurs when TSReader encounters a stream that:

What are manual channels and how do I define them?

TSReader is able to determine which PIDs are carrying the video and audio streams that make up an MPEG-2 delivered channel by looking at the PAT and PMT that are carried as part of a standard MPEG-2 transport stream. Sometimes broadcasters elect not to send these tables - TSReader can't figure out which are audio and video without manual defining them.

For this example we'll define the three channels that are in the Warner Brothers mux on Galaxy 11 3720 H 26.700 MSps. These channels will not show up on any receiver unless you manually define the channel since the mux doesn't contain a PAT or PMTs.

Looking at the Galaxy 11 page on Lyngsat we see that there are three channels with the following PIDs:

Channel Video PID Audio PID
WB East 101 102
WB West 201 202
Feeds 301 302

First thing to do is to convert the PIDs into hex since TSReader requires hex input for manual channels. This can be easily done using the calculator that comes with Windows. You need to switch it to Scientific mode which is on the View menu. Once this is done, make sure the Dec button is selected, type the PID in decimal and then click the Hex button - you'll then see the PID in hex.

Channel Video PID (hex) Audio PID (hex)
WB East 65 66
WB West c9 ca
Feeds 12d 12e

Now launch TSReader and click on File, Define Manual channels. On the dialog that's shown, click the Add... button and you'll see this dialog:

Follow these steps to setup the first manual channel:

If you wanted to add more elementary streams to the channel (for example multiple audio streams for multi-lingual channels) you'd continue as shown above, but since we've added all the elementary streams, hit OK for now.

You can now define the remaining channels and once done, we suggest saving the manual channels to a file should you tune that mux again.

These manual channels can be treated just like regular channels - recording and streaming will work just like other channels provided you got the parameters right of course!

MultiDec API

How do I make plug-in modules written for MultiDec (and a bunch of other programs like MyTheater and ProgDVB) work with TSReader?

Simply put the files into a folder called MDPlugins in the TSReader folder. The plug-in's menu should then show up in TSReader next time it's launched.

What MD-API commands are supported by TSReader?

Name Supported Function
MDAPI_GET_PROGRAMM_NUMMER Yes Returns current program number. User must select a program by clicking on a PMT entry in TSReader for this to return meaniful data.
MDAPI_GET_VERSION Yes Returns API version number. TSReader sends "MD-API Version 01.02 - 1.04"
MDAPI_SET_PROGRAMM_NUMMER    
MDAPI_GET_TRANSPONDER    
MDAPI_SET_TRANSPONDER    
MDAPI_SET_PROGRAMM    
MDAPI_GET_PROGRAMM    
MDAPI_RESCAN_PROGRAMM    
MDAPI_SAVE_PROGRAMM    
MDAPI_SCAN_CURRENT_TP    
MDAPI_SCAN_CURRENT_CAT    
MDAPI_START_OSD    
MDAPI_OSD_DRAWBLOCK    
MDAPI_OSD_SETFONT    
MDAPI_OSD_TEXT    
MDAPI_SEND_OSD_KEY    
MDAPI_STOP_OSD    
MDAPI_START_FILTER Yes Allows a plug-in to receive transport stream packets from a specified PID. TSReader allows up to 256 filters active at any one time. Data is sent as 184 byte packets (i.e. no transport stream header) with 9 packets sent at a time.
MDAPI_STOP_FILTER Yes Stops data flow as a result of the MDAPI_START_FILTER.
MDAPI_DVB_COMMAND Partial TSReader only supports CA key messages to be passed to CSA.DLL. CSA.DLL implements the DVB Common Scrambling Algorithm and is not included with TSReader but can be easily located on the Internet.

What special MD-API commands are supported by TSReader?

TSREADER_MDAPI_GET_PIDS 0x01030000 Returns a pointer to a PID active list. List is 8192 bytes long, one byte per PID. If the PID is active a 1 is returned - if the PID is active and scrambled a 2 is returned. 0 means no activity on that PID. You must free up the returned buffer with LocalFree().

How can I receive the entire transport stream packet in a MultiDec plugin?

When you setup the PID filter in your plugin, set the top bit of the 16-bit PID field, i.e. nPID |= 0x8000. You'll then recieve 188 byte packets in the filter one at a time (or 131 bytes if in DSS mode). Without this bit set, MultiDec plugins get five transport packets with the four byte transport packet header from each packet missing for a total of 920 bytes at a time.

Source Issues

I selected the wrong source - how can I change it?

Launch TSReader with the Ctrl key held down - you'll then be asked to choose a source again.

I've built my own satellite interface. How can I get TSReader to communicate with it?

Write a TSReader source module. This is a standard DLL that provides the interface between TSReader and all hardware. There's a sample TSReader source provided in source-code format in the TSReader\SampleSource folder.