Mailing List Archive

Sliced VBI, PVR-500, ivtv-1.2.0, cx25840
I just upgraded my mythtv system and lost the ability to see captions. The
mythtv folks suggested that I check here in case it's a known issue.

Three years ago, Hans and I exchanged many emails as we got the cx25840
captioning working with the drivers of that era, but now, with the upgraded
mythtv, I've had to move to the newer drivers and API.

I've got KnoppMyth for my mythtv box, running a 2.6.23 kernel that's about
9 months old.

Running the command:
# v4l2-ctl --get-sliced-vbi-out-cap
produces no output.

It appears that the driver can capture sliced VBI, but cannot inject the
resulting data into the MPEG stream on the /dev/video* device. Is that an
accurate interpretation?


If the insertion of captions into the MPEG stream is not available for my
hardware yet, I'm happy to work on this again.


--
Christopher Neufeld
Home page: http://www.cneufeld.ca/neufeld
"Don't edit reality for the sake of simplicity"

_______________________________________________
ivtv-devel mailing list
ivtv-devel@ivtvdriver.org
http://ivtvdriver.org/mailman/listinfo/ivtv-devel
Re: Sliced VBI, PVR-500, ivtv-1.2.0, cx25840 [ In reply to ]
On Wednesday 01 April 2009 06:32:55 Christopher Neufeld wrote:
> I just upgraded my mythtv system and lost the ability to see captions.
> The mythtv folks suggested that I check here in case it's a known issue.
>
> Three years ago, Hans and I exchanged many emails as we got the cx25840
> captioning working with the drivers of that era, but now, with the
> upgraded mythtv, I've had to move to the newer drivers and API.
>
> I've got KnoppMyth for my mythtv box, running a 2.6.23 kernel that's
> about 9 months old.
>
> Running the command:
> # v4l2-ctl --get-sliced-vbi-out-cap
> produces no output.
>
> It appears that the driver can capture sliced VBI, but cannot inject the
> resulting data into the MPEG stream on the /dev/video* device. Is that
> an accurate interpretation?
>
>
> If the insertion of captions into the MPEG stream is not available for my
> hardware yet, I'm happy to work on this again.

No, it's working. You have to use 'v4l2-ctl -c stream_vbi_format=1' to
enable it.

That said, sliced VBI was broken for quite some time, i.e. it would produce
garbled closed captions. That was fixed in 2.6.27.

And I don't know where you got v4l2-ctl from, but a bug in that program
relating to --get-sliced-vbi-out-cap was fixed October 2007. It seems you
have that buggy v4l2-ctl version.

If you want reliable captions, then I strongly recommend updating to 2.6.27.
Or install the v4l-dvb repository on top of your kernel.

Regards,

Hans

--
Hans Verkuil - video4linux developer - sponsored by TANDBERG

_______________________________________________
ivtv-devel mailing list
ivtv-devel@ivtvdriver.org
http://ivtvdriver.org/mailman/listinfo/ivtv-devel
Re: Sliced VBI, PVR-500, ivtv-1.2.0, cx25840 [ In reply to ]
On Wed, 1 Apr 2009 07:49:41 +0200, Hans Verkuil <hverkuil@xs4all.nl> said:
> On Wednesday 01 April 2009 06:32:55 Christopher Neufeld wrote:

>> I've got KnoppMyth for my mythtv box, running a 2.6.23 kernel that's
>> about 9 months old.
>>
>> Running the command:
>> # v4l2-ctl --get-sliced-vbi-out-cap
>> produces no output.

> No, it's working. You have to use 'v4l2-ctl -c stream_vbi_format=1' to
> enable it.

> That said, sliced VBI was broken for quite some time, i.e. it would produce
> garbled closed captions. That was fixed in 2.6.27.

> And I don't know where you got v4l2-ctl from, but a bug in that program
> relating to --get-sliced-vbi-out-cap was fixed October 2007. It seems you
> have that buggy v4l2-ctl version.

Well, I upgraded again, to KnoppMyth's new character, LinHES R6.00.07.

The new kernel is a 2.6.28 kernel. However, I haven't seen any change in
the behaviour I described above. To be sure, I downloaded ivtv-utils-1.3.0
directly from
http://dl.ivtvdriver.org/ivtv/archive/1.3.x/ivtv-utils-1.3.0.tar.gz
and compiled a v4l2-ctl binary.

Here are three consecutive commands and their outputs.

# ./v4l2-ctl -b cc --verbose
VIDIOC_QUERYCAP: ok
VIDIOC_S_FMT: ok

# ./v4l2-ctl -c stream_vbi_format=1 --verbose
VIDIOC_QUERYCAP: ok
VIDIOC_S_EXT_CTRLS: ok

# ./v4l2-ctl --get-sliced-vbi-out-cap --verbose
VIDIOC_QUERYCAP: ok
VIDIOC_G_SLICED_VBI_CAP: failed: Invalid argument


modinfo ivtv shows that the version is 1.4.0.


Is there something I can do to diagnose this problem?

--
Christopher Neufeld
Home page: http://www.cneufeld.ca/neufeld
"Don't edit reality for the sake of simplicity"

