[vlc-devel] Re: Packetizer use within demux module

Neal Symms nsymms at redwar.us
Sat Mar 5 21:45:14 CET 2005

Sigmund Augdal wrote:
> On Sat, Mar 05, 2005 at 01:04:18PM -0600, Neal Symms wrote:
> > I'm writing a demux module for VLC that will demux .TY format
> files (data
> > extracted from TiVo devices).  [...]
> I guess there is. I don't personally have a TiVo, but I do see
> the value of
> such a feature. Could you perhaps say a few words about this format?
Sure I can say a few words.  I'm not an expert, but I've dealt with the
format quite a bit over the past few years.  I'll keep things at a high

The TiVo format is what I call a proprietary transport stream, with some
minor modifications to the embedded MPEG program stream.  The elemental data
is MPEG2 video with either AC3 or MPEG audio.  The transport stream data is
in 128K chunks, with a header describing the audio / video / closed-caption
/ extended-data records in this chunk.

The tricky part is that the format isn't the same for each TiVo model.
There are differences between "stand-alone" models, "DirectTV integrated"
models, those in the UK, Series 1 (older) vs. Series 2, Hi-Definition, etc.
The differences can be low-level like how many bytes are in the PES headers
or high-level like "stand-alone" models don't have AC3 audio.  And there's
no marker in the stream that says "this is model X".  You simply have to
derive which version of data you have.

The video data is very similar to a normal MPEG2 video stream, and VLC can
almost play the video from a TY file without any assistance.  I say almost
because the extra data in the chunk headers and the funny PES formats don't
decode well.  My demux module basically strips out the PES headers, sets the
PCR with PTS, and sends the data to the codec (libmpeg2).

Handling the audio data is essentially the same as the video.  The
difference is there's detection logic to see what type of audio data we have
(AC3/MPEG) and what type of unit this data came from so that we can properly
parse PES headers.

I currently discard the closed-caption information because I don't think VLC
can yet handle streaming subtitle data.

Also, in the past couple of months, TiVo has come out with a new ".tivo"
format for extracted files which has encrypted video & audio.  They call it
"TiVo to go".  I suppose a demux for that is my next project. :)


This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html

More information about the vlc-devel mailing list