Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: Replex problems with full TS



Le Samedi 30 Octobre 2004 20:07, Soyeb Aswat a écrit :

> vpid 1: 0x0280 (640)  PES ID: 0xe0
> apid 1: 0x0012 (18)  PES ID: 0xd4
> vpid 2: 0x0262 (610)  PES ID: 0xe0
> apid 2: 0x026d (621)  PES ID: 0xc0
> apid 3: 0x0259 (601)  PES ID: 0xc0
> vpid 3: 0x0258 (600)  PES ID: 0xe0
> apid 4: 0x0264 (612)  PES ID: 0xc0
> apid 5: 0x0281 (641)  PES ID: 0xc0
> apid 6: 0x0263 (611)  PES ID: 0xc0
> vpid 4: 0x026c (620)  PES ID: 0xe0
> apid 7: 0x025a (602)  PES ID: 0xc0
> apid 8: 0x028c (652)  PES ID: 0xc8
> apid 9: 0x028b (651)  PES ID: 0xc5
> apid 10: 0x026e (622)  PES ID: 0xc0
> apid 11: 0x028a (650)  PES ID: 0xdc
> vpid 5: 0x0012 (18)  PES ID: 0xe8
> vpid 6: 0x028c (652)  PES ID: 0xe2
> vpid 7: 0x028a (650)  PES ID: 0xe2
> vpid 8: 0x028b (651)  PES ID: 0xe2
> apid 12: 0x0011 (17)  PES ID: 0xd2

since i guess you want to retrieve a single channel from this full ts, you 
have to find the right vpid/apid pair (from your channel.conf or whatever)

if replex fails again, you can try to compile this:

----------------------
/* save as ts2ts.c*/
/* compile with gcc -o ts2ts ts2ts.c*/

#include <stdio.h>
#include <unistd.h>

int main(int argc, char **argv)
{
  int pid, pid1, pid2, n;
  unsigned char buf[188];

  pid1=atoi(argv[1]);
  if ( argc >2 ) pid2=atoi(argv[2]);
  else pid2 = -1;

  fprintf(stderr,"filtering PIDS : %d %d\n",pid1,pid2);

  for (;;) {
    n=fread(buf,1,188,stdin);
    if (n==188) {
      pid = (((buf[1] & 0x1f) << 8) | buf[2]);
      if (pid1==pid || pid2==pid ) fwrite(buf,1,188,stdout);
    }
  }
}

-----------------

and run :

cat your_ts_file | ts2ts decimal_vpid decimal_apid > single_channel_ts_file

and then :
replex -i TS -t MPEG2 single_channel_ts_file > replexed_file.mpg


-- 
Christophe Thommeret




Home | Main Index | Thread Index