_______________________________________________
ivtv-devel mailing list
ivtv-devel@ivtvdriver.org
http://ivtvdriver.org/mailman/listinfo/ivtv-devel
Re: Sliced VBI, PVR-500, ivtv-1.2.0, cx25840 [ In reply to ]
> On Wed, 1 Apr 2009 07:49:41 +0200, Hans Verkuil <hverkuil@xs4all.nl> said:
>> On Wednesday 01 April 2009 06:32:55 Christopher Neufeld wrote:
>
>>> I've got KnoppMyth for my mythtv box, running a 2.6.23 kernel that's
>>> about 9 months old.
>>>
>>> Running the command:
>>> # v4l2-ctl --get-sliced-vbi-out-cap
>>> produces no output.
>
>> No, it's working. You have to use 'v4l2-ctl -c stream_vbi_format=1' to
>> enable it.
>
>> That said, sliced VBI was broken for quite some time, i.e. it would
>> produce
>> garbled closed captions. That was fixed in 2.6.27.
>
>> And I don't know where you got v4l2-ctl from, but a bug in that program
>> relating to --get-sliced-vbi-out-cap was fixed October 2007. It seems
>> you
>> have that buggy v4l2-ctl version.
>
> Well, I upgraded again, to KnoppMyth's new character, LinHES R6.00.07.
>
> The new kernel is a 2.6.28 kernel. However, I haven't seen any change in
> the behaviour I described above. To be sure, I downloaded
> ivtv-utils-1.3.0
> directly from
> http://dl.ivtvdriver.org/ivtv/archive/1.3.x/ivtv-utils-1.3.0.tar.gz
> and compiled a v4l2-ctl binary.
>
> Here are three consecutive commands and their outputs.
>
> # ./v4l2-ctl -b cc --verbose
> VIDIOC_QUERYCAP: ok
> VIDIOC_S_FMT: ok
>
> # ./v4l2-ctl -c stream_vbi_format=1 --verbose
> VIDIOC_QUERYCAP: ok
> VIDIOC_S_EXT_CTRLS: ok
>
> # ./v4l2-ctl --get-sliced-vbi-out-cap --verbose
> VIDIOC_QUERYCAP: ok
> VIDIOC_G_SLICED_VBI_CAP: failed: Invalid argument

--get-sliced-vbi-out-cap? You want --get-sliced-vbi-cap. The former is for
the output on a PVR-350.

Regards,

Hans

>
>
> modinfo ivtv shows that the version is 1.4.0.
>
>
> Is there something I can do to diagnose this problem?
>
> --
> Christopher Neufeld
> Home page: http://www.cneufeld.ca/neufeld
> "Don't edit reality for the sake of simplicity"
>
> _______________________________________________
> ivtv-devel mailing list
> ivtv-devel@ivtvdriver.org
> http://ivtvdriver.org/mailman/listinfo/ivtv-devel
>


--
Hans Verkuil - video4linux developer - sponsored by TANDBERG


_______________________________________________
ivtv-devel mailing list
ivtv-devel@ivtvdriver.org
http://ivtvdriver.org/mailman/listinfo/ivtv-devel
Re: Sliced VBI, PVR-500, ivtv-1.2.0, cx25840 [ In reply to ]
On Wed, 1 Apr 2009 17:04:13 +0200 (CEST), "Hans Verkuil" <hverkuil@xs4all.nl> said:
>> On Wed, 1 Apr 2009 07:49:41 +0200, Hans Verkuil <hverkuil@xs4all.nl> said:
>>> On Wednesday 01 April 2009 06:32:55 Christopher Neufeld wrote:

>> # ./v4l2-ctl -b cc --verbose
>> VIDIOC_QUERYCAP: ok
>> VIDIOC_S_FMT: ok
>>
>> # ./v4l2-ctl -c stream_vbi_format=1 --verbose
>> VIDIOC_QUERYCAP: ok
>> VIDIOC_S_EXT_CTRLS: ok
>>
>> # ./v4l2-ctl --get-sliced-vbi-out-cap --verbose
>> VIDIOC_QUERYCAP: ok
>> VIDIOC_G_SLICED_VBI_CAP: failed: Invalid argument

> --get-sliced-vbi-out-cap? You want --get-sliced-vbi-cap. The former is for
> the output on a PVR-350.

Ah, OK. I thought that there was some ioctl that had to be sent to tell
the module to insert the CC packets into the mpeg stream.

So, let's say I cat /dev/video0 into a file for a few minutes. What can I
do to verify that the CC packets are there? I guess I'm looking for
packets of type 0x69. Or has this changed in the past few years?


Looking at an old recording, I run

mpeg2desc < FILE | fgrep 0x69

and I get a large number of lines like this:

030ad764: pes private1, substream id 0x69; length=110; hdr=10; pts 3076.079 sec


When I check against a new recording, or one that I draw directly from
/dev/video0, I see no packets of type 0x69.


--
Christopher Neufeld
Home page: http://www.cneufeld.ca/neufeld
"Don't edit reality for the sake of simplicity"

_______________________________________________
ivtv-devel mailing list
ivtv-devel@ivtvdriver.org
http://ivtvdriver.org/mailman/listinfo/ivtv-devel
Re: Sliced VBI, PVR-500, ivtv-1.2.0, cx25840 [ In reply to ]
OK, I've figured out that the module is working correctly. Two of my new
recordings have packets of type 0x69 in them, so it was just a
configuration issue, all the poking and prodding at the ioctls while the
machine was idle. The mythtv backend doesn't reset them when it starts a
recording, and the new pre-release knoppmyth CD I upgraded to this morning
doesn't call v4l2-ctl (unlike the version from which I was upgrading, which
did at least try to set the ioctls).

I still don't see captions, but this is now definitely a mythtv issue, not
an ivtv driver problem. Thank you, Hans, for the help, your explanations
saved me a lot of time.


--
Christopher Neufeld
Home page: http://www.cneufeld.ca/neufeld
"Don't edit reality for the sake of simplicity"

_______________________________________________
ivtv-devel mailing list
ivtv-devel@ivtvdriver.org
http://ivtvdriver.org/mailman/listinfo/ivtv-devel