Skip to content

c21mcardenas/tsetr290

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tsetr290

Validate Transport Streams Useful for checking standards compliance of transport streams before sending for broadcast. Some code blatantly ripped from tstools from zhoucheng and opencaster.

I'm not a educated programmer so any improvements or wtf's feel free to let me know or make it better yourself. Python GUI for this will be made in another repo.

git clone https://github.com/Emerica/tsetr290.git
cd tsetr290
make
./tsetr290 filname [bitrate] [reports]
./tsetr290 mytestfile.ts
./tsetr290 mytestfile.ts 15000000

make install

tsetr290 filname [bitrate] [reports]
tsetr290 mytestfile.ts
tsetr290 mytestfile.ts 15000000 1

OR with docker/bind mount

%SOURCEDIR% = A directory with TS files you want to scan.

%MEDIAFILE.ts% = A Transport Stream in the directory

%BITRATE% = The expected bitrate (optional)

%REPORTS% = Optional reports (optional)

git clone https://github.com/Emerica/tsetr290.git
cd tsetr290/docker
docker build -t tsetr290:latest .
docker run -i -t --mount type=bind,source="%SOURCEDIR%",target=/scan tsetr290:latest \ 
  /usr/local/bin/tsetr290 "/scan/%MEDIAFILE.ts%" %BITRATE% %REPORTS%

If bitrate is not supplied it will be calculated from the PCR values. This is not optimal if you are looking for a proper report. Timing accuracy will suffer until the rate has been established.

If reports is set, a set of delta reports will be created which can be graphed.

Most checks that don't require buffering have been implemented, possibly incorrectly. I haven't had a need to pass L3, most providers on seem to require L1 and L2. Feel free to implement the remaining checks.

Links to the refference decoder would help here. mpeg2dec? It seems mpeg.org has had a Joomla problem for weeks and hasn't been bothered to fix it.

alt text

1.0

  • 1.1 - ERROR - TS_sync_loss
  • 1.2 - ERROR - Sync_byte_error
  • 1.3a - ERROR - PAT_error - spacing exceeds 500ms
  • 1.3b - ERROR - PAT_error - table_id is invalid
  • 1.3c - ERROR - PAT_error - scrambling control is not 0
  • 1.4 - ERROR - Continuity_count_error
  • 1.5a - ERROR - PMT_error - spacing exceeds 500ms
  • 1.5b - ERROR - PMT_error - PMT table_id is invalid
  • 1.5c - ERROR - PMT_error - scrambling control is not 0
  • 1.6 - ERROR - PID_error - PID not found in PMT

2.0

  • 2.1 - ERROR - Transport_error - Transport_error indicator is 1
  • 2.2 - ERROR - CRC_error - Calculated CRC for X
  • 2.3a - ERROR - PCR_error - PCR delta is greater than 100ms
  • 2.3b - ERROR - PCR_error - PCR delta is greater than 40ms
  • 2.4 - ERROR - PCR_accuracy_error - PCR jitter is greater than 500ns
  • 2.5 - ERROR - PTS_error - PTS spacing greater than 700ms
  • 2.6a - ERROR - CAT_error - transport_scrambling_control set, but no section with no CAT present
  • 2.6b - ERROR - CAT_error - Section with table_id other than 0x01 found

3.0

  • 3.1a - ERROR - NIT_error - Section with table_id other than 0x40 or 0x41 or 0x72
  • 3.1b - ERROR - NIT_error - NIT spacing on pid %d is greater than 10000ms
  • 3.2 - ERROR - SI_repetition_error Repetition rate of SI tables outside of specified limits (25ms)
  • 3.3 - ERROR - Buffer_error TB_buffering_error 🚧
  • 3.4 - ERROR - PID_error - PID found in stream, not in PMT
  • 3.5a - ERROR - SDT_error - SDT packets not found in stream
  • 3.5b - ERROR - SDT_error - Section with table_id other than 0x42, 0x46, 0x4A or 0x72
  • 3.6a - ERROR - EIT_error - Sections with table_id = 0x4E not present on PID 0x0012 for more than 2 seconds
  • 3.6b - ERROR - SDT_error - Sections with table_ids other than in the range 0x4E - 0x6F or 0x72
  • 3.7 - ERROR - RST_error - Sections with table_id other than 0x71 or 0x72 fo
  • 3.8a - ERROR - TDT_error - TDT packets not found
  • 3.8b - ERROR - TDT_error - Section with table_id other than 0x70, 0x72, 0x73
  • 3.9 - ERROR - Empty_buffer_error Transport buffer (TBn) not empty at least 🚧
  • 3.10 - ERROR - Data_delay_error Delay of data (except still picture video data) 🚧

About

ETR 290 Reporting for MpegTS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 87.3%
  • HTML 9.7%
  • Python 2.0%
  • Makefile 1.0%