Text capture: Difference between revisions

From LinuxTVWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 4: Line 4:


TV capture chipsets implement teletext and closed captioning in different ways, and the free software code to support text capture is still missing or incomplete for some chipsets.
TV capture chipsets implement teletext and closed captioning in different ways, and the free software code to support text capture is still missing or incomplete for some chipsets.

Recommended applications for testing under PAL/SECAM are mtt, zapping/zapzilla, alevt/d.


To visualize the Vertical Blanking Interval on NTSC, issue
To visualize the Vertical Blanking Interval on NTSC, issue
Line 10: Line 12:


At least bttv and saa7134 cards show orderly signals, though ntsc-cc currently doesn't work on non-bttv cards.
At least bttv and saa7134 cards show orderly signals, though ntsc-cc currently doesn't work on non-bttv cards.

See also the utilities in the test/ directory of the zvbi tarball, available on [http://zapping.sourceforge.net/cgi-bin/view/ZVBI/Download#Source_Code zvbi's project page]; these are actively maintained.




==Applications==
==Applications==


* alevtv
===alevtv===
* gstreamer
* ntsc-cc
* tvtime
* zapzilla
* zvbi


[http://www.goron.de/~froese/ AleVT] is a teletext/videotext decoder and browser for the bttv driver (/dev/vbi) and X11.


===gstreamer===
===gstreamer===


The application gstreamer has incorporated support for closed captioning (they also mention some tweaks for Canadian English and French television); see [http://cvs.freedesktop.org/gstreamer/gst-plugins/gst/vbidec/ Freedesktop's repository].
The application gstreamer has incorporated support for closed captioning (they also mention some tweaks for Canadian English and French television); see [http://cvs.freedesktop.org/gstreamer/gst-plugins/gst/vbidec/ Freedesktop's repository].

===nxtvepg===

The [http://nxtvepg.sourceforge.net/index.html Nextview EPG decoder and browser] is an Electronic TV Programme Guide for the analog domain (as opposed to the various digital EPGs that come with most digital broadcasts). It allows you to decode and browse TV programme listings for most of the major networks in Germany, Austria, France and Switzerland. The EPG information is read from /dev/vbi.


===ntsc-cc===
===ntsc-cc===


The application ntsc-cc handles closed captioning on [[bttv devices]]. For ntsc-cc to work, you typically need to be running an application for viewing or recording television, such as xawtv and mencoder. If no such application is running, ntsc-cc tends to produce garbled output.
The application ntsc-cc handles closed captioning on [[bttv devices]]. For ntsc-cc to work, you typically need to be running an application for viewing or recording television, such as xawtv and mencoder. If no such application is running, ntsc-cc tends to produce garbled output. A comment from Gerd concerning this is here: http://marc.theaimsgroup.com/?l=linux-video&m=109835161626408&w=2

The downside to ntsc-cc is that it doesn't link against libzvbi, which is the core of text capture under Linux, and it's not actively maintained. On the other hand, it's a great workhorse for bttv cards. Michael Schimek's test/capture utility will hopefully begin to cover the functionality of ntsc-cc.


===tvtime===
===tvtime===
Line 57: Line 63:
From the zvbi README, copyright Michael H. Schimek, Iñaki García Etxebarria, and Tom Zoerner. For further information, see the [http://zapping.sourceforge.net/doc/libzvbi zvbi documentation], the [http://zapping.sourceforge.net/cgi-bin/view/ZVBI/WebHome zvbi wiki], and the [http://lists.sourceforge.net/lists/listinfo/zapping-misc zapping-misc mailing list].
From the zvbi README, copyright Michael H. Schimek, Iñaki García Etxebarria, and Tom Zoerner. For further information, see the [http://zapping.sourceforge.net/doc/libzvbi zvbi documentation], the [http://zapping.sourceforge.net/cgi-bin/view/ZVBI/WebHome zvbi wiki], and the [http://lists.sourceforge.net/lists/listinfo/zapping-misc zapping-misc mailing list].


There are utilities for testing in the tarball; cf. [http://cvs.sourceforge.net/viewcvs.py/zapping/vbi/ cvs] and my [[closed_captioning_on_saa7134 | failed attempt]] to use some of these to get cc working on a saa7133 card.
There are utilities for testing in the tarball, available on [http://zapping.sourceforge.net/cgi-bin/view/ZVBI/Download#Source_Code zvbi's project page]; cf. [http://cvs.sourceforge.net/viewcvs.py/zapping/vbi/ cvs] and my [[closed_captioning_on_saa7134 | failed attempt]] to use some of these to get cc working on a saa7133 card.


==Card support==

===bt8x8===

Cards using the bttv driver have excellent support for text capture for both PAL/SECAM and NTSC.

Commandline output is provided by both ntsc-cc and the test/capture utility in zvbi.

===saa713x===

Cards using the saa7134 driver have excellent support for text capture under PAL/SECAM.

The status of NTSC support is unclear to me; cf. my [[closed_captioning_on_saa7134 | failed attempt]] to closed captioning working.

===ivtv===

This [http://www.gossamer-threads.com/lists/ivtv/devel/19383 exchange] on the ivtv list suggests there is support for CC, VPS and WSS signals for the PVR-350, but that hardware limitations prevent teletext.

Similarly, this [http://www.gossamer-threads.com/lists/ivtv/devel/16665?search_string=vbi;#16665 exchange] from January 2005 discusses an ongoing project adding vbi support to PVR-x50. Finally, in this [http://www.gossamer-threads.com/lists/ivtv/devel/19376 exchange] from April 2005, Chris Kennedy discusses vbi support for pvr150/500.

The READMI.vbi in a current ivtv release has lots of details and attempts to improve it are going on.

===DVB===

Status unknown. Michael Schimek's test/capture utility can save captions as a DVB MPEG-2 stream for PAL/SECAM.

===cx88===

The latest improvements on vbi support for cx88, aside from kernel-related stuff and modules reorganization, were made by Tom Zoerner in March of 2004, which is getting to be quite a while ago.


These improvements didn't change what the README.cx88 still says: "some code present. Doesn't crash any more, but also doesn't work yet ..."


However, Tim sketched out exactly what needs to be done in this [http://marc.theaimsgroup.com/?l=linux-video&m=108518568124567&w=2 22 May 2004 e-mail].
==Unsupported cards==


Finally, nxtvepg is working on cx88 PAL tuners, cf. [http://nxtvepg.sourceforge.net/download.html#requirements download].
There is currently no code supporting closed captioning on cx88 cards.

Revision as of 03:48, 24 April 2005

Teletext is popular in Europe and provides both informational pages and captions or subtitles to television programs. In 1992, teletext was provided in 18 countries. In the PAL standard, the text is digitally encoded in the vertical blanking interval (vbi) on lines 17 through 20.

In North America, closed captioning uses line 21 of the vertical blanking interval (NTSC standard). US federal law requires closed captioning of all non-exampt programs starting in 2006. Some broadcasters are implementing XDS, or Extended Data Services.

TV capture chipsets implement teletext and closed captioning in different ways, and the free software code to support text capture is still missing or incomplete for some chipsets.

Recommended applications for testing under PAL/SECAM are mtt, zapping/zapzilla, alevt/d.

To visualize the Vertical Blanking Interval on NTSC, issue

ntsc-cc -d /dev/vbi -c -w -r 27

At least bttv and saa7134 cards show orderly signals, though ntsc-cc currently doesn't work on non-bttv cards.

See also the utilities in the test/ directory of the zvbi tarball, available on zvbi's project page; these are actively maintained.


Applications

alevtv

AleVT is a teletext/videotext decoder and browser for the bttv driver (/dev/vbi) and X11.

gstreamer

The application gstreamer has incorporated support for closed captioning (they also mention some tweaks for Canadian English and French television); see Freedesktop's repository.

nxtvepg

The Nextview EPG decoder and browser is an Electronic TV Programme Guide for the analog domain (as opposed to the various digital EPGs that come with most digital broadcasts). It allows you to decode and browse TV programme listings for most of the major networks in Germany, Austria, France and Switzerland. The EPG information is read from /dev/vbi.

ntsc-cc

The application ntsc-cc handles closed captioning on bttv devices. For ntsc-cc to work, you typically need to be running an application for viewing or recording television, such as xawtv and mencoder. If no such application is running, ntsc-cc tends to produce garbled output. A comment from Gerd concerning this is here: http://marc.theaimsgroup.com/?l=linux-video&m=109835161626408&w=2

The downside to ntsc-cc is that it doesn't link against libzvbi, which is the core of text capture under Linux, and it's not actively maintained. On the other hand, it's a great workhorse for bttv cards. Michael Schimek's test/capture utility will hopefully begin to cover the functionality of ntsc-cc.

tvtime

tvtime has built-in support for closed captioning for bttv and saa7134 cards (also others?).

In early 2004, Kevin Ko wrote a patch with useful comments to tvtime's vbidata.c; see his detailed account and the tvtime bugreport.

zapzilla

Zapping has a built-in teletext viewer called Zapzilla.

In addition, Zapping provides subtitle overlay through the closed captioning decoder built into libzvbi.

zvbi

"The vertical blanking interval (VBI) is an interval in a television signal that temporarily suspends transmission of the signal for the electron gun to move back up to the first line of the television screen to trace the next screen field. The vertical blanking interval can be used to carry data, since anything sent during the VBI would naturally not be displayed; various test signals, closed captioning, and other digital data can be sent during this time period.

The zvbi library provides functions to read from Linux V4L, V4L2 and FreeBSD BKTR raw VBI capture devices, from Linux DVB devices and from a VBI proxy to share V4L and V4L2 VBI devices between multiple applications.

It can demodulate raw to sliced VBI data in software, with support for a wide range of formats, has functions to decode several popular services including Teletext and Closed Caption, a Teletext cache with search function, various text export and rendering functions.

Basically zvbi offers all functions needed by VBI applications except for the user interface. The library was written for the Zapping TV viewer http://zapping.sourceforge.net."

From the zvbi README, copyright Michael H. Schimek, Iñaki García Etxebarria, and Tom Zoerner. For further information, see the zvbi documentation, the zvbi wiki, and the zapping-misc mailing list.

There are utilities for testing in the tarball, available on zvbi's project page; cf. cvs and my failed attempt to use some of these to get cc working on a saa7133 card.


Card support

bt8x8

Cards using the bttv driver have excellent support for text capture for both PAL/SECAM and NTSC.

Commandline output is provided by both ntsc-cc and the test/capture utility in zvbi.

saa713x

Cards using the saa7134 driver have excellent support for text capture under PAL/SECAM.

The status of NTSC support is unclear to me; cf. my failed attempt to closed captioning working.

ivtv

This exchange on the ivtv list suggests there is support for CC, VPS and WSS signals for the PVR-350, but that hardware limitations prevent teletext.

Similarly, this exchange from January 2005 discusses an ongoing project adding vbi support to PVR-x50. Finally, in this exchange from April 2005, Chris Kennedy discusses vbi support for pvr150/500.

The READMI.vbi in a current ivtv release has lots of details and attempts to improve it are going on.

DVB

Status unknown. Michael Schimek's test/capture utility can save captions as a DVB MPEG-2 stream for PAL/SECAM.

cx88

The latest improvements on vbi support for cx88, aside from kernel-related stuff and modules reorganization, were made by Tom Zoerner in March of 2004, which is getting to be quite a while ago.

These improvements didn't change what the README.cx88 still says: "some code present. Doesn't crash any more, but also doesn't work yet ..."

However, Tim sketched out exactly what needs to be done in this 22 May 2004 e-mail.

Finally, nxtvepg is working on cx88 PAL tuners, cf. download.