TTXINSERT README
1) Compiling
Just type make and you should be fine
2) Running
A bit more complicated.
At this moment the program is known to work with the nVidia 6200 line of cards with at least driver version 9746.
Currently you will need a window-manager less X session.
So log in as root and switch to runlevel 3 or 4
Make sure that the user that will run ttxinsert has a .xinitrc file.
It should contain at least something that will keep the X server running.
F.i. xclock & will do the trick.
Now you are ready to start. In your environment you should have
export __GL_SYNC_TO_VBLANK=1
As of V0.2.0 this is done in the program. So this export is no longer necessary.
The modules section in you xorg.conf file should have:
Load "dbe"
Load "extmod"
Load "type1"
Load "freetype"
Load "glx"
The device section should at least have:
Option "TVStandard" "PAL-B"
Option "TVOutFormat" "SVIDEO"
Option "TVOverScan" "1.0"
(The program has been tested on PAL only)
In this section the TVOverscan part is the most important line.
To see that everything is OK, you can use the supplied testfile:
./ttxinsert -f ttxinsert_test.txt
You can use locale to select the language that is used for time/date display on the header line. Use locale -a to see which settings you can use
So a typical shell script to run the inserter would look like:
export __GL_SYNC_TO_VBLANK=1
export DISPLAY=:0.0
export export LC_TIME=nl_NL
./ttxinsert -f ttxinsert_test.txt
So far, testing shows that the best results are achieved at a resolution 1024x768 with the lineheight set to 3
3) Making your own teletext file
The input file has a very simple layout
Line starting with # are page starters. The first argument is the page number, the second (optional) argument is the subpage number
After the page starter follow the lines describing the page. All lines have to start with $ followed by the line data.
Example
#100
$This is the first line on page 100
#101 1
$This is page 101, subpage 1
#101 2
$This is also page 101, but it's subpage 2
This will configure 3 pages. A page 100 and a page 101 that consist of 2 subpages.
There are several editors that can help you create pages. F.i. http://www.cebra.dk/inserter/edit.zip
When transmitted ascii codes below 32 are used as control codes. The program is not able to read these low codes.
Hex codes can be type as f.i. \0x02 to change the text to green. So after \0x two characters have to follow representing a control code.
If you are using direct hex entry (with a hex editor) , you should edit any low codes and add 128 to them. F.i. 0x16 becomes 0x96.
0x01 Text Red
0x02 Text Green
0x03 Text Yellow
0x04 Text Blue
0x05 Text Magenta
0x06 Text Cyan
0x07 Text White
0x08 Flash - Swaps forground and background colours (both text and graphics)
0x09 Cancel Flash
0x0A End Box
0x0B Start Box on certain pages the will allow to show text as an overlay on normal video. This page type is not implemented yet.
0x0C End double height
0x0D Double height All characters following will be stretched to the next line.
0x11 Graphics Red
0x12 Graphics Green
0x13 Graphics Yellow
0x14 Graphics Blue
0x15 Graphics Magenta
0x16 Graphics Cyan
0x17 Graphics White
0x18 Conceal All characters following (until a color change or new line) are displayed as spaces. Press the question mark on your remote to show
0x19 Block graphics Graphics are shown without (small) border in background colour
0x1A Separated Graphics Graphics are shown with (small) border in background colour
0x1B Switch Not implenented
0x1C Set background colour to black
0x1D New background colour. Sets the background colour to the foreground colour. So for blue text on a yellow background you will have to enter \0x03\0x1d\0x04
0x1E Hold graphics Don't display contol codes as spaces
0x1F Release Graphics
All pages are transmitted serially in a cycle. subpages are transmitted one page per cycle
Make sure that you define the same number of lines for everypage if subpages are used. F.i. if you have a page with 2 subpages and the first page has 22 lines and the second only 10, with some teletext decoders the top 10 lines are overwritten, while the bottom 12 will remain unchanged.
A little word of advice:
At the start of every page the headers for all magazines in use are transmitted with the correct clock data. Every 25 frames it is neccesary to transmit these headers again, just to keep the clock running. It is better just to have only the neccesary magazines in use, just to avoid waisting time with transmitting these magazine headers.
4) Command line options
-f <filename> points to your teletext file
-s <stationname> short name for your station. Shows up in the header line.
-o <offset> will change the starting point of teletext info default: 6.35
-e <offset> will change the end point of teletext info default: 21
-c <offset> will change the intensity of a pulse (bit) default : 0.8
-p <offset> will change the pulse width default : 0.6
-v <verbosity level> will set how much of a blabbermouth the program is. default : 0
-H <line height> will set the height of the teletext line
-W <screenwidth> will set the screenwidth. The program detects the screenwidth but if that fails, you can use this option. Use -v 1 to see what the detected width is.
5) General remarks
pros:
Runs on cheap hardware
cons:
Can use only one line to transmit data and is therefore slow. Having a lot a pages will result in a long cycle time.
In the tarfile TTXView.tar you will find a java applet that can be used to show the ttxInsert input file on a web page. Very usefull to check the layout and syntax of your file before showing it to the public
6) To do
Packet 30 should be transmitted for a real real-time clock and for programme info.
Add a converter from *.971 format to a format for this program.
7) Known bugs
Due to the way the time is transmitted, every magazine page 0 (100, 200, 300, 400 etc.) can't have subpages.