Mercurial > mplayer.hg
annotate DOCS/xml/en/tvinput.xml @ 9948:ad081e771ada
patch by Albeu + update of matrox_tvout url
author | nicolas |
---|---|
date | Sun, 20 Apr 2003 17:08:57 +0000 |
parents | 861a40949bf3 |
children | 49b1a67e7381 |
rev | line source |
---|---|
9675 | 1 <?xml version="1.0" encoding="iso-8859-1"?> |
2 <sect1 id="tv-input" xreflabel="TV input"> | |
3 <title>TV input</title> | |
4 | |
5 <para> | |
6 This section is about how to enable <emphasis role="bold">watching/grabbing | |
9776
861a40949bf3
fixes, some by Dmitry Baryshkov <lumag@qnc.ru>, some by me
nicolas
parents:
9683
diff
changeset
|
7 from V4L compatible TV tuner</emphasis>. See the man page for a description |
861a40949bf3
fixes, some by Dmitry Baryshkov <lumag@qnc.ru>, some by me
nicolas
parents:
9683
diff
changeset
|
8 of TV options and keyboard controls. |
9675 | 9 </para> |
10 | |
11 | |
12 <sect2 id="tv-compilation"> | |
13 <title>Compilation</title> | |
14 | |
15 <procedure> | |
16 <step><para> | |
17 First, you have to recompile. <filename>./configure</filename> will | |
18 autodetect kernel headers of v4l stuff and the existence of | |
19 <filename>/dev/video*</filename> entries. If they exist, TV support will | |
20 be built (see the output of <filename>./configure</filename>). | |
21 </para></step> | |
22 <step><para> | |
23 Make sure your tuner works with another TV software in Linux, for | |
9776
861a40949bf3
fixes, some by Dmitry Baryshkov <lumag@qnc.ru>, some by me
nicolas
parents:
9683
diff
changeset
|
24 example <application>XawTV</application>. |
9675 | 25 </para></step> |
26 </procedure> | |
27 </sect2> | |
28 | |
29 <sect2 id="tv-tips"> | |
30 <title>Usage tips</title> | |
31 <para> | |
32 The full listing of the options is available on the manual page. | |
33 Here are just a few tips: | |
34 </para> | |
35 <itemizedlist> | |
36 <listitem> | |
37 <para> | |
38 Use the <option>channels</option> option. An example: | |
9948 | 39 <screen>-tv channels=26-MTV1,23-TV2</screen> |
9675 | 40 Explanation: using this option, only the 26 and 23 channels will be usable, |
41 and there will be a nice OSD text upon channel switching, displaying the | |
42 channel's name. Spaces in the channel name must be replaced by the | |
43 "_" character. | |
44 </para> | |
45 </listitem> | |
46 | |
47 <listitem> | |
48 <para> | |
49 Choose some sane image dimensions. The dimensions of the resulting image should | |
50 be divisible by 16. | |
51 </para> | |
52 </listitem> | |
53 | |
54 <listitem> | |
55 <para> | |
56 If you capture the video with the vertical resolution higher than half of | |
57 the full resolution (i.e. 288 for PAL or 240 for NTSC), make sure you turned | |
58 deinterlacing on. Otherwise you'll get a movie which is distorted during | |
59 fast-motion scenes and the bitrate controller will be probably even unable | |
60 to retain the specified bitrate as the interlacing artifacts produce high | |
61 amount of detail and thus consume lot of bandwidth. You can enable | |
9677 | 62 deinterlacing with <option>-vf pp=DEINT_TYPE</option>. Usually |
9675 | 63 <option>pp=lb</option> does a good job, but it can be matter of personal |
64 preference. See other deinterlacing algorithms in the manual and give it a try. | |
65 </para> | |
66 </listitem> | |
67 | |
68 <listitem> | |
69 <para> | |
70 Crop out the dead space. When you capture the video, the areas at the edges | |
71 are usually black or contain some noise. These again consume lots of | |
72 unnecessary bandwidth. More precisely it's not the black areas themselves | |
73 but the sharp transitions between the black and the brighter video image | |
74 which do but that's not important for now. Before you start capturing, | |
75 adjust the arguments of the <option>crop</option> option so that all the | |
76 crap at the margins is cropped out. Again, don't forget to keep the resulting | |
77 dimensions sane. | |
78 </para> | |
79 </listitem> | |
80 | |
81 <listitem> | |
82 <para> | |
83 Watch out for CPU load. It shouldn't cross the 90% boundary for most of the | |
84 time. If you have a large capture buffer, MEncoder can survive an overload | |
85 for few seconds but nothing more. It's better to turn off the 3D OpenGL | |
86 screensavers and similar stuff. | |
87 </para> | |
88 </listitem> | |
89 | |
90 <listitem> | |
91 <para> | |
92 Don't mess with the system clock. <application>MEncoder</application> uses the | |
93 system clock for doing A/V sync. If you adjust the system clock (especially | |
94 backwards in time), MEncoder gets confused and you will lose frames. This is | |
95 an important issue if you are hooked to a network and run some time | |
96 synchronization software like NTP. You have to turn NTP off during the capture | |
97 process if you want to capture reliably. | |
98 </para> | |
99 </listitem> | |
100 | |
101 <listitem> | |
102 <para> | |
103 Don't change the <option>outfmt</option> unless you know what you are doing | |
104 or your card/driver really doesn't support the default (YV12 colorspace). | |
105 In the older versions of <application>MPlayer</application>/ | |
106 <application>MEncoder</application> it was necessary to specify the output | |
107 format. This issue should be fixed in the current releases and <option>outfmt</option> | |
108 isn't required anymore, and the default suits the most purposes. For example, | |
109 if you are capturing into DivX using libavcodec and specify | |
110 <option>outfmt=RGB24</option> in order to increase the quality of the captured | |
111 images, the captured image will be actually later converted back into YV12 so | |
112 the only thing you achieve is a massive waste of CPU power. | |
113 </para> | |
114 </listitem> | |
115 | |
116 <listitem> | |
117 <para> | |
118 To specify the I420 colorspace (<option>outfmt=i420</option>), you have to add an | |
119 option <option>-vc rawi420</option> due to a fourcc conflict with an Intel Indeo | |
120 video codec. | |
121 </para> | |
122 </listitem> | |
123 | |
124 <listitem> | |
125 <para> | |
126 There are several ways of capturing audio. You can grab the sound either using | |
127 your soundcard via an external cable connection between video card and line-in, | |
128 or using the built-in ADC in the bt878 chip. In the latter case, you have to | |
129 load the <emphasis role="bold">btaudio</emphasis> driver. Read the | |
130 <filename>linux/Documentation/sound/btaudio</filename> file (in the kernel | |
131 tree, not MPlayer's) for some instructions on using this driver. | |
132 </para> | |
133 </listitem> | |
134 | |
135 <listitem> | |
136 <para> | |
137 If <application>MEncoder</application> cannot open the audio device, make | |
138 sure that it is really available. There can be some trouble with the sound | |
139 servers like arts (KDE) or esd (GNOME). If you have a full duplex soundcard | |
140 (almost any decent card supports it today), and you are using KDE, try to | |
141 check the "full duplex" option in the sound server preference menu. | |
142 </para> | |
143 </listitem> | |
144 </itemizedlist> | |
145 </sect2> | |
146 | |
147 | |
148 <sect2 id="tv-examples"> | |
149 <title>Examples</title> | |
150 | |
151 <informalexample> | |
152 <para> | |
153 Dummy output, to AAlib :) | |
154 <screen> | |
9948 | 155 mplayer -tv driver=dummy:width=640:height=480 -vo aa tv://<!-- |
9675 | 156 --></screen> |
157 </para> | |
158 </informalexample> | |
159 | |
160 <informalexample> | |
161 <para> | |
162 Input from standard V4L: | |
163 <screen> | |
9948 | 164 mplayer -tv driver=v4l:width=640:height=480:outfmt=i420 -vc rawi420 -vo xv tv://<!-- |
9675 | 165 --></screen> |
166 </para> | |
167 </informalexample> | |
168 | |
169 <informalexample> | |
170 <para> | |
171 A more sophisticated example. This makes MEncoder capture the full PAL | |
172 image, crop the margins, and deinterlace the picture using a linear blend | |
173 algorithm. Audio is compressed with a constant bitrate of 64kbps, using | |
174 LAME codec. This setup is suitable for capturing movies. | |
175 <screen> | |
9948 | 176 mencoder -tv driver=v4l:width=768:height=576 \ |
9675 | 177 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=900 \ |
178 -oac mp3lame -lameopts cbr:br=64 \ | |
9948 | 179 -vf crop=720:544:24:16,pp=lb -o output.avi tv:// |
9675 | 180 </screen> |
181 </para> | |
182 </informalexample> | |
183 | |
184 <informalexample> | |
185 <para> | |
186 This will additionally rescale the image to 384x288 and compresses the | |
187 video with the bitrate of 350kbps in high quality mode. The vqmax option | |
188 looses the quantizer and allows the video compressor to actualy reach so | |
189 low bitrate even at the expense of the quality. This can be used for | |
190 capturing long TV series, where the video quality isn't so important. | |
191 <screen> | |
9948 | 192 mencoder -tv driver=v4l:width=768:height=576 \ |
9675 | 193 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=350:vhq:vqmax=31:keyint=300 \ |
194 -oac mp3lame -lameopts cbr:br=48 \ | |
9948 | 195 -vf crop=720:540:24:18,pp=tn/lb,scale=384:288 -sws 1 -o output.avi tv:// |
9675 | 196 </screen> |
197 It's also possible to specify smaller image dimensions in the <option>-tv</option> | |
198 option and omit the software scaling but this approach uses the maximum available | |
199 information and is a little more resistant to noise. The bt8x8 chips can do the | |
200 pixel averaging only in the horizontal direction due to a hardware limitation. | |
201 </para> | |
202 </informalexample> | |
203 </sect2> | |
204 </sect1> |