Categories: homepageUncategorized

Transport Stream dataflow

Hello everybody! This post describes how Transport Stream dataflow within the Joker TV universal USB DTV receiver. All described functionalities are written on Verilog and run on Altera FPGA (EP4CE22F17C8N). The firmware is fully open source and can be found here.

I have also prepared the following diagram for a better understanding:

As you can see, we have quite a few Transport Stream (TS) sources:

  • DVB-S2/T2/C2/ISDB-T demodulator (Sony CXD2854ER)
  • ATSC demodulator (LG LGDT3306A)
  • DTMB demodulator (AltoBeam ATBM8881)
  • Transport Stream generator – produces Transport Stream packets and fill them with a predefined pattern. This pattern can be used on the host’s side for data correctness control; written on Verilog.
  • USB EP4 – receive Transport Stream from host using USB bulk transfers. Can be used to pass data through Joker TV, for example for descrambling with CAM.

One of this source can be selected for further processing. This Transport Stream contains all packets without any filtration (Full TS). However for some reason, we need to exclude (strip) some Transport Stream packets. For example, full TS contains 10 TV programs but we only need one program. In this case Joker TV can pass packets that belongs only to this one program. This functionality is implemented inside the “TS PID filtering” block.

Then filtered Transport Stream can be passed to a CAM module (if present) for descrambling. In the final stage, TS is passed back to host using USB isochronous transfers. I have described this in a separate post here.

Transport Stream PID filtering example

Example, of Transport Stream PID filtering usage (you can pass multiple –program arguments to choose more than one program):

$ joker-tv -d 11 -f 575000000 -b 6000000 -m 7 --program 3 
selected program 3 
TS outfile:out.ts

This command is tuned to 575MHz ATSC (broadcasts NBC channel in Miami, FL) and save TS only for programs with the number 3. We can check this with following command:

$ ffmpeg -i out.ts

Input #0, mpegts, from 'out.ts':
 Duration: 00:00:03.49, start: 49891.352478, bitrate: 16393 kb/s
 Program 3 
 Stream #0:0[0x31]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, top first), 1920x1080 [SAR 1:1 DAR 16:9], Closed Captions, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
 Stream #0:1[0x34](eng): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, 5.1(side), fltp, 384 kb/s
 Stream #0:2[0x35](spa): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, stereo, fltp, 192 kb/s

As you can see out.ts file contains only one program with one video PID 0x31 and two audio PID’s – 0x34 (English) and 0x35 (Spanish).

Conclusion

Joker TV is based on FPGA and has “endless” possibilities to implement any required functionality for TS processing. I’m open to discuss any proposals where possible.

Abylay Ospan

Share
Published by
Abylay Ospan

Recent Posts

  • EV
  • Solar

Floridian Unlimited – rollable solar panel for Electric Vehicles (EV)

I use "Floridian Unlimited" prototype in this video. 400W and 1000W models are planned. For instance, 1000W model can gives…

5 years ago
  • EV
  • Solar

Open Electric Car project

Open eCar Open Source Software for Electric Vehicle (EV) Open eCar project is open source software for electric car. The…

6 years ago
  • Uncategorized

Joker TV hardware functional testing with OpenHTF

Joker TV hardware functional testing with OpenHTF Functional Testing of PCBs is always used as a final manufacturing step. Functional…

6 years ago
  • Uncategorized

DTMB TS dumps (China)

Following TS dumps created on January 2018 in Changsha, Hunan Province, China. DTMB dump (722MHz) sands-722mhz.ts (50MB) This stream plays without problems…

6 years ago
  • Uncategorized

DVB-S/S2 blind scan with Joker TV

Hello everybody! This post describes satellite transponders (DVB-S/S2) blind scan with Joker TV’s universal USB DTV receiver.  Firstly, I will…

6 years ago
  • homepage
  • Uncategorized

High bandwidth USB Isochronous transfers

Hello everybody, this post describes data transfer over USB from Joker TV to a host using high bandwidth USB isochronous transfers…

6 years ago