[Live-devel] TS indexer not support video codecs except mpeg1 and mpeg2

choujs qiujianshu at cnc-labs.com
Sat Jul 12 16:46:55 PDT 2008


Hi,

The tool program MPEG2TransportStreamIndexer can not create index file for TS file that include video ES of codec such as MEPG4 and H.264. I think the reason is in file MPEG2IndexFromTransportStream.cpp, line 309(function MPEG2IFrameIndexFromTransportStream
::analyzePMT):

if (stream_type == 1 || stream_type == 2 ) {
      fVideo_PID = elementary_PID;
      return;
    }

That means the indexer can accept only MPEG1 and MPEG2.
To deal with this program, I have modified these lines as below.

if (stream_type == 1 || stream_type == 2 || // mpeg1, mpeg2
  stream_type == 16 || stream_type == 27 || // mpeg4, h264
  stream_type == 66 || stream_type == 234 ) // Chinese AVS, VC1
 {
      fVideo_PID = elementary_PID;
      return;
    }

Now the MPEG2TransportStreamIndexer can create index file for TS file of H.264 successfully. But just 'create', I have not check whether the created index file is correct or not.



More information about the live-devel mailing list