[mythtv] DVBCam Class

Jason Hoos jhoos at thwack.net
Tue Sep 21 16:01:41 EDT 2004


>  From a limited observation following the lists here: I think the hdtv 
> works by decoding the TS and repacking into a new ts with constant (and 
> new) pid's.  I'm not sure why that is done though...?

This is indeed what the HDTVRecorder class does.  There are two aspects
to it, stripping extra program streams and rewriting the PIDs.  The
stripping of unneeded streams was done simply to save disk space.  

The PID rewrite was done to work around a bug in the ffmpeg decoders -
they would break in LiveTV mode if you changed stations and the new
station used a different PID than the previous one, since the codec had
already locked onto the old PID.  Doug Larrick put that fix in; later on
I added the code that actually rewrote the PID tables to match what was
really left in the stream, since ffmpeg was also having some trouble
dealing with PMTs from stations by me that had their streams listed in
reverse order.  

Later on Doug expanded on that work to allow for selecting different
subchannels from the transport stream, at which point the rewriting of
PIDs to constant known values came into play.  The basic idea there was
to have HDTVRecorder pick the stream it wanted, rewrite it to a known
PID to keep ffmpeg happy, and save it to the file.

As to whether doing all that results in reducing the TS to a PS, I have
no idea.  From ffmpeg's perspective at least, it's still a transport
stream.

Jason




More information about the mythtv-dev mailing list