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