Présentation
Publications
Outils / Tools
Universal TS indexer for Live555
You will need a Microsoft Windows system with the .Net framework version 2.0 or a Linux system. In the following files, you'll find the binaries and the source code (that can be edited with the free Microsoft Visual Studio Express IDE VB.Net edition for the Windows project).
Why a new indexer for streaming with Live555?
When streaming .ts files, they must be indexed (to map the file position with a playing time) if "trick-play" (means browsing the movie forward or backward) functionality is needed. See the dedicated webpage Server 'Trick Play' support for MPEG-2 Transport Stream Files that explains the problem on the Live555 website.
The Live555 project has an indexing tool, "MPEG2TransportStreamIndexer", which can be downloaded from the LIVE555 Media Server webpage. This tool is working very well when video is encoded with MPEG2 video CODEC but cannot index TS files with video encoded using H.264/MPEG4-AVC CODEC.
Workaround
As Ross Finlayson (maintainer of Live555) stated many times, as the question is quite frequently asked, it isn't easy to modify the "MPEG2TransportStreamIndexer" test program for indexing also H.264/MPEG4-AVC video stream.
The basic idea is to make a simpler indexer so it can work with any kind of video stream. Ross Finlayson did a great job with "MPEG2TransportStreamIndexer" as it detects the I-Frame (full frame) in the video stream and index them, so when browsing the file, we always start with a clean picture (without any blocks artifacts). To do that, the indexer must analyze the MPEG2 video stream to find the I-Frames, which is a complex part.
To make something simpler and universal, the following application doesn't try to find the I-Frame but only index the starting of the PES sections handling the video data, only working with common TS packets properties so independent of the kind of video used. This has a major drawback, as we are not sure to point on complete I-Frame when browsing the file, some blocks may appear on the screen.
Limitations and remarks
- As stated before, and as this application doesn't index only I-Frame, some blocks may appear when seeking into the file.
- The "Reverse Play" and "Fast Forward" functins are not supported (it needs I-Frame indexing), only seeking is supported.
- The .tsx file created is really smaller than the original .tsx file created by the "MPEG2TransportStreamIndexer" tool as it stores only PES section starting points.
- The PAT table isn't parsed.
- The first PMT table that is found in the stream is used to find the PCR PID.
- The PMT table must not contain an adaptation field.
- PAT and PMT tables version updates are not supported.
- It is assumed that the PCR PID is also the video stream PID.
- The PCR counter must not overflow (PCR values must be always growing).
- The Windows version is a VB.Net application, running on Windows system with .Net Framework 2.0.
- The Linux version is a C application, running only with depency on libc.
Screenshot (Windows but same output with Linux):
Download the Windows VB.Net project and the binaries: UniversalIndexer-Windows-v1.zip
Download the Linux project and the binaries: UniversalIndexer-Linux-v1.zip