Page 1 of 1

TBS690B ASI Output Card

PostPosted: Tue Jan 28, 2020 1:27 am
by smallishzulu

With latest driver, I was able to access to TBS690B 4 Output ASI Playback Card.

root@server:/opt/tbs/new/media_build# ls -la /dev/tbsmod0/mod*
crw------- 1 root root 168, 0 Jan 27 18:52 /dev/tbsmod0/mod0
crw------- 1 root root 168, 1 Jan 27 18:52 /dev/tbsmod0/mod1
crw------- 1 root root 168, 2 Jan 27 18:52 /dev/tbsmod0/mod2
crw------- 1 root root 168, 3 Jan 27 18:52 /dev/tbsmod0/mod3

I was able to give ASI out by;
/opt/penc/sbin/multicat -u -U -f -P -C @ /dev/tbsmod0/mod0

Yet, my input is only 1Mbit, however I see ~96 Mbit output.
How can I limit the ASI output to a lower Mbit ? Such like 7 MBit ?

Is this configurable ? I checked the source code; ... d/tbsmod.c

I found;
//default to 114M,122M,130M,138M
buff[2] = 0x5c;//0xC2;
buff[1] = 0x8f;//0xF5;
buff[0] = 0xc2;//0x28;

Is the buffer staticly configured for TBS cards ?
If so, it will be very useful to make it dynamic for ASI output.


Re: TBS690B ASI Output Card

PostPosted: Thu Jan 30, 2020 11:43 am
by daowei
Hi smallishzulu,
To modify the driver (code) is not a good solution. We have software (named remux) for TBS690B, please use ours. I think your app does not add the feature to set the bitrate. It already have an interface to set the bitrate in driver, ours (remux) is ready. Parameter "-B" is to set/limit the bitrate. Please download and install:
Ubuntu: ... 14.tar.bz2
centOS: ... 14.tar.bz2

It's webUI control, acess: username/password "root/root", you can also try command line, apply in webUI, login to your system to find out the app(remux) path, configuration path, edit the configuration.
Waiting for your feedback.


Re: TBS690B ASI Output Card

PostPosted: Thu Jan 30, 2020 11:46 am
by daowei
TBS690B is using a same software as TBS6004 (another modulator card).


Re: TBS690B ASI Output Card

PostPosted: Sun Feb 02, 2020 9:37 pm
by smallishzulu
Dear Daowei,

Thank you for the information and the links.
I will be able to check it tomorrow.

We are using the cards in an embedded project.
Is it possible to share a C code block or CLI command on how to limit bitrate ?

As far as I see, just sending data (Multi Program Transport Stream) to /dev path of the device is enough to get ASI output. So only limiting bitrate information is needed by us.

(BTW, it is so great that card can correct PCR and accept waving UDP input. Good work!)

It will be more useful for us to not to install a webgui just for limiting bitrate. Because we have our own UI in our project and we don't want consumers to go in to 2 different UIs.

Kind Regards,

Re: TBS690B ASI Output Card

PostPosted: Mon Feb 03, 2020 1:57 pm
by daowei
Thanks for your information.
As our driver Engineer told me, in TBS690B driver/code, it already have the interface to set/limit the bitrate. And also, need to add your software/app (write IP stream to TBS690B) to support set/limit bitrate.
TBS690B card driver side and your software/app need to work together (something like this, my English not good, didn't explain you so clear).
You can try write to our driver Engineer to talk wih her more detailed about the "interface":
We're still on Spring Festiva holiday these days, maybe the reply will be delay.

And our software/app (Remux), we'll not open the source code, but i think we an compile one which can be running in your embeded platform (need to provide us the compiling enviroment). You can test our software/app first, to know about about how to set/limit the
bitrate. It did support command line, just find out where's the "remux" path, and the configuraiotn files. It should be in "/tmp/tbs/xxx". It's one or my collegues who's working on this, not me. You can run in webUI then go to system to check the "processing" by "top" or "ps".


Re: TBS690B ASI Output Card

PostPosted: Mon Feb 03, 2020 8:41 pm
by smallishzulu
Dear Friend,

We figured out how to limit the bitrate. A simple C code from us on limiting the bitrate:

Code: Select All Code
#include "stdio.h"
#include "stdlib.h"
#include "unistd.h"
#include "sys/ioctl.h"
#include "fcntl.h"
#include "mod.h"

int main(int argc, char * argv[]) {
    printf("ERROR:  Usage: ./setrate <device> <rate>\n");

  char *dev = argv[1];
  int rate = atoi(argv[2]);
  int fd;
  struct dtv_property p;
  struct dtv_properties c;
  c.num = 1;
  c.props = &p; = rate;

  if ((fd = open(dev, O_WRONLY | O_NONBLOCK))<0) {
    printf("Device open failed.\n");

  if (ioctl(fd,FE_SET_PROPERTY,&c)<0) {
    printf("Bitrate set failed.\n");

  printf("Bitrate is set.\n");

Yet, from the ioctl strtucture we see that it is only possible to set in integer numbers.
We can not set floating like 12.323 Mbps. Do you have any plan to improve it ?

We also understood how you join the streams via "remux" app. We are using a very similar application to make MPTS.
Yet, we feed the ASI card via multicat application ( as below:

/opt/penc/sbin/multicat -u -U @ /dev/tbsmod0/mod0

I think; if anyone has a MPTS stream in hand already, can use multicat to feed the card.

Kind Regards,

Re: TBS690B ASI Output Card

PostPosted: Mon Feb 24, 2020 11:34 am
by luchy
Hi smallishzulu,

Please forgive me for my late reply. I checked your code that you have correctly got it. yes, It's only possible to set in integer numbers, because the value will be passed to driver, the driver only deals with integer number.
best regards,