11156
|
1 <?xml version="1.0" encoding="utf-8"?>
|
|
2 <!-- synced with 1.6 -->
|
|
3 <sect1 id="tv-input" xreflabel="TV input">
|
|
4 <title>Wejście TV</title>
|
|
5
|
|
6 <para>
|
|
7 Sekcja ta opisuje jak <emphasis role="bold">oglądać/nagrywać obraz
|
|
8 za pomocą tunera TV kompatybilnego z V4L</emphasis>. Zajrzyj do strony man
|
|
9 by zobaczyć opis opcji TV i klawiszy sterujących.
|
|
10 </para>
|
|
11
|
|
12
|
|
13 <sect2 id="tv-compilation">
|
|
14 <title>Kompilacja</title>
|
|
15
|
|
16 <procedure>
|
|
17 <step><para>
|
|
18 Najpierw musisz przekompilować. <filename>./configure</filename> wykryje
|
|
19 automatycznie nagłówki jądra związane z V4L i obecność urządzeń
|
|
20 <filename>/dev/video*</filename>. Jeśli istnieją, obsługa TV zostanie
|
|
21 wbudowana (zobacz wynik działania <filename>./configure</filename>).
|
|
22 </para></step>
|
|
23 <step><para>
|
|
24 Upewnij się, że Twój tuner działa z innymi programami do obsługi TV pod Linuksem, na
|
|
25 przykład <application>XawTV</application>.
|
|
26 </para></step>
|
|
27 </procedure>
|
|
28 </sect2>
|
|
29
|
|
30 <sect2 id="tv-tips">
|
|
31 <title>Wskazówki użytkowania</title>
|
|
32 <para>
|
|
33 Kompletna lista opcji dostępna jest na stronie man.
|
|
34 Tu jest tylko kilka wskazówek:
|
|
35 </para>
|
|
36 <itemizedlist>
|
|
37 <listitem>
|
|
38 <para>
|
|
39 Używaj opcji <option>channels</option>. Przykład
|
|
40 <screen>-tv channels=26-MTV1,23-TV2</screen>
|
|
41 Wyjaśnienie: używając tej opcji, tylko kanały 23 i 26 będą dostępne oraz pojawi
|
|
42 się fajny napis na OSD przy zmianie kanału, wyświetlający jego nazwę.
|
|
43 Odstępy w nazwie kanału muszą zostać zastąpione znakiem "_".
|
|
44 </para>
|
|
45 </listitem>
|
|
46
|
|
47 <listitem>
|
|
48 <para>
|
|
49 Używaj rozsądnych rozmiarów obrazu. Rozmiary obrazu wynikowego powinny
|
|
50 być podzielne przez 16.
|
|
51 </para>
|
|
52 </listitem>
|
|
53
|
|
54 <listitem>
|
|
55 <para>
|
|
56 Jeśli nagrywasz obraz video o pionowej rozdzielczości większej niż połowa
|
|
57 rozdzielczości pełnej (np. 288 dla PAL lub 240 dla NTSC), upewnij się, że włączyłeś
|
|
58 usuwanie przeplotu (deinterlacing). W przeciwnym wypadku dostaniesz film, który
|
|
59 jest zniekształcony w trakcie scen o dużej dynamice, a wskazana szybkość prawdopodobnie
|
|
60 nie będzie nawet mogła być utrzymana przez kontroler szybkości (bitrate
|
|
61 controller), gdyż artefakty przeplotu tworzą duże ilości szczegółów, a co za tym idzie,
|
|
62 potrzebują dużej przepustowości. Możesz włączyć usuwanie przeplotu za pomocą opcji
|
|
63 <option>-vf pp=TYP_DEINT</option>. Zwykle <option>pp=lb</option> spisuje się dobrze,
|
|
64 ale to kwestia gustu. Poczytaj o innych algorytmach usuwania przeplotu na stronie man
|
|
65 i zacznij eksperymentować.
|
|
66 </para>
|
|
67 </listitem>
|
|
68
|
|
69 <listitem>
|
|
70 <para>
|
|
71 Usuwaj "martwe miejsca". Kiedy nagrywasz video, są pewnie miejsca przy brzegach,
|
|
72 które są zazwyczaj czarne lub zawierają szum. Jak się łatwo domyślić, niepotrzebnie
|
|
73 wymagają większej przepustowości (dokładniej, to nie same czarne miejsca, lecz
|
|
74 ostre przejścia pomiędzy czarnym kolorem i jaśniejszym obrazem video, ale nie jest
|
|
75 to akurat takie ważne). Zanim zaczniesz nagrywać, ustaw argumenty opcji <option>crop</option>
|
|
76 by wszystkie "śmieci" na brzegach zostały wycięte. Oczywiście nie zapomnij o utrzymaniu
|
|
77 prawidłowych wymiarów obrazu.
|
|
78 </para>
|
|
79 </listitem>
|
|
80
|
|
81 <listitem>
|
|
82 <para>
|
|
83 Uważaj na obciążenie CPU. Nie powinno ono przekroczyć granicy 90% przez większość
|
|
84 czasu. Jeśli masz duży bufor nagrywania, MEncoder może przetrwać przeciążenie przez
|
|
85 najwyżej kilka sekund i nic więcej. Lepiej więc wyłączyć wszystkie trójwymiarowe
|
|
86 wygaszacze OpenGL i inne tego typu bajery.
|
|
87 </para>
|
|
88 </listitem>
|
|
89
|
|
90 <listitem>
|
|
91 <para>
|
|
92 Nie mieszaj z zegarem systemowym. <application>MEncoder</application> korzysta z
|
|
93 niego do synchronizacji A/V. Jeśli zmodyfikujesz zegar systemowy (zwłaszcza
|
|
94 wstecz), MEncoder się pogubi i utraci klatki. Jest to bardzo ważna sprawa jeśli
|
|
95 jesteś podpięty do sieci i używasz do synchronizacji czasu różnych programów typu
|
|
96 NTP. Musisz wyłączyć NTP w trakcie nagrywania, jeśli chcesz, by było ono
|
|
97 przeprowadzone niezawodnie.
|
|
98 </para>
|
|
99 </listitem>
|
|
100
|
|
101 <listitem>
|
|
102 <para>
|
|
103 Nie zmieniaj opcji <option>outfmt</option>, chyba, że wiesz co robisz lub Twoja
|
|
104 karta/sterownik naprawdę nie obsługuje ustawienia domyślnego (przestrzeń
|
|
105 kolorów YV12). W poprzednich wersjach
|
|
106 <application>MPlayera</application>/<application>MEncodera</application>
|
|
107 konieczne było podanie formatu wyjścia.
|
|
108 Ten problem powinien być rozwiązany w aktualnych wydaniach i opcja
|
|
109 <option>outfmt</option> nie jest już wymagana, a ustawienie domyślne powinno
|
|
110 pasować każdemu. Na przykład, jeśli nagrywasz do formatu DivX używając libavcodec
|
|
111 i podasz opcję <option>outfmt=RGB24</option> aby zwiększyć jakość nagrywanego obrazu,
|
|
112 zostanie on i tak później z powrotem przekonwertowany do YV12, więc jedyne, co
|
|
113 osiągniesz, to ogromna strata mocy obliczeniowej.
|
|
114 </para>
|
|
115 </listitem>
|
|
116
|
|
117 <listitem>
|
|
118 <para>
|
|
119 By użyć przestrzeni kolorów I420 (<option>outfmt=i420</option>), musisz dodać opcję
|
|
120 <option>-vc rawi420</option> z powodu konfliktu fourcc z kodekiem Intel Indeo.
|
|
121 </para>
|
|
122 </listitem>
|
|
123
|
|
124 <listitem>
|
|
125 <para>
|
|
126 Jest kilka sposobów na nagrywanie audio. Możesz nagrywać dźwięk za pomocą Twojej
|
|
127 karty dźwiękowej korzystając z zewnętrznego kabla pomiędzy kartą video i wejściem
|
|
128 liniowym lub korzystając z wbudowanego w układ bt878 przetwornika ADC. W tym drugim
|
|
129 przypadku musisz załadować sterownik <emphasis role="bold">btaudio</emphasis>.
|
|
130 Przeczytaj plik <filename>linux/Documentation/sound/btaudio</filename> (w drzewie
|
|
131 jądra, a nie MPlayera) by dowiedzieć się jak korzystać z tego sterownika.
|
|
132 </para>
|
|
133 </listitem>
|
|
134
|
|
135 <listitem>
|
|
136 <para>
|
|
137 Jeśli <application>MEncoder</application> nie może otworzyć urządzenia
|
|
138 dźwiękowego, upewnij się, że jest ono rzeczywiście dostępne. Zdarzają się
|
|
139 problemy z serwerami dźwięku typu aRts (KDE) lub esd (GNOME). Jeśli masz
|
|
140 kartę full-duplex (prawie wszystkie przyzwoite karty dostępne obecnie obsługują
|
|
141 tę funkcję) i korzystasz z KDE, spróbuj zaznaczyć opcję "Działanie w pełni
|
|
142 dupleksowe" ("full duplex") w konfiguracji serwera dźwięku.
|
|
143 </para>
|
|
144 </listitem>
|
|
145 </itemizedlist>
|
|
146 </sect2>
|
|
147
|
|
148
|
|
149 <sect2 id="tv-examples">
|
|
150 <title>Przykłady</title>
|
|
151
|
|
152 <informalexample>
|
|
153 <para>
|
|
154 Puste wyjście, do AAlib :)
|
|
155 <screen>
|
|
156 mplayer -tv driver=dummy:width=640:height=480 -vo aa tv://<!--
|
|
157 --></screen>
|
|
158 </para>
|
|
159 </informalexample>
|
|
160
|
|
161 <informalexample>
|
|
162 <para>
|
|
163 Wejście ze standardowego V4L:
|
|
164 <screen>
|
|
165 mplayer -tv driver=v4l:width=640:height=480:outfmt=i420 -vc rawi420 -vo xv tv://<!--
|
|
166 --></screen>
|
|
167 </para>
|
|
168 </informalexample>
|
|
169
|
|
170 <informalexample>
|
|
171 <para>
|
|
172 Bardziej skomplikowany przykład. Każe on MEncoderowi nagrać pełen
|
|
173 obraz PAL, wykadrować go i usunąć przeplot korzystając z algorytmu
|
|
174 liniowego zlewania (linear blend). Audio jest kompresowane ze stałą
|
|
175 szybkością równą 64kbps, korzystając z kodeka LAME. To ustawienie jest
|
|
176 dobre do nagrywania filmów.
|
|
177 <screen>
|
|
178 mencoder -tv driver=v4l:width=768:height=576 \
|
|
179 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=900 \
|
|
180 -oac mp3lame -lameopts cbr:br=64 \
|
|
181 -vf crop=720:544:24:16,pp=lb -o output.avi tv://
|
|
182 </screen>
|
|
183 </para>
|
|
184 </informalexample>
|
|
185
|
|
186 <informalexample>
|
|
187 <para>
|
|
188 Ten przykład dodatkowo przeskaluje obraz do 384x288 i skompresuje video
|
|
189 z szybkością 350kbps w trybie wysokiej jakości. Opcja <option>vqmax</option>
|
|
190 uwalnia kwantyzator i pozwala kompresorowi video na osiągnięcie tak
|
|
191 niskiej szybkości nawet kosztem jakości obrazu. Może być to używane do
|
|
192 nagrywania długich seriali TV, kiedy jakość obrazu nie jest tak ważna.
|
|
193 <screen>
|
|
194 mencoder -tv driver=v4l:width=768:height=576 \
|
|
195 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=350:vhq:vqmax=31:keyint=300 \
|
|
196 -oac mp3lame -lameopts cbr:br=48 \
|
|
197 -vf crop=720:540:24:18,pp=tn/lb,scale=384:288 -sws 1 -o output.avi tv://
|
|
198 </screen>
|
|
199 Jest również możliwe podanie mniejszych wymiarów obrazu w opcji <option>-tv</option>
|
|
200 i pominięcie programowego skalowania, ale to podejście wykorzystuje maksymalną
|
|
201 ilość dostępnych informacji i jest trochę bardziej odporne na szum. Z powodu
|
|
202 ograniczeń sprzętowych Układy bt878 mogą stosować uśrednianie pikseli jedynie
|
|
203 w kierunku poziomym.
|
|
204 </para>
|
|
205 </informalexample>
|
|
206 </sect2>
|
|
207 </sect1>
|