aboutsummaryrefslogtreecommitdiffhomepage
path: root/DOCS/xml/en/video.xml
blob: f74ed2b66968ceea5693b9a37eb4b8f3ebe3f2c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect2 id="video-dev">
<title>Video output devices</title>

<sect3 id="mtrr">
<title>Setting up MTRR</title>

<para>
It is VERY recommended to check if the MTRR registers
are set up properly, because they can give a big performance boost.
</para>

<para>
Do a <command>cat /proc/mtrr</command>:
<screen>
<prompt>--($:~)--</prompt> cat /proc/mtrr
reg00: base=0xe4000000 (3648MB), size=  16MB: write-combining, count=9
reg01: base=0xd8000000 (3456MB), size= 128MB: write-combining, count=1<!--
--></screen>
</para>

<para>
It's right, shows my Matrox G400 with 16MB memory. I did this from
XFree 4.x.x , which sets up MTRR registers automatically.
</para>

<para>
If nothing worked, you have to do it manually. First, you have to find the
base address. You have 3 ways to find it:

<orderedlist>
<listitem><para>
  from X11 startup messages, for example:
  <screen>
(--) SVGA: PCI: Matrox MGA G400 AGP rev 4, Memory @ 0xd8000000, 0xd4000000
(--) SVGA: Linear framebuffer at 0xD8000000<!--
--></screen>
  </para></listitem>
<listitem><para>
  from <filename>/proc/pci</filename> (use <command>lspci -v</command>
  command):
  <screen>
01:00.0 VGA compatible controller: Matrox Graphics, Inc.: Unknown device 0525
Memory at d8000000 (32-bit, prefetchable)
  </screen>
  </para></listitem>
<listitem><para>
  from mga_vid kernel driver messages (use <command>dmesg</command>):
  <screen>mga_mem_base = d8000000</screen>
  </para></listitem>
</orderedlist>
</para>

<para>
Then let's find the memory size. This is very easy, just convert video RAM
size to hexadecimal, or use this table:
<informaltable frame="none">
<tgroup cols="2">
<tbody>
<row><entry>1 MB</entry><entry>0x100000</entry></row>
<row><entry>2 MB</entry><entry>0x200000</entry></row>
<row><entry>4 MB</entry><entry>0x400000</entry></row>
<row><entry>8 MB</entry><entry>0x800000</entry></row>
<row><entry>16 MB</entry><entry>0x1000000</entry></row>
<row><entry>32 MB</entry><entry>0x2000000</entry></row>
</tbody>
</tgroup>
</informaltable>
</para>

<para>
You know base address and memory size, let's setup MTRR registers!
For example, for the Matrox card above (<literal>base=0xd8000000</literal>)
with 32MB ram (<literal>size=0x2000000</literal>) just execute:
<screen>
echo "base=0xd8000000 size=0x2000000 type=write-combining" &gt;| /proc/mtrr
</screen>
</para>

<para>
Not all CPUs have MTRRs. For example older K6-2 (around 266MHz,
stepping 0) CPUs don't have MTRRs, but stepping 12 does
(execute <command>cat /proc/cpuinfo</command> to check it).
</para>
</sect3>

<sect3 id="output-trad">
<title>Video outputs for traditional video cards</title>
<sect4 id="xv">
<title>Xv</title>

<para>
Under XFree86 4.0.2 or newer, you can use your card's hardware YUV routines
using the XVideo extension. This is what the option
'<option>-vo xv</option>' uses. Also, this driver supports adjusting
brightness/contrast/hue/etc (unless you use the old, slow DirectShow DivX
codec, which supports it everywhere), see the man page.
</para>

<para>
In order to make this work, be sure to check the following:

<orderedlist>
<listitem><para>
  You have to use XFree86 4.0.2 or newer (former versions don't have XVideo)
  </para></listitem>
<listitem><para>
  Your card actually supports hardware acceleration (modern cards do)
  </para></listitem>
<listitem><para>
  X loads the XVideo extension, it's something like this:
  <programlisting>(II) Loading extension XVideo</programlisting>
  in <filename>/var/log/XFree86.0.log</filename>
  <note><para>
   This loads only the XFree86's extension. In a good install, this is
   always loaded, and doesn't mean that the <emphasis role="bold">card's</emphasis>
   XVideo support is loaded!
  </para></note>
  </para></listitem>
<listitem><para>
  Your card has Xv support under Linux. To check, try
  <command>xvinfo</command>, it is the part of the XFree86 distribution. It
  should display a long text, similar to this:
  <screen>
X-Video Extension version 2.2
screen #0
  Adaptor #0: "Savage Streams Engine"
    number of ports: 1
    port base: 43
    operations supported: PutImage
    supported visuals:
      depth 16, visualID 0x22
      depth 16, visualID 0x23
    number of attributes: 5
(...)
    Number of image formats: 7
      id: 0x32595559 (YUY2)
        guid: 59555932-0000-0010-8000-00aa00389b71
        bits per pixel: 16
        number of planes: 1
        type: YUV (packed)
      id: 0x32315659 (YV12)
        guid: 59563132-0000-0010-8000-00aa00389b71
        bits per pixel: 12
        number of planes: 3
        type: YUV (planar)
(...etc...)<!--
--></screen>
  It must support YUY2 packed, and YV12 planar pixel formats to be usable
  with <application>MPlayer</application>.
  </para></listitem>
<listitem><para>
  And finally, check if <application>MPlayer</application> was compiled
  with 'xv' support. Do a <command>mplayer -vo help | grep xv </command>.
  If 'xv' support was built a line similar to this should appear:
  <screen>
  xv      X11/Xv<!--
  --></screen>
  </para></listitem>
</orderedlist>
</para>

<sect5 id="tdfx">
<title>3dfx cards</title>

<para>
Older 3dfx drivers were known to have problems with XVideo acceleration, it
didn't support either YUY2 or YV12, and so. Verify that you have XFree86
version 4.2.0 or greater, it works OK with YV12 and YUY2. Previous
versions, including 4.1.0, <emphasis role="bold">crashes with YV12</emphasis>.
If you experience strange effects using <option>-vo xv</option>, try SDL
(it has XVideo, too) and see if it helps. Check the
<link linkend="sdl">SDL</link> section for details.
</para>

<para>
<emphasis role="bold">OR</emphasis>, try the NEW
<option>-vo tdfxfb</option> driver! See the <link linkend="tdfxfb">tdfxfb</link>
section.
</para>
</sect5>


<sect5 id="s3">
<title>S3 cards</title>

<para>
S3 Savage3D's should work fine, but for Savage4, use XFree86 version 4.0.3
or greater (in case of image problems, try 16bpp). As for S3 Virge: there is
xv support, but the card itself is very slow, so you better sell it.
</para>

<note>
<para>
It's currently unclear which Savage models lack YV12 support, and convert by
driver (slow). If you suspect your card, get a newer driver, or ask politely
on the mplayer-users mailing list for an MMX/3DNow! enabled driver.
</para>
</note>
</sect5>


<sect5 id="nvidia">
<title>nVidia cards</title>

<para>
nVidia isn't always a very good choice under Linux (according to nVidia, this
is <link linkend="nvidia-opinions">not true</link>)... XFree86's
open-source driver supports most of these cards, but for some cases, you'll
have to use the binary closed-source nVidia driver, available at 
<ulink url="http://www.nvidia.com/object/linux.html">nVidia's web site</ulink>.
You'll always need this driver if you want 3D acceleration, too.
</para>

