[linux-dvb] How to extract several PID's from a TS

Trent Piepho xyzzy at speakeasy.org
Thu Mar 30 21:15:56 CEST 2006


On Thu, 30 Mar 2006, christophe wrote:
> Hello,
> How can i extract several video and audio data packets from only on
> transport stream, using only one DVB card ?

> Maybe i should use several /dev/dvb/adapter0/dvrx interfaces and tell the
> frontend to redirect the several video packets to each of them ?
> Is this possible ? Has anyone already done such a thing ?

Are you trying to write a dvb driver, or write software that uses a dvb
driver?

The current DVB API only allows for a single dvr device, which can only
be opened once.  Well, until my patch goes in, you can open it multiple times
but it doesn't work and will crash your kernel.

You can setup multiple PES filters at once time, each PID selected will be
sent to the dvr0 device, as the raw TS stream.  You can only select about 10
(??) PIDs this way.  Devices with hardware PID filters usually only have so
many PIDs they can filter at once.  Devices without hardware PID filters (most
PCI cards) are, IMHO, poorly and inefficiently supported by this arrangement.
A software filter could filter a thousand PIDs just as easily as it does one.

All the PIDs selected will be re-multiplexed into the dvr0 device, so you will
have to re-separate them yourself in software.

You could get each PID de-multiplexed by the hardware/kernel by reading from
the demux device instead of the dvr device.  The problem is that the kernel
will now strip off the TS headers for you, which makes the resulting
un-synchronized PES or section data with no error indicators very much harder
to deal with.  Unless you have hardware which expects un-synchronized PES
streams, it's much easier to de-multiplex and remove the TS headers yourself
than it is to synchronize to the PES stream you get from the demux device.



More information about the linux-dvb mailing list