Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: V4L interface to the MPEG stream?



Hello Ed,

I'm looking at whether my DVB-T card can be easily integrated with MythTv (a pvr program somewhat like VDR)
Ok, but we have to sort some things about before I can help you. 8-)

MythTv takes as input, either an analogue v4l source, or a v4l2 source from a hardware MPEG encoder.
This does not make sense. v4l and v4l2 are basically the same -- they are APIs that userspace programs can use to communicate with videohardware in a specified manner. They don't have anything to do my MPEG encoding or decoding.

The "DVB" driver supports v4l, the "dvb-kernel" tree supports v4l2 and v4l (through the v4l1-compat compatibility layer).

Of course you can use an mpeg-encoder library (for example libavcodec) to produce an mpeg stream from the analogue video, but this does not make sense for DVB cards. As you know, you already have a digitized mpeg stream.

Leaving aside whether VDR is an easier/better option for the moment, I'm out of my depth in determining whether I can make the DVB card pretend to be either of these interfaces
If you load any driver, you'll get /dev/adapter0/* interfaces and /dev/video0 for one card.

I have a full card with decoder, so I get a /dev/video1 v4l device (I'm under 2.4.20 with the standard v4l checkout from CVS).
Why do you get /dev/video1?

Do you have multiple dvb cards or other v4l cards (ie. bt8x8 cards)?

However, Mythtv is calling this line of code and failing with "invalid parameter":

  if (ioctl(fd, VIDIOCMCAPTURE, &mm)<0)
      perror("VIDIOCMCAPTURE0");
So, mythtv is really using v4l. I'm sorry, but there could be multiple reasons while this fails. 8-(

and this is actually code out of nuvrec, so although I haven't tried, I assume that nuvrec would also fail to record from this v4l interface.
Because of the fact that I'm the "v4l2 guy", I can only say that "nvrec" can record from the "dvb-kernel" v4l2 driver, but this won't help you for mythtv, I admit.

The obvious thing would be height and width and I am setting the params to be 720x576 which appears to match the native output from the v4l device?
If you're using PAL, yes.

Secondly, mythtv accepts input from a v4l2 device in MPEG 2 format. Is this possible under v4l2 then? Does the input not have to be straightforward uncompressed yuv type output?
As I already said above, v4l2 has nothing to do with MPEG at all.

So can the latest v4l2 driver for the DVB-T card do this as well? ie if I upgrade my kernel to 2.4.20 with the v4l2 patches and grab the 2.5 kernel branch of the driver will I get a /dev/video1 device which can spit out MPEG 2?
No. If mythtv only supports v4l1, all capturing stuff will go through the compatiblity layer, which is know to slow things down.

I admit that this is very unsatisfactory at the moment. Unfortunately, most user applications use v4l, so you can either bug them to switch over to v4l2 (all important drivers support this: bttv, saa7134, saa7146), but this does not work well with 2.4 kernels.

Hopefully this will be sorted out when 2.6 comes out, which has full v4l2 support out of the box.

Thoughts appreciated
Thanks all
I'll check out mythtv and tell you my results in getting it to run, both with the DVB driver and the dvb-kernel driver. Please be patient.

CU
Michael.




--
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index