<para>
Riva128 cards don't have XVideo support with XFree86's nVidia driver :(
Complain to nVidia.
</para>

<para>
However, <application>MPlayer</application> contains a
<link linkend="vidix">VIDIX</link> driver for most nVidia cards. Currently it
is in beta stage, and has some drawbacks. For more information, see
<link linkend="vidix-nvidia">nVidia VIDIX</link> section.
</para>
</sect5>


<sect5 id="ati">
<title>ATI cards</title>

<para>
The <ulink url="http://www.linuxvideo.org/gatos">GATOS driver</ulink>
(which you should use, unless you have Rage128 or Radeon) has VSYNC enabled
by default. It means that decoding speed (!) is synced to the monitor's
refresh rate. If playing seems to be slow, try disabling VSYNC somehow, or
set refresh rate to a n*(fps of the movie) Hz.
</para>

<para>
Radeon VE - if you need X, use XFree86 4.2.0 or greater for this card.
No TV out support. Of course with <application>MPlayer</application> you can
happily get <emphasis role="bold">accelerated</emphasis> display, with or without
<emphasis role="bold">TV output</emphasis>, and no libraries or X are needed.
Read the <link linkend="vidix">VIDIX</link> section.
</para>
</sect5>


<sect5 id="neomagic">
<title>NeoMagic cards</title>

<para>
These cards can be found in many laptops. You must use XFree86 4.3.0 or
above, or else use Stefan Seyfried's
<ulink url="http://www.mplayerhq.hu/MPlayer/contrib/NeoMagic-driver/">Xv-capable drivers</ulink>.
Just choose the one that applies to your version of XFree86.
</para>

<para>
XFree86 4.3.0 includes Xv support, yet Bohdan Horst sent a small
<ulink url="http://www.mplayerhq.hu/MPlayer/contrib/NeoMagic-driver/neo_driver.patch">patch</ulink>
against the XFree86 sources that speeds up framebuffer operations (so XVideo)
up to four times. The patch has been included in XFree86 CVS and should be in the
next release after 4.3.0.
</para>

<para>
To allow playback of DVD sized content change your XF86Config like this:
<programlisting>
Section "Device"
    [...]
    Driver "neomagic"
    <emphasis>Option "OverlayMem" "829440"</emphasis>
    [...]
EndSection<!--
--></programlisting>
</para>
</sect5>


<sect5 id="trident">
<title>Trident cards</title>
<para>
If you want to use xv with a trident card, provided that it doesn't work
with 4.1.0, install XFree 4.2.0. 4.2.0 adds support for fullscreen Xv
support with the Cyberblade XP card.
</para>

<para>
Alternatively, <application>MPlayer</application> contains a
<link linkend="vidix">VIDIX</link> driver for the Cyberblade/i1 card.
</para>

</sect5>


<sect5 id="kyro">
<title>Kyro/PowerVR cards</title>
<para>
If you want to use Xv with a Kyro based card (for example Hercules
Prophet 4000XT), you should download the drivers from the
<ulink url="http://www.powervr.com/">PowerVR site</ulink>
</para>
</sect5>
</sect4>

<!-- ********** -->

<sect4 id="dga">
<title>DGA</title>

<formalpara>
<title>PREAMBLE</title>
<para>
This document tries to explain in some words what DGA is in general and
what the DGA video output driver for <application>MPlayer</application>
can do (and what it can't).
</para>
</formalpara>

<formalpara>
<title>WHAT IS DGA</title>
<para>
<acronym>DGA</acronym> is short for <emphasis>Direct Graphics
Access</emphasis> and is a means for a program to bypass the X server and
directly modifying the framebuffer memory.  Technically spoken this happens
by mapping the framebuffer memory into the memory range of your process.
This is allowed by the kernel only if you have superuser privileges. You
can get these either by logging in as <systemitem
class="username">root</systemitem> or by setting the SUID bit on the
<application>MPlayer</application> executable (<emphasis role="bold">not
recommended</emphasis>).
</para>
</formalpara>
<para>
There are two versions of DGA: DGA1 is used by XFree 3.x.x and DGA2 was
introduced with XFree 4.0.1.
</para>

<para>
DGA1 provides only direct framebuffer access as described above. For
switching the resolution of the video signal you have to rely on the
XVidMode extension.
</para>

<para>
DGA2 incorporates the features of XVidMode extension and also allows
switching the depth of the display. So you may, although basically
running a 32 bit depth X server, switch to a depth of 15 bits and vice
versa.
</para>

<para>
However DGA has some drawbacks. It seems it is somewhat dependent on the
graphics chip you use and on the implementation of the X server's video
driver that controls this chip. So it does not work on every system...
</para>

<formalpara>
<title>INSTALLING DGA SUPPORT FOR MPLAYER</title>

<para>
First make sure X loads the DGA extension, see in
<filename>/var/log/XFree86.0.log</filename>:

<programlisting>(II) Loading extension XFree86-DGA</programlisting>

See, XFree86 4.0.x or greater is <emphasis role="bold">highly recommended</emphasis>!
<application>MPlayer</application>'s DGA driver is autodetected by
<filename>./configure</filename>, or you can force it
with <option>--enable-dga</option>.
</para>
</formalpara>

<para>
If the driver couldn't switch to a smaller resolution, experiment with
options <option>-vm</option> (only with X 3.3.x), <option>-fs</option>,
<option>-bpp</option>, <option>-zoom</option> to find a video mode that
the movie fits in. There is no converter right now :(
</para>

<para>
Become <systemitem class="username">root</systemitem>. DGA needs root
access to be able to write directly video memory. If you want to run it as
user, then install <application>MPlayer</application> SUID root:

<screen>
chown root <replaceable>/usr/local/bin/mplayer</replaceable>
chmod 750 <replaceable>/usr/local/bin/mplayer</replaceable>
chmod +s <replaceable>/usr/local/bin/mplayer</replaceable>
</screen>

Now it works as a simple user, too.
</para>

<caution>
<title>Security risk</title>
<para>
This is a <emphasis role="bold">big</emphasis> security risk!
<emphasis role="bold">Never</emphasis> do this on a server or on a computer that can be
accessed by other people because they can gain root privileges through SUID root
<application>MPlayer</application>.
</para>
</caution>

<para>
Now use <option>-vo dga</option> option, and there you go! (hope so:) You
should also try if the <option>-vo sdl:dga</option> option works for you!
It's much faster!
</para>


<formalpara id="dga-modelines">
<title>RESOLUTION SWITCHING</title>

<para>
The DGA driver allows for switching the resolution of the output signal.
This avoids the need for doing (slow) software scaling and at the same time
provides a fullscreen image. Ideally it would switch to the exact
resolution (except for honoring aspect ratio) of the video data, but the X
server only allows switching to resolutions predefined in
<filename>/etc/X11/XF86Config</filename>
(<filename>/etc/X11/XF86Config-4</filename> for XFree 4.X.X respectively).
Those are defined by so-called modelines and depend on
the capabilities of your video hardware. The X server scans this config
file on startup and disables the modelines not suitable for your hardware.
You can find out which modes survive with the X11 log file. It can be found
at: <filename>/var/log/XFree86.0.log</filename>.
</para>
</formalpara>

<para>
These entries are known to work fine with a Riva128 chip, using the nv.o X
server driver module.
</para>


<para><programlisting>
Section "Modes"
  Identifier "Modes[0]"
  Modeline "800x600"  40     800 840 968 1056  600 601 605 628
  Modeline "712x600"  35.0   712 740 850 900   400 410 412 425
  Modeline "640x480"  25.175 640 664 760 800   480 491 493 525
  Modeline "400x300"  20     400 416 480 528   300 301 303 314 Doublescan
  Modeline "352x288"  25.10  352 368 416 432   288 296 290 310
  Modeline "352x240"  15.750 352 368 416 432   240 244 246 262 Doublescan
  Modeline "320x240"  12.588 320 336 384 400   240 245 246 262 Doublescan
EndSection
</programlisting></para>


<formalpara>
<title>DGA &amp; MPLAYER</title>
<para>
DGA is used in two places with <application>MPlayer</application>: The SDL
driver can be made to make use of it (<option>-vo sdl:dga</option>) and
within the DGA driver (<option>-vo dga</option>). The above said is true
for both; in the following sections I'll explain how the DGA driver for
<application>MPlayer</application> works.
</para>
</formalpara>


<formalpara>
<title>FEATURES</title>

<para>
The DGA driver is invoked by specifying <option>-vo dga</option> at the
command line.  The default behavior is to switch to a resolution matching
the original resolution of the video as close as possible. It deliberately
ignores the <option>-vm</option> and <option>-fs</option> options
(enabling of video mode switching and fullscreen) - it always tries to
cover as much area of your screen as possible by switching the video mode,
thus refraining to use a single additional cycle of your CPU to scale the
image. If you don't like the mode it chooses you may force it to choose
the mode matching closest the resolution you specify by <option>-x</option>
and <option>-y</option>. By providing the <option>-v</option> option, the
DGA driver will print, among a lot of other things, a list of all
resolutions supported by your current <filename>XF86Config</filename> file.
Having DGA2 you may also force it to use a certain depth by using the
<option>-bpp</option> option. Valid depths are 15, 16, 24 and 32. It
depends on your hardware whether these depths are natively supported or if
a (possibly slow) conversion has to be done.
</para>
</formalpara>
<para>
If you should be lucky enough to have enough offscreen memory left to
put a whole image there, the DGA driver will use doublebuffering, which
results in much smoother movie replaying. It will tell you whether
double-buffering is enabled or not.
</para>

<para>
Doublebuffering means that the next frame of your video is being drawn in
some offscreen memory while the current frame is being displayed. When the
next frame is ready, the graphics chip is just told the location in memory
of the new frame and simply fetches the data to be displayed from there.
In the meantime the other buffer in memory will be filled again with new
video data.
</para>

<para>
Doublebuffering may be switched on by using the option
<option>-double</option> and may be disabled with
<option>-nodouble</option>. Current default option is to disable
doublebuffering. When using the DGA driver, onscreen display (OSD) only
works with doublebuffering enabled. However, enabling doublebuffering may
result in a big speed penalty (on my K6-II+ 525 it used an additional 20%
of CPU time!) depending on the implementation of DGA for your hardware.
</para>


<formalpara>
<title>SPEED ISSUES</title>

<para>
Generally spoken, DGA framebuffer access should be at least as fast as
using the X11 driver with the additional benefit of getting a fullscreen
image.  The percentage speed values printed by
<application>MPlayer</application> have to be interpreted with some care,
as for example, with the X11 driver they do not include the time used by
the X server needed for the actual drawing. Hook a terminal to a serial
line of your box and start <command>top</command> to see what is really
going on in your box.
</para>
</formalpara>

<para>
Generally spoken, the speedup done by using DGA against 'normal' use of X11
highly depends on your graphics card and how well the X server module for it
is optimized.
</para>

<para>
If you have a slow system, better use 15 or 16 bit depth since they require
only half the memory bandwidth of a 32 bit display.
</para>

<para>
Using a depth of 24 bit is even a good idea if your card natively just supports
32 bit depth since it transfers 25% less data compared to the 32/32 mode.
</para>

<para>
I've seen some AVI files already be replayed on a Pentium MMX 266. AMD K6-2
CPUs might work at 400 MHZ and above.
</para>


<formalpara>
<title>KNOWN BUGS</title>

<para>
Well, according to some developers of XFree, DGA is quite a beast. They
tell you better not to use it. Its implementation is not always flawless
with every chipset driver for XFree out there.
</para>
</formalpara>

<itemizedlist>
<listitem><simpara>
  With XFree 4.0.3 and <filename>nv.o</filename> there is a bug resulting
  in strange colors.
  </simpara></listitem>
<listitem><simpara>
  ATI driver requires to switch mode back more than once after finishing
  using of DGA.
  </simpara></listitem>
<listitem><simpara>
  Some drivers simply fail to switch back to normal resolution (use
  <keycap>Ctrl</keycap>+<keycap>Alt</keycap>+<keycap>Keypad +</keycap> and
  <keycap>Ctrl</keycap>+<keycap>Alt</keycap>+<keycap>Keypad -</keycap>
  to switch back manually).
  </simpara></listitem>
<listitem><simpara>
  Some drivers simply display strange colors.
  </simpara></listitem>
<listitem><simpara>
  Some drivers lie about the amount of memory they map into the process's
  address space, thus vo_dga won't use doublebuffering (SIS?).
  </simpara></listitem>
<listitem><simpara>
  Some drivers seem to fail to report even a single valid mode. In this
  case the DGA driver will crash telling you about a nonsense mode of
  100000x100000 or something like that.
  </simpara></listitem>
<listitem><simpara>
  OSD only works with doublebuffering enabled (else it flickers).
  </simpara></listitem>
</itemizedlist>

</sect4>
<!--</sect3>-->

<!-- ********** -->

<sect4 id="sdl">
<title>SDL</title>

<para>
<acronym>SDL</acronym> (Simple Directmedia Layer) is basically a unified
video/audio interface. Programs that use it know only about SDL, and not
about what video or audio driver does SDL actually use.  For example a Doom
port using SDL can run on svgalib, aalib, X, fbdev, and others, you only
have to specify the (for example) video driver to use with the
<envar>SDL_VIDEODRIVER</envar> environment variable. Well, in theory.
</para>

<para>
With <application>MPlayer</application>, we used its X11 driver's software
scaler ability for cards/drivers that doesn't support XVideo, until we made
our own (faster, nicer) software scaler. Also we used its aalib output, but
now we have ours which is more comfortable. Its DGA mode was better than
ours, until recently. Get it now? :)
</para>

<para>
It also helps with some buggy drivers/cards if the video is jerky (not slow
system problem), or audio is lagging.
</para>

<para>
SDL video output supports displaying subtitles under the movie, on the (if
present) black bar.
</para>

<variablelist>
<title>There are several command line switches for SDL:</title>
<varlistentry>
  <term><option>-vo sdl:<replaceable>name</replaceable></option></term>
  <listitem><simpara>
    specifies SDL video driver to use (i.e. <literal>aalib</literal>,
    <literal>dga</literal>, <literal>x11</literal>)
  </simpara></listitem>
</varlistentry>
<varlistentry>
  <term><option>-ao sdl:<replaceable>name</replaceable></option></term>
  <listitem><simpara>
    specifies SDL audio driver to use (i.e. <literal>dsp</literal>,
    <literal>esd</literal>, <literal>arts</literal>)
  </simpara></listitem>
</varlistentry>
<varlistentry>
  <term><option>-noxv</option></term>
  <listitem><simpara>
    disables XVideo hardware acceleration
  </simpara></listitem>
</varlistentry>
<varlistentry>
  <term><option>-forcexv</option></term>
  <listitem><simpara>
    tries to force XVideo acceleration
  </simpara></listitem>
</varlistentry>
</variablelist>

<table>
<title>SDL only keys</title>
<tgroup cols="2">
<thead>
<row><entry>Key</entry><entry>Action</entry></row>
</thead>
<tbody>
<row><entry><keycap>c</keycap></entry><entry>
    cycles available fullscreen modes
    </entry></row>
<row><entry><keycap>n</keycap></entry><entry>
    changes back to normal mode
    </entry></row>
</tbody>
</tgroup>
</table>

<itemizedlist>
<title>Known bugs:</title>
<listitem><simpara>
  Keys pressed under sdl:aalib console driver repeat forever. (use
  <option>-vo aa</option>!) It's bug in SDL, I can't change it (tested with
  SDL 1.2.1).
  </simpara></listitem>
<listitem><simpara>
  DO NOT USE SDL with GUI! It won't work as it should.
  </simpara></listitem>
</itemizedlist>
</sect4>


<sect4 id="svgalib">
<title>SVGAlib</title>

<formalpara>
<title>INSTALLATION</title>
<para>
You'll have to install svgalib and its development package in order for
<application>MPlayer</application> build its SVGAlib driver (autodetected,
but can be forced), and don't forget to edit
<filename>/etc/vga/libvga.config</filename> to suit your card and monitor.
</para>
</formalpara>

<note>
<para>
Be sure not to use the <option>-fs</option> switch, since it toggles the
usage of the software scaler, and it's slow. If you really need it, use the
<option>-sws 4</option> option which will produce bad quality, but is
somewhat faster.
</para>
</note>

<formalpara><title>EGA (4BPP) SUPPORT</title>
<para>
SVGAlib incorporates EGAlib, and <application>MPlayer</application> has the
possibility to display any movie in 16 colors, thus usable in the following
sets:
</para>
</formalpara>

<itemizedlist>
<listitem><simpara>
  EGA card with EGA monitor: 320x200x4bpp, 640x200x4bpp, 640x350x4bpp
  </simpara></listitem>
<listitem><simpara>
  EGA card with CGA monitor: 320x200x4bpp, 640x200x4bpp
  </simpara></listitem>
</itemizedlist>

<para>
The bpp (bits per pixel) value must be set to 4 by hand:
<option>-bpp 4</option>
</para>

<para>
The movie probably must be scaled down to fit in EGA mode:
<screen>-vf scale=640:350</screen>
or
<screen>-vf scale=320:200</screen>
</para>

<para>
For that we need fast but bad quality scaling routine:
<screen>-sws 4</screen>
</para>

<para>
Maybe automatic aspect correction has to be shut off:
<screen>-noaspect</screen>
</para>

<note><para>
According to my experience the best image quality on
EGA screens can be achieved by decreasing the brightness a bit:
<option>-vf eq=-20:0</option>. I also needed to lower the audio
samplerate on my box, because the sound was broken on 44kHz:
<option>-srate 22050</option>.
</para></note>

<para>
You can turn on OSD and subtitles only with the <option>expand</option>
filter, see the man page for exact parameters.
</para>
</sect4>


<sect4 id="fbdev">
<title>Framebuffer output (FBdev)</title>

<para>
Whether to build the FBdev target is autodetected during
<filename>./configure</filename>. Read the framebuffer documentation in
the kernel sources (<filename>Documentation/fb/*</filename>) for more
information.
</para>

<para>
If your card doesn't support VBE 2.0 standard (older ISA/PCI cards, such as
S3 Trio64), only VBE 1.2 (or older?): Well, VESAfb is still available, but
you'll have to load SciTech Display Doctor (formerly UniVBE) before booting
Linux. Use a DOS boot disk or whatever. And don't forget to register your
UniVBE ;))
</para>

<para>
The FBdev output takes some additional parameters above the others:
</para>

<variablelist>
<varlistentry>
  <term><option>-fb</option></term>
  <listitem><simpara>
    specify the framebuffer device to use (<filename>/dev/fb0</filename>)
    </simpara></listitem>
</varlistentry>
<varlistentry>
  <term><option>-fbmode</option></term>
  <listitem><simpara>
    mode name to use (according to <filename>/etc/fb.modes</filename>)
    </simpara></listitem>
</varlistentry>
<varlistentry>
  <term><option>-fbmodeconfig</option></term>
  <listitem><simpara>
    config file of modes (default <filename>/etc/fb.modes</filename>)
    </simpara></listitem>
</varlistentry>
<varlistentry>
  <term><option>-monitor-hfreq</option></term>
  <term><option>-monitor-vfreq</option></term>
  <term><option>-monitor-dotclock</option></term>
  <listitem><simpara>
    <emphasis role="bold">important</emphasis> values, see
    <filename>example.conf</filename>
    </simpara></listitem>
</varlistentry>
</variablelist>

<para>
If you want to change to a specific mode, then use
<screen>
mplayer -vm -fbmode <replaceable>name_of_mode</replaceable> <replaceable>filename</replaceable>
</screen>
</para>

<itemizedlist>
<listitem><para>
  <option>-vm</option> alone will choose the most suitable mode from
  <filename>/etc/fb.modes</filename>. Can be used together with
  <option>-x</option> and <option>-y</option> options too. The
  <option>-flip</option> option is supported only if the movie's pixel
  format matches the video mode's pixel format. Pay attention to the bpp
  value, fbdev driver tries to use the current, or if you specify the
  <option>-bpp</option> option, then that.
  </para></listitem>
<listitem><para>
  <option>-zoom</option> option isn't supported (use <option>-vf scale</option>).
  You can't use 8bpp (or less) modes.
  </para></listitem>
<listitem><para>
  You possibly want to turn the cursor off:
  <screen>echo -e '\033[?25l'</screen>
  or
  <screen>setterm -cursor off</screen>
  and the screen saver:
  <screen>setterm -blank 0</screen>
  To turn the cursor back on:
  <screen>echo -e '\033[?25h'</screen>
  or
  <screen>setterm -cursor on</screen>
  </para></listitem>
</itemizedlist>

<note>
<para>
FBdev video mode changing <emphasis>does not work</emphasis> with the VESA
framebuffer, and don't ask for it, since it's not an
<application>MPlayer</application> limitation.
</para>
</note>
</sect4>


<sect4 id="mga_vid">
<title>Matrox framebuffer (mga_vid)</title>

<para>
This section is about the Matrox G200/G400/G450/G550 BES (Back-End Scaler)
support, the mga_vid kernel driver. It's actively developed by A'rpi, and
it has hardware VSYNC support with triple buffering. It works on both
framebuffer console and under X.
</para>

<warning>
<para>
This is Linux only! On non-Linux (tested on FreeBSD) systems, you can use
<link linkend="vidix">VIDIX</link> instead!
</para>
</warning>

<procedure>
<title>Installation:</title>
<step><para>
  To use it, you first have to compile <filename>mga_vid.o</filename>:
  <screen>
cd drivers
make<!--
--></screen>
  </para></step>
<step><para>
  Then create <filename>/dev/mga_vid</filename> device:
  <screen>mknod /dev/mga_vid c 178 0</screen>
  and load the driver with
  <screen>insmod mga_vid.o</screen>
  </para></step>
<step><para>
  You should verify the memory size detection using the
  <command>dmesg</command> command. If it's bad, use the
  <option>mga_ram_size</option> option
  (<command>rmmod mga_vid</command> first),
  specify card's memory size in MB:
  <screen>insmod mga_vid.o mga_ram_size=16</screen>
  </para></step>
<step><para>
  To make it load/unload automatically when needed, first insert the
  following line at the end of <filename>/etc/modules.conf</filename>:
  
  <programlisting>alias char-major-178 mga_vid</programlisting>

  Then copy the <filename>mga_vid.o</filename> module to the appropriate
  place under <filename>/lib/modules/<replaceable>kernel
  version</replaceable>/<replaceable>somewhere</replaceable></filename>.
  </para><para>
  Then run
  <screen>depmod -a</screen>
  </para></step>
<step><para>
  Now you have to (re)compile <application>MPlayer</application>,
  <filename>./configure</filename> will detect
  <filename>/dev/mga_vid</filename> and build the 'mga' driver. Using it
  from <application>MPlayer</application> goes by <option>-vo mga</option>
  if you have matroxfb console, or <option>-vo xmga</option> under XFree86
  3.x.x or 4.x.x.
  </para></step>
</procedure>

<para>
The mga_vid driver cooperates with Xv.
</para>

<para>
The <filename>/dev/mga_vid</filename> device file can be read for some
info, for example by
<screen>cat /dev/mga_vid</screen>
and can be written for brightness change:
<screen>echo "brightness=120" &gt; /dev/mga_vid</screen>
</para>
</sect4>


<sect4 id="tdfxfb" xreflabel="3Dfx YUV support (tdfxfb)">
<title>3Dfx YUV support</title>
<para>
This driver uses the kernel's tdfx framebuffer driver to play movies with
YUV acceleration. You'll need a kernel with tdfxfb support, and recompile
with
<screen>./configure --enable-tdfxfb</screen>
</para>
</sect4>


<sect4 id="opengl">
<title>OpenGL output</title>

<para>
<application>MPlayer</application> supports displaying movies using OpenGL,
but if your platform/driver supports xv as should be the case on a PC with
Linux, use xv instead, OpenGL performance is considerably worse. If you
have an X11 implementation without xv support, OpenGL is a viable
alternative.
</para>

<para>
Unfortunately not all drivers support this feature. The Utah-GLX drivers
(for XFree86 3.3.6) support it for all cards.
See <ulink url="http://utah-glx.sourceforge.net"/> for details about how to
install it.
</para>

<para>
XFree86(DRI) 4.0.3 or later supports OpenGL with Matrox and Radeon cards,
4.2.0 or later supports Rage128.
See <ulink url="http://dri.sourceforge.net"/> for download and installation
instructions.
</para>

<para>
A hint from one of our users: the GL video output can be used to get
vsynced TV output. You'll have to set an environment variable (at
least on nVidia):
</para>

<para>
<command>export $__GL_SYNC_TO_VBLANK=1</command>
</para>

</sect4>


<sect4 id="aalib">
<title>AAlib - text mode displaying</title>

<para>
AAlib is a library for displaying graphics in text mode, using powerful
ASCII renderer. There are <emphasis>lots</emphasis> of programs already
supporting it, like Doom, Quake, etc. <application>MPlayer</application>
contains a very usable driver for it. If <filename>./configure</filename>
detects aalib installed, the aalib libvo driver will be built.
</para>

<para>
You can use some keys in the AA Window to change rendering options:
</para>

<informaltable>
<tgroup cols="2">
<thead>
  <row><entry>Key</entry><entry>Action</entry></row>
</thead>
<tbody>
<row><entry><keycap>1</keycap></entry><entry>
  decrease contrast
  </entry></row>
<row><entry><keycap>2</keycap></entry><entry>
  increase contrast
  </entry></row>
<row><entry><keycap>3</keycap></entry><entry>
  decrease brightness
  </entry></row>
<row><entry><keycap>4</keycap></entry><entry>
  increase brightness
  </entry></row>
<row><entry><keycap>5</keycap></entry><entry>
  switch fast rendering on/off
  </entry></row>
<row><entry><keycap>6</keycap></entry><entry>
  set dithering mode (none, error distribution, Floyd Steinberg)
  </entry></row>
<row><entry><keycap>7</keycap></entry><entry>
  invert image
  </entry></row>
<row><entry><keycap>8</keycap></entry><entry>
  toggles between aa and <application>MPlayer</application> control
  </entry></row>
</tbody>
</tgroup>
</informaltable>

<variablelist>
<title>The following command line options can be used:</title>
<varlistentry>
  <term><option>-aaosdcolor=<replaceable>V</replaceable></option></term>
  <listitem><para>
    change OSD color
    </para></listitem>
</varlistentry>
<varlistentry>
  <term><option>-aasubcolor=<replaceable>V</replaceable></option></term>
  <listitem><para>
    change subtitle color
    </para><para>
    where <replaceable>V</replaceable> can be:
    <literal>0</literal> (normal),
    <literal>1</literal> (dark),
    <literal>2</literal> (bold),
    <literal>3</literal> (bold font),
    <literal>4</literal> (reverse),
    <literal>5</literal> (special).
    </para></listitem>
</varlistentry>
</variablelist>

<variablelist>
<title>AAlib itself provides a large sum of options. Here are some
important:</title>
<varlistentry>
  <term><option>-aadriver</option></term>
  <listitem><simpara>
    set recommended aa driver (X11, curses, Linux)
    </simpara></listitem>
</varlistentry>
<varlistentry>
  <term><option>-aaextended</option></term>
  <listitem><simpara>
    use all 256 characters
    </simpara></listitem>
</varlistentry>
<varlistentry>
  <term><option>-aaeight</option></term>
  <listitem><simpara>
    use eight bit ASCII
    </simpara></listitem>
</varlistentry>
<varlistentry>
  <term><option>-aahelp</option></term>
  <listitem><simpara>
    prints out all aalib options
    </simpara></listitem>
</varlistentry>
</variablelist>

<note>
<para>
The rendering is very CPU intensive, especially when using AA-on-X
(using aalib on X), and it's least CPU intensive on standard,
non-framebuffer console. Use SVGATextMode to set up a big textmode,
then enjoy! (secondary head Hercules cards rock :)) (but IMHO you
can use <option>-vf 1bpp</option> option to get graphics on hgafb:)
</para>
</note>

<para>
Use the <option>-framedrop</option> option if your computer isn't fast
enough to render all frames!
</para>

<para>
Playing on terminal you'll get better speed and quality using the Linux
driver, not curses (<option>-aadriver linux</option>). But therefore you
need write access on
<filename>/dev/vcsa<replaceable>&lt;terminal&gt;</replaceable></filename>!
That isn't autodetected by aalib, but vo_aa tries to find the best mode.
See <ulink url="http://aa-project.sourceforge.net/tune"/> for further
tuning issues.
</para>
</sect4>


<sect4 id="caca">
<title><systemitem class="library">libcaca</systemitem> - Color ASCII Art library</title>

<para>
The <ulink url="http://sam.zoy.org/projects/libcaca/"><systemitem class="library">libcaca</systemitem></ulink>
library is a graphics library that outputs text instead of pixels, so that it
can work on older video cards or text terminals. It is not unlike the famous
<systemitem class="library">AAlib</systemitem> library.
<systemitem class="library">libcaca</systemitem> needs a terminal to work, thus
it should work on all Unix systems (including Mac OS X) using either the
<systemitem class="library">slang</systemitem> library or the
<systemitem class="library">ncurses</systemitem> library, on DOS using the
<systemitem class="library">conio.h</systemitem> library, and on Windows systems
using either <systemitem class="library">slang</systemitem> or
<systemitem class="library">ncurses</systemitem> (through Cygwin emulation) or
<systemitem class="library">conio.h</systemitem>. If
<filename>./configure</filename>
detects <systemitem class="library">libcaca</systemitem>, the caca libvo driver
will be built.
</para>

<itemizedlist>
<title>The differences with <systemitem class="library">AAlib</systemitem> are
  the following:</title>
<listitem><simpara>
   16 available colors for character output (256 color pairs)
  </simpara></listitem>
<listitem><simpara>
   color image dithering
  </simpara></listitem>
</itemizedlist>

<itemizedlist>
<title>But <systemitem class="library">libcaca</systemitem> also has the
  following limitations:</title>
<listitem><simpara>
   no support for brightness, contrast, gamma
  </simpara></listitem>
</itemizedlist>

<para>
You can use some keys in the caca window to change rendering options:
</para>

<informaltable>
<tgroup cols="2">
<thead>
  <row><entry>Key</entry><entry>Action</entry></row>
</thead>
<tbody>
<row><entry><keycap>d</keycap></entry><entry>
  Toggle <systemitem class="library">libcaca</systemitem> dithering methods.
  </entry></row>
<row><entry><keycap>a</keycap></entry><entry>
  Toggle <systemitem class="library">libcaca</systemitem> antialiasing.
  </entry></row>
<row><entry><keycap>b</keycap></entry><entry>
  Toggle <systemitem class="library">libcaca</systemitem> background.
  </entry></row>
</tbody>
</tgroup>
</informaltable>

<variablelist>
<title><systemitem class="library">libcaca</systemitem> will also look for certain environment variables:</title>
<varlistentry>
  <term><option>CACA_DRIVER</option></term>
  <listitem><simpara>
    Set recommended caca driver. e.g. ncurses, slang, x11.
    </simpara></listitem>
</varlistentry>
<varlistentry>
  <term><option>CACA_GEOMETRY (X11 only)</option></term>
  <listitem><simpara>
    Specifies the number of rows and columns. e.g. 128x50.
    </simpara></listitem>
</varlistentry>
<varlistentry>
  <term><option>CACA_FONT (X11 only)</option></term>
  <listitem><simpara>
    Specifies the font to use. e.g. fixed, nexus.
    </simpara></listitem>
</varlistentry>
</variablelist>

<para>
Use the <option>-framedrop</option> option if your computer is not fast
enough to render all frames.
</para>

</sect4>


<sect4 id="vesa">
<title>VESA - output to VESA BIOS</title>

<para>
This driver was designed and introduced as a <emphasis role="bold">generic
driver</emphasis> for any video card which has VESA VBE 2.0 compatible
BIOS. Another advantage of this driver is that it tries to force TV output
on.
<citetitle>VESA BIOS EXTENSION (VBE) Version 3.0 Date: September 16,
1998</citetitle> (Page 70) says:
</para>

<blockquote>
<formalpara><title>Dual-Controller Designs</title>
<para>
VBE 3.0 supports the dual-controller design by assuming that since both
controllers are typically provided by the same OEM, under control of a
single BIOS ROM on the same graphics card, it is possible to hide the fact
that two controllers are indeed present from the application. This has the
limitation of preventing simultaneous use of the independent controllers,
but allows applications released before VBE 3.0 to operate normally. The
VBE Function 00h (Return Controller Information) returns the combined
information of both controllers, including the combined list of available
modes.  When the application selects a mode, the appropriate controller is
activated.  Each of the remaining VBE functions then operates on the active
controller.
</para>
</formalpara>
</blockquote>

<para>
So you have chances to get working TV-out by using this driver.
(I guess that TV-out frequently is standalone head or standalone output
at least.)
</para>

<itemizedlist spacing="compact">
<title>ADVANTAGES</title>
<listitem><simpara>
  You have chances to watch movies <emphasis role="bold">if Linux even doesn't
  know</emphasis> your video hardware.
  </simpara></listitem>
<listitem><simpara>
  You don't need to have installed any graphics' related things on your
  Linux (like X11 (aka XFree86), fbdev and so on). This driver can be run
  from <emphasis role="bold">text-mode</emphasis>.
  </simpara></listitem>
<listitem><simpara>
  You have chances to get <emphasis role="bold">working TV-out</emphasis>.
  (It's known at least for ATI's cards).
  </simpara></listitem>
<listitem><simpara>
  This driver calls <function>int 10h</function> handler thus it's not
  an emulator - it calls <emphasis role="bold">real</emphasis> things of
  <emphasis>real</emphasis> BIOS in <emphasis>real-mode</emphasis>
  (actually in vm86 mode).
  </simpara></listitem>
<listitem><simpara>
  You can use VIDIX with it, thus getting accelerated video display
  <emphasis role="bold">and</emphasis> TV output at the same time!
  (Recommended for ATI cards.)
  </simpara></listitem>
<listitem><simpara>
  If you have VESA VBE 3.0+, and you had specified
  <option>monitor-hfreq, monitor-vfreq, monitor-dotclock</option> somewhere
  (config file, or command line) you will get the highest possible refresh rate.
  (Using General Timing Formula). To enable this feature you have to specify
  <emphasis role="bold">all</emphasis> your monitor options.
  </simpara></listitem>
</itemizedlist>

<itemizedlist spacing="compact">
<title>DISADVANTAGES</title>
<listitem><simpara>
   It works only on <emphasis role="bold">x86 systems</emphasis>.
  </simpara></listitem>
<listitem><simpara>
  It can be used only by <systemitem class="username">root</systemitem>.
  </simpara></listitem>
<listitem><simpara>
  Currently it's available only for <emphasis role="bold">Linux</emphasis>.
  </simpara></listitem>
</itemizedlist>

<important>
<para>
Don't use this driver with <emphasis role="bold">GCC 2.96</emphasis>!
It won't work!
</para>
</important>

<variablelist>
<title>COMMAND LINE OPTIONS AVAILABLE FOR VESA</title>
<varlistentry>
  <term><option>-vo vesa:<replaceable>opts</replaceable></option></term>
  <listitem><simpara>
    currently recognized: <literal>dga</literal> to force dga mode and
    <literal>nodga</literal> to disable dga mode. In dga mode you can enable
    double buffering via the <option>-double</option> option. Note: you may omit
    these parameters to enable <emphasis role="bold">autodetection</emphasis> of
    dga mode.
    </simpara></listitem>
</varlistentry>
</variablelist>

<itemizedlist spacing="compact">
<title>KNOWN PROBLEMS AND WORKAROUNDS</title>
<listitem><simpara>
  If you have installed <emphasis role="bold">NLS</emphasis> font on your
  Linux box and run VESA driver from text-mode then after terminating
  <application>MPlayer</application> you will have
  <emphasis role="bold">ROM font</emphasis> loaded instead of national.
  You can load national font again by using <command>setsysfont</command>
  utility from the Mandrake distribution for example.
  (<emphasis role="bold">Hint</emphasis>: The same utility is used for
  localization of fbdev).
  </simpara></listitem>
<listitem><simpara>
  Some <emphasis role="bold">Linux graphics drivers</emphasis> don't update
  active <emphasis role="bold">BIOS mode</emphasis> in DOS memory.
  So if you have such problem - always use VESA driver only from
  <emphasis role="bold">text-mode</emphasis>. Otherwise text-mode (#03) will
  be activated anyway and you will need restart your computer.
  </simpara></listitem>
<listitem><simpara>
  Often after terminating VESA driver you get <emphasis role="bold">black</emphasis>
  screen. To return your screen to original state - simply switch to other console
  (by pressing <keycap>Alt</keycap>+<keycap>F&lt;x&gt;</keycap>)
  then switch to your previous console by the same way.
  </simpara></listitem>
<listitem><simpara>
  To get <emphasis role="bold">working TV-out</emphasis> you need have plugged
  TV-connector in before booting your PC since video BIOS initializes
  itself only once during POST procedure.
  </simpara></listitem>
</itemizedlist>
</sect4>


<sect4 id="x11">
<title>X11</title>

<para>
Avoid if possible. Outputs to X11 (uses shared memory extension), with no
hardware acceleration at all. Supports (MMX/3DNow/SSE accelerated, but
still slow) software scaling, use the options <option>-fs -zoom</option>.
Most cards have hardware scaling support, use the <option>-vo xv</option>
output for them, or <option>-vo xmga</option> for Matrox cards.
</para>

<para>
The problem is that most cards' driver doesn't support hardware
acceleration on the second head/TV. In those cases, you see green/blue
colored window instead of the movie. This is where this driver comes in
handy, but you need powerful CPU to use software scaling. Don't use the SDL
driver's software output+scaler, it has worse image quality!
</para>

<para>
Software scaling is very slow, you better try changing video modes instead.
It's very simple. See the <link linkend="dga-modelines">DGA section's
modelines</link>, and insert them into your <filename>XF86Config</filename>.

<itemizedlist spacing="compact">
<listitem><simpara>
  If you have XFree86 4.x.x: use the <option>-vm</option> option. It will
  change to a resolution your movie fits in. If it doesn't:
  </simpara></listitem>
<listitem><simpara>
  With XFree86 3.x.x: you have to cycle through available resolutions
  with the
  <keycap>Ctrl</keycap>+<keycap>Alt</keycap>+<keycap>plus</keycap>
  and
  <keycap>Ctrl</keycap>+<keycap>Alt</keycap>+<keycap>minus</keycap>
  keys.
  </simpara></listitem>
</itemizedlist>
</para>

<para>
If you can't find the modes you inserted, browse XFree86's output. Some
drivers can't use low pixelclocks that are needed for low resolution
video modes.
</para>
</sect4>


<sect4 id="vidix">
<title>VIDIX</title>

<formalpara>
<title>PREAMBLE</title>
<para>
<acronym>VIDIX</acronym> is the abbreviation for <emphasis role="bold">VID</emphasis>eo
<emphasis role="bold">I</emphasis>nterface for *ni<emphasis role="bold">X</emphasis>.
VIDIX was designed and introduced as an interface for fast user-space drivers
providing such video performance as mga_vid does for Matrox cards. It's also very
portable.
</para>
</formalpara>
<para>
This interface was designed as an attempt to fit existing video
acceleration interfaces (known as mga_vid, rage128_vid, radeon_vid,
pm3_vid) into a fixed scheme. It provides a high level interface to chips
which are known as BES (BackEnd scalers) or OV (Video Overlays). It doesn't
provide low level interface to things which are known as graphics servers.
(I don't want to compete with X11 team in graphics mode switching). I.e.
main goal of this interface is to maximize the speed of video playback.
</para>

<itemizedlist spacing="compact">
<title>USAGE</title>
<listitem><simpara>
  You can use standalone video output driver: <option>-vo xvidix</option>.
  This driver was developed as X11's front end to VIDIX technology.  It
  requires X server and can work only under X server. Note that, as it directly
  accesses the hardware and circumvents the X driver, pixmaps cached in the
  graphics card's memory may be corrupted. You can prevent this by limiting
  the amount of video memory used by X with the XF86Config option "VideoRam"
  in the device section. You should set this to the amount of memory installed
  on your card minus 4MB. If you have less than 8MB of video ram, you can use
  the option "XaaNoPixmapCache" in the screen section instead.
  </simpara></listitem>
<listitem><simpara>
  There is a console VIDIX driver: <option>-vo cvidix</option>.
  This requires a working and initialized framebuffer for most cards (or else
  you'll just mess up the screen), and you'll have a similar effect as with
  <option>-vo mga</option> or <option>-vo fbdev</option>. nVidia cards however
  are able to output truly graphical video on a real text console. See the
  <link linkend="vidix-nvidia">nvidia_vid</link> section for more information.
  </simpara></listitem>
<listitem><simpara>
  You can use VIDIX subdevice which was applied to several video output
  drivers, such as: <option>-vo vesa:vidix</option>
  (<emphasis role="bold">Linux only</emphasis>) and
  <option>-vo fbdev:vidix</option>.
  </simpara></listitem>
</itemizedlist>

<para>
Indeed it doesn't matter which video output driver is used with
<emphasis role="bold">VIDIX</emphasis>.
</para>

<itemizedlist spacing="compact">
<title>REQUIREMENTS</title>
<listitem><simpara>
  Video card should be in graphics mode (except nVidia cards with the
  <option>-vo cvidix</option> output driver).
  </simpara></listitem>
<listitem><simpara>
  <application>MPlayer</application>'s video output driver should know
  active video mode and be able to tell to VIDIX subdevice some video
  characteristics of server.
  </simpara></listitem>
</itemizedlist>

<formalpara>
<title>USAGE METHODS</title>
<para>
When VIDIX is used as <emphasis role="bold">subdevice</emphasis> (<option>-vo
vesa:vidix</option>) then video mode configuration is performed by video
output device (<emphasis role="bold">vo_server</emphasis> in short). Therefore you can
pass into command line of <application>MPlayer</application> the same keys
as for vo_server. In addition it understands <option>-double</option> key
as globally visible parameter. (I recommend using this key with VIDIX at
least for ATI's card). As for <option>-vo xvidix</option>, currently it
recognizes the following options: <option>-fs -zoom -x -y -double</option>.
</para>
</formalpara>
<para>
Also you can specify VIDIX's driver directly as third subargument in
command line:

<screen>mplayer -vo xvidix:mga_vid.so -fs -zoom -double <replaceable>file.avi</replaceable></screen>
or
<screen>mplayer -vo vesa:vidix:radeon_vid.so -fs -zoom -double -bpp 32 <replaceable>file.avi</replaceable></screen>

But it's dangerous, and you shouldn't do that. In this case given driver
will be forced and result is unpredictable (it may
<emphasis role="bold">freeze</emphasis> your computer). You should do that
ONLY if you are absolutely sure it will work, and
<application>MPlayer</application> doesn't do it automatically. Please tell
about it to the developers. The right way is to use VIDIX without arguments
to enable driver autodetection.
</para>

<para>
VIDIX is new technology and it's extremely possible that on your
system it won't work. In this case only solution for you
it's port it (mainly libdha). But there is hope that it will work on those
systems where X11 does.
</para>

<para>
Since VIDIX requires direct hardware access you can either run it as root
or set the SUID bit on the <application>MPlayer</application> binary
(<emphasis role="bold">Warning: This is a security risk!</emphasis>).
Alternatively, you can use a special kernel module, like this:
</para>

<procedure>
<step><para>
  Download the <ulink url="http://www.arava.co.il/matan/svgalib/">development version</ulink>
  of svgalib (for example 1.9.17), <emphasis role="bold">OR</emphasis>
  download a version made by Alex especially for usage with <application>MPlayer</application>
  (it doesn't need the svgalib source to compile) from
  <ulink url="http://www.mplayerhq.hu/~alex/svgalib_helper-1.9.17-mplayer.tar.bz2">here</ulink>.
  </para></step>
<step><para>
  Compile the module in the <filename class="directory">svgalib_helper</filename>
  directory (it can be found inside the <filename class="directory">svgalib-1.9.17/kernel/</filename>
  directory if you've downloaded the source from the svgalib site) and insmod it.
  </para></step>
<step><para>
  To create the necessary devices in the <filename class="directory">/dev</filename>
  directory, do a <screen>make device</screen> in the <filename class="directory">svgalib_helper</filename>
  dir, as root.
  </para></step>
<step><para>
  Move the <filename class="directory">svgalib_helper</filename> directory to
  <filename class="directory">mplayer/main/libdha/svgalib_helper</filename>.
  </para></step>
<step><para>
  Required if you download the source from the svgalib site: Remove the comment before the
  CFLAGS line containing "svgalib_helper" string from the
  <filename class="directory">libdha/Makefile</filename>.
  </para></step>
<step><para>
  Recompile and install libdha.
  </para></step>
</procedure>

<sect5 id="vidix-ati">
<title>ATI cards</title>
<para>
Currently most ATI cards are supported natively, from Mach64 to the
newest Radeons.
</para>

<para>
There are two compiled binaries: <filename>radeon_vid</filename> for Radeon and
<filename>rage128_vid</filename> for Rage 128 cards. You may force one or let
the VIDIX system autoprobe all available drivers.
</para>
</sect5>

<sect5 id="vidix-mga">
<title>Matrox cards</title>
<para>
Matrox G200, G400, G450 and G550 have been reported to work.
</para>

<para>
The driver supports video equalizers and should be nearly as fast as the
<link linkend="mga_vid">Matrox framebuffer</link>
</para>
</sect5>

<sect5 id="vidix-trident">
<title>Trident cards</title>
<para>
There is a driver available for the Trident Cyberblade/i1 chipset, which
can be found on VIA Epia motherboards.
</para>

<para>
The driver was written and is maintained by
<ulink url="http://www.blackfiveservices.co.uk/EPIAVidix.shtml">Alastair M. Robinson</ulink>
</para>
</sect5>

<sect5 id="vidix-3dlabs">
<title>3DLabs cards</title>
<para>
Although there is a driver for the 3DLabs GLINT R3 and Permedia3 chips, no one
has tested it, so reports are welcome.
</para>
</sect5>

<sect5 id="vidix-nvidia">
<title>nVidia cards</title>
<para>
There's a relatively new nVidia driver out there, it's known to work on Riva
128, TNT and GeForce2 chipsets, also others have been reported working.
</para>

<itemizedlist spacing="compact">
<title>LIMITATIONS</title>
<listitem><para>
  It's recommended to use the binary nVidia drivers for X before using this
  VIDIX driver, because some of the registers which need to be initialized
  haven't been discovered yet, so it will probably fail with the Open Source
  XFree86 <filename>nv.o</filename> driver.
  </para></listitem>
<listitem><para>
  Currently only codecs capable of UYVY colorspace output
  can work in conjunction with this driver. Unfortunately, this excludes
  every single decoder from the
  <systemitem class="library">libavcodec</systemitem> family. This leaves
  us with the following usable popular codecs:
  <systemitem>cvid, divxds, xvid, divx4, wmv7, wmv8</systemitem> and some
  others. Please note that this is only
  a temporal inconvenience. The usage syntax is as follows:
  <screen>
    mplayer -vf format=uyvy -vc divxds <replaceable>divx3file.avi</replaceable>
  </screen>
  </para></listitem>
</itemizedlist>

<para>
  An unique feature of the nvidia_vid driver is its ability to display video on
  <emphasis role="bold">plain, pure, text-only console</emphasis> - with no
  framebuffer or X magic whatsoever. For this purpose, we'll have to use the
  <option>cvidix</option> video output, as the following example shows:
  <screen>
    mplayer -vf format=uyvy -vc divxds -vo cvidix <replaceable>example.avi</replaceable>
  </screen>
</para>

<para>
Reports awaited!
</para>
</sect5>

<sect5 id="vidix-sis">
<title>SiS cards</title>
<para>
This is very experimental code, just like nvidia_vid.
</para>

<para>
It's been tested on SiS 650/651/740 (the most common chipsets used in the 
SiS versions of the "Shuttle XPC" barebones boxes out there)
</para>

<para>
Reports awaited!
</para>
</sect5>
</sect4>

<sect4 id="directfb">
<title>DirectFB</title>
<blockquote><para>
&quot;DirectFB is a graphics library which was designed with embedded systems
in mind. It offers maximum hardware accelerated performance at a minimum
of resource usage and overhead.&quot; - quoted from <ulink url="http://www.directfb.org"/>
</para></blockquote>

<para>I'll exclude DirectFB features from this section.</para>

<para>
Though <application>MPlayer</application> is not supported as a &quot;video
provider&quot; in DirectFB, this output driver will enable video playback through
DirectFB. It will - of course - be accelerated, on my Matrox G400 DirectFB's speed
was the same as XVideo.
</para>

<para>
Always try to use the newest version of DirectFB. You can use DirectFB options on
the command line, using the <option>-dfbopts</option> option. Layer selection can
be done by the subdevice method, e.g.: <option>-vo directfb:2</option>
(layer -1 is default: autodetect)
</para>
</sect4>

<sect4 id="dfbmga">
<title>DirectFB/Matrox (dfbmga)</title>
<para>
Please read the <link linkend="directfb">main DirectFB</link> section for general
information.
</para>

<para>
This video output driver will enable CRTC2 (on the second head) on Matrox
G400/G450/G550 cards, displaying video
<emphasis role="bold">independent</emphasis> of the first head.
</para>

<para>
Ville Syrjala's has a 
<ulink url="http://www.sci.fi/~syrjala/directfb/Matrox_TV-out_README.txt">README</ulink>
and a 
<ulink url="http://www.sci.fi/~syrjala/directfb/matrox_tv-out_howto">HOWTO</ulink>
on his homepage that explain how to make DirectFB TV output run on Matrox cards.
</para>

<note><para>
the first DirectFB version with which we could get this working was
0.9.17 (it's buggy, needs that <systemitem>surfacemanager</systemitem> patch from
the URL above). Anyway, porting of the CRTC2 code to <emphasis role="bold">mga_vid</emphasis>
is underway.
</para></note>
</sect4>
</sect3>

<sect3 id="mpeg_decoders">
<title>MPEG decoders</title>

<sect4 id="dvb">
<title>DVB output and input</title>
<para>
<application>MPlayer</application> supports cards with the Siemens DVB chipset
from vendors like Siemens, Technotrend, Galaxis or Hauppauge. The latest DVB
drivers are available from the <ulink url="http://www.linuxtv.org">Linux TV site</ulink>.
If you want to do software transcoding you should have at least a 1GHz CPU.
</para>

<para>
Configure should detect your DVB card. If it did not, force detection with
</para>

<para><screen>./configure --enable-dvb</screen></para>

<para>If you have ost headers at a non-standard path, set the path with</para>

<para><screen>./configure --with-extraincdir=<replaceable>DVB source directory</replaceable>/ost/include
</screen></para>

<para>Then compile and install as usual.</para>

<formalpara>
<title>USAGE</title>
<para>
Hardware decoding (playing standard MPEG1/2 files) can be done with this command:
</para>
</formalpara>

<para>
<screen>mplayer -ao mpegpes -vo mpegpes <replaceable>file.mpg|vob</replaceable></screen>
</para>

<para>
Software decoding or transcoding different formats to MPEG1 can be achieved using
a command like this:
</para>
<para><screen>
mplayer -ao mpegpes -vo mpegpes <replaceable>yourfile.ext</replaceable>
mplayer -ao mpegpes -vo mpegpes -vf expand <replaceable>yourfile.ext</replaceable>
</screen></para>

<para>
Note that DVB cards only support heights 288 and 576 for PAL or 240 and 480 for
NTSC. You <emphasis role="bold">must</emphasis> rescale for other heights by adding
<option>scale=width:height</option> with the width and height you want to the
<option>-vf</option> option. DVB cards accept various widths, like 720, 704,
640, 512, 480, 352 etc and do hardware scaling in horizontal direction, so you
do not need to scale horizontally in most cases. For a 512x384 (aspect 4:3)
DivX try:
</para>

<para><screen>mplayer -ao mpegpes -vo mpegpes -vf scale=512:576</screen></para>

<para>If you have a widescreen movie and you do not want to scale it to full height,
you can use the <option>expand=w:h</option> filter to add black bands. To view a
640x384 DivX, try:
</para>

<para>
<screen>mplayer -ao mpegpes -vo mpegpes -vf expand=640:576 <replaceable>file.avi</replaceable>
</screen>
</para>

<para>If your CPU is too slow for a full size 720x576 DivX, try downscaling:</para>

<para>
<screen>mplayer -ao mpegpes -vo mpegpes -vf scale=352:576 <replaceable>file.avi</replaceable>
</screen>
</para>

<para>If speed does not improve, try vertical downscaling, too:</para>

<para>
<screen>mplayer -ao mpegpes -vo mpegpes -vf scale=352:288 <replaceable>file.avi</replaceable>
</screen>
</para>

<para>
For OSD and subtitles use the OSD feature of the expand filter. So, instead of
<option>expand=w:h</option> or <option>expand=w:h:x:y</option>, use
<option>expand=w:h:x:y:1</option> (the 5th parameter <option>:1</option>
at the end will enable OSD rendering). You may want to move the image up a bit
to get a bigger black zone for subtitles. You may also want to move subtitles up,
if they are outside your TV screen, use the <option>-subpos &lt;0-100&gt;</option>
option to adjust this (<option>-subpos 80</option> is a good choice).
</para>

<para>
In order to play non-25fps movies on a PAL TV or with a slow CPU, add the
<option>-framedrop</option> option.
</para>

<para>
To keep the aspect ratio of DivX files and get the optimal scaling
parameters (hardware horizontal scaling and software vertical scaling
while keeping the right aspect ratio), use the new dvbscale filter:
</para>

<para><screen>
for a  4:3 TV: -vf dvbscale,scale=-1:0,expand=-1:576:-1:-1:1
for a 16:9 TV: -vf dvbscale=1024,scale=-1:0,expand=-1:576:-1:-1:1
</screen></para>

<formalpara>
<title>Digital TV (DVB input module)</title>
<para>You can use your DVB card for watching Digital TV.</para>
</formalpara>

<para>
  You should have the programs <command>scan</command> and
  <command>szap/tzap/czap</command> installed; they are all included in
  the drivers package.
</para>

<para>
  Verify that your drivers are working properly with a program such as
  <ulink url="http://www.sf.net/projects/dvbtools/"><command>dvbstream</command></ulink>
  (that is the base of the DVB input module).
</para>

<para>
  Now you should compile a <filename>~/.mplayer/channels.conf</filename>
  file, with the syntax accepted by <command>szap/tzap/czap</command>, or
  have <command>scan</command> compile it for you.
</para>

<para>
  If you have more than one card type (e.g. Satellitar, Terrestrial and Cable)
  you can save your channels files as
  <filename>~/.mplayer/channels.conf.sat</filename>,
  <filename>~/.mplayer/channels.conf.ter</filename>
  and <filename>~/.mplayer/channels.conf.cbl</filename>,
  respectively, so as to implicitly hint <application>MPlayer</application>
  to use these files rather than <filename>~/.mplayer/channels.conf</filename>,
  and you only need to specify which card to use.
</para>

<para>
  Make sure that you have have <emphasis>only</emphasis> Free to Air
  channels in your <filename>channels.conf</filename> file, or
  <application>MPlayer</application> will try to skip to the next visible one,
  but it may take long if there are many consecutive encrypted channels.
</para>

<para>
  In your audio and video fields you can use an extended syntax:
  <option>...:pid[+pid]:...</option> (for a maximum of 6 pids each);
  in this case <application>MPlayer</application> will include in the
  stream all the indicated pids, plus pid 0 (that contains the PAT).
  You are encouraged to include in each row the PMT pid for the
  corresponding channel (if you know it).
  Other possible uses are: televideo pid, second audio track, etc.
</para>


<para>
  To show the first of the channels present in your list, run
</para>

<screen>
  mplayer dvb://
</screen>

<para>
  If you want to watch a specific channel, such as R1, run
</para>

<screen>
  mplayer dvb://R1
</screen>

<para>
  If you have more than one card you also need to specify the number of the card 
  where the channel is visible (e.g. 2) with the syntax:
</para>

<screen>
  mplayer dvb://2@R1
</screen>

<para>
  To change channels press the <keycap>h</keycap> (next) and
  <keycap>k</keycap> (previous) keys, or use the OSD menu (requires
  a working <link linkend="subosd">OSD subsystem</link>).
</para>

<para>
  If your <filename>~/.mplayer/menu.conf</filename> contains a
  <literal>&lt;dvbsel&gt;</literal> entry, such as the one in the example
  file <filename>etc/dvb-menu.conf</filename> (that you can use to overwrite
  <filename>~/.mplayer/menu.conf</filename>), the main menu will show a
  sub-menu entry that will permit you to choose one of the channels present
  in your <filename>channels.conf</filename>, possibly preceded by a menu
  with the list of cards available if more than one is usable by
  <application>MPlayer</application>.
</para>

<para>
  If you want to save a program to disk you can use
</para>

<screen>
  mplayer -dumpfile r1.ts -dumpstream dvb://R1
</screen>

<para>
  If you want to record it in a different format (re-encoding it) instead
  you can run a command such as
</para>

<screen>
  mencoder -o r1.avi -ovc xvid -xvidencopts bitrate=800 -oac mp3lame -lameopts cbr:br=128 -pp=ci dvb://R1
</screen>

<para>
  Read the man page for a list of options that you can pass to the
  DVB input module.
</para>

<formalpara>
<title>FUTURE</title>
<para>
If you have questions or want to hear feature announcements and take part in
discussions on this subject, join our
<ulink url="http://mplayerhq.hu/mailman/listinfo/mplayer-dvb">MPlayer-DVB</ulink>
mailing list. Please remember that the list language is English.
</para>
</formalpara>

<para>
In the future you may expect the ability to display OSD and subtitles using
the native OSD feature of DVB cards, as well as more fluent playback of
non-25fps movies and realtime transcoding between MPEG2 and MPEG4 (partial
decompression).
</para>
</sect4>

<sect4 id="dxr2">
<title>DXR2</title>
<para><application>MPlayer</application> supports hardware accelerated playback
  with the Creative DXR2 card.</para>
<para>
First of all you will need properly installed DXR2 drivers. You can find
the drivers and installation instructions at the
<ulink url="http://dxr2.sourceforge.net/">DXR2 Resource Center</ulink> site.
</para>

<variablelist>
<title>USAGE</title>
<varlistentry>
<term><option>-vo dxr2</option></term>
<listitem><para>enable TV output</para></listitem>
</varlistentry>

<varlistentry>
<term><option>-vo dxr2:x11</option> or <option>-vo dxr2:xv</option></term>
<listitem><para>enable Overlay output in X11</para></listitem>
</varlistentry>

<varlistentry>
<term><option>-dxr2 &lt;option1:option2:...&gt;</option></term>
<listitem><para>This option is used to control the DXR2 driver.</para></listitem>
</varlistentry>
</variablelist>

<para>
The overlay chipset used on the DXR2 is of pretty bad quality but the
default settings should work for everybody. The OSD may be usable with the
overlay (not on TV) by drawing it in the colorkey. With the default colorkey
settings you may get variable results, usually you will see the colorkey
around the characters or some other funny effect. But if you properly adjust
the colorkey settings you should be able to get acceptable results.
</para>

<para>Please see the man page for available options.</para>
</sect4>

<sect4 id="dxr3">
<title>DXR3/Hollywood+</title>
<para>
<application>MPlayer</application> supports hardware accelerated playback
with the Creative DXR3 and Sigma Designs Hollywood Plus cards. These cards
both use the em8300 MPEG decoder chip from Sigma Designs.
</para>

<para>
First of all you will need properly installed DXR3/H+ drivers, version 0.12.0
or later. You can find the drivers and installation instructions at the
<ulink url="http://dxr3.sourceforge.net/">DXR3 &amp; Hollywood Plus for Linux</ulink>
site. <filename>configure</filename> should detect your card automatically,
compilation should go without problems.
</para>

<!-- FIXME: find a more clear presentation -->
<variablelist>
<title>USAGE</title>
<varlistentry>
<term><option>-vo dxr3:prebuf:sync:norm=x:<replaceable>device</replaceable></option></term>
<listitem><para>
<option>overlay</option> activates the overlay instead of TVOut. It requires
that you have a properly configured overlay setup to work right. The easiest
way to configure the overlay is to first run autocal. Then run mplayer with
dxr3 output and without overlay turned on, run dxr3view. In dxr3view you can
tweak the overlay settings and see the effects in realtime, perhaps this feature
will be supported by the <application>MPlayer</application> GUI in the future.
When overlay is properly set up you will no longer need to use dxr3view.
<option>prebuf</option> turns on prebuffering. Prebuffering is a feature of the
em8300 chip that enables it to hold more than one frame of video at a time. This
means that when you are running with prebuffering <application>MPlayer</application>
will try to keep the video buffer filled with data at all times. If you are on
a slow machine <application>MPlayer</application> will probably use close to,
or precisely 100% of CPU. This is especially common if you play pure MPEG streams
(like DVDs, SVCDs a.s.o.) since <application>MPlayer</application> will not have
to reencode it to MPEG it will fill the buffer very fast.
With prebuffering video playback is <emphasis role="bold">much</emphasis>
less sensitive to other programs hogging the CPU, it will not drop frames unless
applications hog the CPU for a long time.
When running without prebuffering the em8300 is much more sensitive to CPU load,
so it is highly suggested that you turn on <application>MPlayer</application>'s
<option>-framedrop</option> option to avoid further loss of sync.
<option>sync</option> will turn on the new sync-engine. This is currently an
experimental feature. With the sync feature turned on the em8300's internal clock
will be monitored at all times, if it starts to deviate from
<application>MPlayer</application>'s clock it will be reset causing the em8300 to
drop any frames that are lagging behind.
<option>norm=x</option> will set the TV norm of the DXR3 card without the need
for external tools like em8300setup. Valid norms are 5 = NTSC, 4 = PAL-60,
3 = PAL. Special norms are 2 (auto-adjust using PAL/PAL-60) and 1 (auto-adjust
using PAL/NTSC) because they decide which norm to use by looking at the frame
rate of the movie. norm = 0 (default) does not change the current norm.
<option><replaceable>device</replaceable></option> = device number to use if you have more than one em8300
card.
Any of these options may be left out.
<option>:prebuf:sync</option> seems to work great when playing DivX movies. People
have reported problems using the prebuf option when playing MPEG1/2 files. You
might want to try running without any options first, if you have sync problems,
or DVD subtitle problems, give <option>:sync</option> a try.
</para></listitem>
</varlistentry>

<varlistentry>
<term><option>-ao oss:/dev/em8300_ma-<replaceable>X</replaceable></option></term>
<listitem><para>
For audio output, where <replaceable>X</replaceable> is the device number (0 if one card).
</para></listitem>
</varlistentry>

<varlistentry>
<term><option>-aop list=resample:fout=<replaceable>xxxxx</replaceable></option></term>
<listitem><para>
The em8300 cannot play back samplerates lower than 44100Hz. If the sample
rate is below 44100Hz select either 44100Hz or 48000Hz depending on which
one matches closest. I.e. if the movie uses 22050Hz use 44100Hz as
44100 / 2 = 22050, if it is 24000Hz use 48000Hz as 48000 / 2 = 24000 and so on.
This does not work with digital audio output (<option>-ac hwac3</option>).
</para></listitem>
</varlistentry>

<varlistentry>
<term><option>-vf lavc/fame</option></term>
<listitem><para>
To watch non-MPEG content on the em8300 (i.e. DivX or RealVideo) you have to
specify an MPEG1 video filter such as
<systemitem class="library">libavcodec</systemitem> (lavc) or
<systemitem class="library">libfame</systemitem> (fame). At
the moment lavc is both faster and gives better image quality, it is suggested
that you use that unless you have problems with it. See the man page for further
info about <option>-vf lavc/fame</option>.
Using lavc is highly recommended. Currently there is no way of setting the fps
of the em8300 which means that it is fixed to 29.97fps. Because of this it is
highly recommended that you use <option>-vf lavc=<replaceable>quality</replaceable>:25</option>
especially if you are using prebuffering. Then why 25 and not 29.97? Well, the
thing is that when you use 29.97 the picture becomes a bit jumpy. The reason for
this is unknown to us. If you set it to somewhere between 25 and 27 the picture
becomes stable. For now all we can do is accept this for a fact.
</para></listitem>
</varlistentry>

<varlistentry>
<term><option>-vf expand=-1:-1:-1:-1:1</option></term>
<listitem><para>
Although the DXR3 driver can put some OSD onto the MPEG1/2/4 video, it has
much lower quality than <application>MPlayer</application>'s traditional OSD,
and has several refresh problems as well. The command line above will firstly
convert the input video to MPEG4 (this is mandatory, sorry), then apply an
expand filter which won't expand anything (-1: default), but apply the normal
OSD onto the picture (that's what the "1" at the end does).
</para></listitem>
</varlistentry>

<varlistentry>
<term><option>-ac hwac3</option></term>
<listitem><para>
The em8300 supports playing back AC3 audio (surround sound) through the
digital audio output of the card. See the <option>-ao oss</option> option above,
it must be used to specify the DXR3's output instead of a sound card.
</para></listitem>
</varlistentry>
</variablelist>
</sect4>

</sect3>

<sect3 id="other">
<title>Other visualization hardware</title>

<sect4 id="zr">
<title>Zr</title>

<para>
This is a display-driver (<option>-vo zr</option>) for a number of MJPEG
capture/playback cards (tested for DC10+ and Buz, and it should work for the
LML33, the DC10). The driver works by encoding the frame to JPEG and then
sending it to the card. For the JPEG encoding
<systemitem class="library">libavcodec</systemitem>
is used, and required. With the special <emphasis>cinerama</emphasis> mode,
you can watch movies in true wide screen provided that you have two beamers
and two MJPEG cards. Depending on resolution and quality settings, this driver
may require a lot of CPU power, remember to specify <option>-framedrop</option>
if your machine is too slow. Note: My AMD K6-2 350MHz is (with
<option>-framedrop</option>) quite adequate for watching VCD sized material and
downscaled movies.
</para>

<para>
This driver talks to the kernel driver available at
<ulink url="http://mjpeg.sourceforge.net"/>, so
you must get it working first. The presence of an MJPEG card is autodetected by the
<filename>configure</filename> script, if autodetection fails, force detection with
<screen>./configure --enable-zr</screen>
</para>
<para>
The output can be controlled by several options, a long description of the
options can be found in the man page, a short list of options can be viewed
by running
<screen>mplayer -zrhelp</screen>
</para>

<para>
Things like scaling and the OSD (on screen display) are not handled by
this driver but can be done using the video filters. For example, suppose
that you have a movie with a resolution of 512x272 and you want to view it
fullscreen on your DC10+. There are three main possibilities, you may scale
the movie to a width of 768, 384 or 192. For performance and quality reasons,
I would choose to scale the movie to 384x204 using the fast bilinear software
scaler. The command line is
<screen>
mplayer -vo zr -sws 0 -vf scale=384:204 <replaceable>movie.avi</replaceable>
</screen>
</para>

<para>
Cropping can be done by the <option>crop</option> filter and by this
driver itself. Suppose that a movie is too wide for display on your Buz and
that you want to use <option>-zrcrop</option> to make the movie less wide,
then you would issue the following command
<screen>
mplayer -vo zr -zrcrop 720x320+80+0 <replaceable>benhur.avi</replaceable>
</screen>
</para>

<para>
if you want to use the <option>crop</option> filter, you would do
<screen>
mplayer -vo zr -vf crop=720:320:80:0 <replaceable>benhur.avi</replaceable>
</screen>
</para>

<para>
Extra occurrences of <option>-zrcrop</option> invoke <emphasis>cinerama</emphasis>
mode, i.e. you can distribute the movie over several TV's or beamers to create a
larger screen. Suppose you have two beamers. The left one is connected to your
Buz at <filename>/dev/video1</filename> and the right one is connected to
your DC10+ at <filename>/dev/video0</filename>. The movie has a resolution
of 704x288. Suppose also that you want the right beamer in black and white and
that the left beamer should have JPEG frames at quality 10, then you would
issue the following command
<screen>
mplayer -vo zr -zrdev /dev/video0 -zrcrop 352x288+352+0 -zrxdoff 0 -zrbw \
          -zrcrop 352x288+0+0 -zrdev /dev/video1 -zrquality 10 \
	  <replaceable>movie.avi</replaceable>
</screen>
</para>

<para>
You see that the options appearing before the second <option>-zrcrop</option>
only apply to the DC10+ and that the options after the second
<option>-zrcrop</option> apply to the Buz. The maximum number of MJPEG cards
participating in <emphasis>cinerama</emphasis> is four, so you can build a
2x2 vidiwall.
</para>

<para>
Finally an important remark: Do not start or stop XawTV on the playback device
during playback, it will crash your computer. It is, however, fine to
<emphasis role="bold">FIRST</emphasis> start XawTV, <emphasis role="bold">THEN</emphasis>
start <application>MPlayer</application>, wait for <application>MPlayer</application>
to finish and <emphasis role="bold">THEN</emphasis> stop XawTV.
</para>
</sect4>

<sect4 id="blinkenlights">
<title>Blinkenlights</title>
<para>
This driver is capable of playback using the Blinkenlights UDP protocol. If you
don't know what <ulink url="http://www.blinkenlights.de/">Blinkenlights</ulink>
or its successor
<ulink url="http://www.blinkenlights.de/arcade/">Arcade</ulink>
are, find it out. Although this is most probably the least used video output
driver, without a doubt it is the coolest <application>MPlayer</application>
has to offer. Just watch some of the
<ulink url="http://www.blinkenlights.de/video.en.html">Blinkenlights documentation videos</ulink>.
On the Arcade video you can see the Blinkenlights output driver in
action at 00:07:50.
</para>
</sect4>
</sect3>

<sect3 id="tvout">
<title>TV-out support</title>

<sect4 id="tvout-mga-g400">
<title>Matrox G400 cards</title>

<para>
Under Linux you have two methods to get G400 TV out working:
</para>

<important>
<para>
for Matrox G450/G550 TV-out instructions, please see the next section!
</para>
</important>

<variablelist>
<varlistentry>
  <term>XFree86</term>
  <listitem><para>
    Using the driver and the HAL module, available from the <ulink
    url="http://www.matrox.com">Matrox site</ulink>. This will give you X
    on the TV.
    </para><para>
    <emphasis role="bold">This method doesn't give you accelerated playback</emphasis>
    as under Windows! The second head has only YUV framebuffer, the <emphasis>BES</emphasis>
    (Back End Scaler, the YUV scaler on G200/G400/G450/G550 cards) doesn't
    work on it! The windows driver somehow workarounds this, probably by
    using the 3D engine to zoom, and the YUV framebuffer to display the
    zoomed image. If you really want to use X, use the <option>-vo x11 -fs
    -zoom</option> options, but it will be <emphasis role="bold">SLOW</emphasis>,
    and has <emphasis role="bold">Macrovision</emphasis> copy protection enabled
    (you can "workaround" Macrovision using this
    <ulink url="http://avifile.sourceforge.net/mgamacro.pl">perl script</ulink>).
    </para></listitem>
</varlistentry>
<varlistentry>
  <term>Framebuffer</term>
  <listitem><para>
    Using the <emphasis role="bold">matroxfb modules</emphasis> in the 2.4
    kernels. 2.2 kernels don't have the TVout feature in them, thus unusable
    for this.  You have to enable ALL matroxfb-specific feature during compilation
    (except MultiHead), and compile them into <emphasis role="bold">modules</emphasis>!
    You'll also need I2C enabled.
    </para>

    <procedure>
    <step><para>
      Enter <filename class="directory">TVout</filename> and type
      <command>./compile.sh</command>. Install
      <filename>TVout/matroxset/matroxset</filename>
      somewhere into your <envar>PATH</envar>.
      </para></step>
    <step><para>
      If you don't have <command>fbset</command> installed, put
      <filename>TVout/fbset/fbset</filename>
      somewhere into your <envar>PATH</envar>.
      </para></step>
    <step><para>
      If you don't have <command>con2fb</command> installed, put
      <filename>TVout/con2fb/con2fb</filename>
      somewhere into your <envar>PATH</envar>.
      </para></step>
    <step><para>
      Then enter into the <filename class="directory">TVout/</filename> directory
      in the <application>MPlayer</application> source, and execute
      <filename>./modules</filename> as root. Your text-mode console will
      enter into framebuffer mode (no way back!).
      </para></step>
    <step><para>
      Next, EDIT and run the <filename>./matroxtv</filename> script. This will
      present you to a very simple menu. Press <keycap>2</keycap> and
      <keycap>Enter</keycap>. Now you should have the same picture on your
      monitor, and TV. If the TV (PAL by default)
      picture has some weird stripes on it, the script wasn't able to set the
      resolution correctly (to 640x512 by default). Try other resolutions
      from the menu and/or experiment with fbset.
      </para></step>
    <step><para>
      Yoh. Next task is to make the cursor on tty1 (or whatever) to
      disappear, and turn off screen blanking. Execute the following
      commands:
      
      <screen>
echo -e '\033[?25l'
setterm -blank 0<!--
   --></screen>
      or
      <screen>
setterm -cursor off
setterm -blank 0<!--
   --></screen>

      You possibly want to put the above into a script, and also clear the
      screen. To turn the cursor back:
      <screen>echo -e '\033[?25h'</screen> or
      <screen>setterm -cursor on</screen>
      </para></step>
    <step><para>
      Yeah kewl. Start movie playing with
      <screen>
mplayer -vo mga -fs -screenw 640 -screenh 512 <replaceable>filename</replaceable><!--
   --></screen>
   
      (If you use X, now change to matroxfb with for example
      <keycap>Ctrl</keycap>+<keycap>Alt</keycap>+<keycap>F1</keycap>.)
      Change <literal>640</literal> and <literal>512</literal> if you set
      the resolution to other...
      </para></step>
    <step><para>
      <emphasis role="bold">Enjoy the ultra-fast ultra-featured Matrox TV
      output (better than Xv)!</emphasis>
      </para></step>
    </procedure>
  </listitem>
</varlistentry>
</variablelist>

<formalpara>
<title>Building a Matrox TV-out cable</title>
<para>
No one takes any responsibility, nor guarantee for any damage caused
by this documentation.
</para>
</formalpara>

<formalpara>
<title>Cable for G400</title>
<para>
The CRTC2 connector's fourth pin is the composite video signal. The
ground are the sixth, seventh and eighth pins. (info contributed
from Balázs Rácz)
</para>
</formalpara>

<formalpara>
<title>Cable for G450</title>
<para>
The CRTC2 connector's first pin is the composite video signal. The
ground are the fifth, sixth, seventh, and fifteenth (5, 6, 7, 15)
pins. (info contributed from Balázs Kerekes)
</para>
</formalpara>
</sect4>

<sect4 id="tv-out_matrox_g450">
<title>Matrox G450/G550 cards</title>
<para>
TV output support for these cards has only been recently introduced, and is
not yet in the mainstream kernel. Currently the <emphasis role="bold">mga_vid</emphasis>
module can't be used AFAIK, because the G450/G550 driver works only in one
configuration: the first CRTC chip (with much more features) on the first display
(on monitor), and the second CRTC (no <emphasis role="bold">BES</emphasis> - for
explanation on BES, please see the G400 section above) on TV. So you can only
use <application>MPlayer</application>'s <emphasis>fbdev</emphasis> output driver
at the present.
</para>

<para>
The first CRTC can't be routed to the second head currently. The author of the
kernel matroxfb driver - Petr Vandrovec - will maybe make support for this, by
displaying the first CRTC's output onto both of the heads at once, as currently
recommended for G400, see the section above.
</para>

<para>
The necessary kernel patch and the detailed HOWTO is downloadable from
<ulink url="http://www.bglug.ca/matrox_tvout/"/>
</para>
</sect4>


<sect4 id="tvout-ati">
<title>ATI cards</title>

<formalpara>
<title>PREAMBLE</title>
<para>
Currently ATI doesn't want to support any of its TV-out chips under Linux,
because of their licensed Macrovision technology.
</para>
</formalpara>

<itemizedlist>
<title>ATI CARDS TV-OUT STATUS ON LINUX</title>
<listitem><simpara>
  <emphasis role="bold">ATI Mach64</emphasis>:
  supported by <ulink url="http://gatos.sf.net">GATOS</ulink>.
  </simpara></listitem>
<listitem><simpara>
  <emphasis role="bold">ASIC Radeon VIVO</emphasis>:
  supported by <ulink url="http://gatos.sf.net">GATOS</ulink>.
  </simpara></listitem>
<listitem><simpara>
  <emphasis role="bold">Radeon</emphasis> and <emphasis role="bold">Rage128</emphasis>:
  supported by <application>MPlayer</application>!
  Check <link linkend="vesa">VESA driver</link> and
  <link linkend="vidix">VIDIX</link> sections.
  </simpara></listitem>
<listitem><simpara>
  <emphasis role="bold">Rage Mobility P/M, Radeon, Rage 128, Mobility M3/M4</emphasis>:
  supported by <ulink url="http://www.stud.uni-hamburg.de/users/lennart/projects/atitvout/">atitvout</ulink>.
  </simpara></listitem>
</itemizedlist>

<para>
On other cards, just use the <link linkend="vesa">VESA</link> driver,
without VIDIX. Powerful CPU is needed, though.
</para>

<para>
Only thing you need to do - <emphasis role="bold">Have the TV connector
plugged in before booting your PC</emphasis> since video BIOS initializes
itself only once during POST procedure.
</para>
</sect4>


<sect4 id="tvout-voodoo">
<title>Voodoo 3</title>
<para>
Check <ulink url="http://www.iki.fi/too/tvout-voodoo3-3000-xfree">this URL</ulink>.
</para>
</sect4>

<sect4 id="tvout-nvidia">
<title>nVidia</title>
<para>
First, you MUST download the closed-source drivers from <ulink url="http://nvidia.com"/>.
I will not describe the installation and configuration process because it does not cover
the scope of this documentation.
</para>

<para>
After XFree86, XVideo, and 3D acceleration is properly working, edit your
card's Device section in the <filename>XF86Config</filename> file, according
to the following example (adapt for your card/TV):

<programlisting>
Section "Device"
        Identifier      "GeForce"
        VendorName      "ASUS"
        BoardName       "nVidia GeForce2/MX 400"
        Driver          "nvidia"
        #Option         "NvAGP" "1"
        Option          "NoLogo"
        Option          "CursorShadow"  "on"

        Option          "TwinView"
        Option          "TwinViewOrientation" "Clone"
        Option          "MetaModes" "1024x768,640x480"
        Option          "ConnectedMonitor" "CRT, TV"
        Option          "TVStandard" "PAL-B"
        Option          "TVOutFormat" "Composite"

EndSection
</programlisting>
</para>

<para>
Of course the important thing is the TwinView part.
</para>
</sect4>

<sect4 id="tvout-neomagic">
<title>Neomagic</title>
<para>
The Neomagic chip is found in a variety of laptops, some of them are equipped
with a simple analog TV encoder, some have a more advanced one.
<itemizedlist>
<listitem><simpara>
  <emphasis role="bold">Analog encoder chip</emphasis>:
  Tested on a Toshiba Tecra 8000. Its TV output chip is miserable crap. Avoid
  if possible.
  </simpara> <simpara>
  You must use <option>-vo vesa</option>. The tested chip was capable of
  1.333333 aspect ratio only, so be sure to use the <option>-x</option>,
  <option>-y</option> options and/or the
  <option>-vf scale,crop,expand</option> filters if the box doesn't let
  you enable TV output. Maximum resolution was 720*576 at 16bpp.
  </simpara>
  <simpara>
  Known issues: VESA-only, 1.33333 limitation, image isn't always centered,
  movie becomes 4bpp in every 10 minutes, and stays that way. Frequent hard
  freezes, LCD display problems.
  </simpara></listitem>
<listitem><simpara>
  <emphasis role="bold">Chrontel 70xx encoder chip</emphasis>:
  Found in IBM Thinkpad 390E and possibly other Thinkpads or notebooks.
  </simpara><simpara>
  You must use <option>-vo vesa:neotv_pal</option> for PAL or
  <option>-vo vesa:neotv_ntsc</option> for NTSC.
  It will provide TV output function in the following 16 bpp and 8 bpp modes:
  </simpara>
  <itemizedlist>
    <listitem><simpara>NTSC 320x240, 640x480 and maybe 800x600 too.</simpara></listitem>
    <listitem><simpara>PAL  320x240, 400x300, 640x480, 800x600.  </simpara></listitem>
  </itemizedlist>
  <simpara>Mode 512x384 is not supported in BIOS. You must scale the image
  to a different resolution to activate TV out. If you can see an image on the
  screen in 640x480 or in 800x600 but not in 320x240 or other smaller
  resolution you need to replace two tables in <filename>vbelib.c</filename>.
  See the vbeSetTV function for details. Please contact the author in this case.
  </simpara>
  <simpara>
  Known issues: VESA-only, no other controls such as brightness, contrast,
  blacklevel, flickfilter are implemented.
  </simpara>
</listitem>
</itemizedlist>
</para>
</sect4>
</sect3>
</sect2>