16262
|
1 <?xml version="1.0" encoding="iso-8859-2"?>
|
|
2 <!-- Synced with: 1.10 -->
|
|
3 <chapter id="encoding-guide">
|
|
4 <title>Enkódování s <application>MEncoder</application>em</title>
|
|
5
|
|
6 <sect1 id="menc-feat-dvd-mpeg4">
|
|
7 <title>Vytvoření MPEG-4 ("DivX") ripu DVD filmu ve vysoké kvalitě</title>
|
|
8
|
|
9 <para>
|
|
10 Velmi častou otázkou je "Jak mohu vytvořit rip v nejvyšší možné kvalitě pro
|
|
11 danou velikost?". Další otázkou je "Jak vytvořím DVD rip v nejvyšší možné
|
|
12 kvalitě? Velikost souboru mě nezajímá, chci tu nejvyšší kvalitu."
|
|
13 </para>
|
|
14
|
|
15 <para>
|
|
16 Druhá otázka je poněkud špatně položená. Konec konců, pokud je vám lhostejná
|
|
17 velikost souboru, proč prostě nezkopírujete celý MPEG-2 video proud z DVD?
|
|
18 Jistěže vaše AVI bude mít kolem 5 GB, ale pokud chcete nejvyšší kvalitu a
|
|
19 na velikosti nezáleží, je to jistě nejlepší volba.
|
|
20 </para>
|
|
21
|
|
22 <para>
|
|
23 Ve skutečnosti, důvodem převodu DVD do MPEG-4 je právě to, že vám na velikosti
|
|
24 souboru <emphasis role="bold">záleží</emphasis>.
|
|
25 </para>
|
|
26
|
|
27 <para>
|
|
28 Je těžké nabídnout kuchařku jak vytvořit DVD rip ve velmi vysoké kvalitě. Je
|
|
29 nutné uvážit množství faktorů a měli byste rozumět těmto detailům, jinak
|
|
30 budete asi zklamáni výsledkem. Níže prozkoumáme některé z těchto věcí a
|
|
31 pak se podíváme na příklad. Předpokládáme, že použijete
|
|
32 <systemitem class="library">libavcodec</systemitem> pro enkódování videa,
|
|
33 ačkoli teorie je stejná i pro ostatní kodeky.
|
|
34 </para>
|
|
35
|
|
36 <para>
|
|
37 Pokud je toho na vás moc, asi byste měli použít některý z pěkných frontendů,
|
|
38 které jsou zmíněny v
|
|
39 <ulink url="http://mplayerhq.hu/homepage/design7/projects.html#mencoder_frontends">sekci MEncoder</ulink>
|
|
40 na naší stránce odvozených projektů.
|
|
41 Takto budete schopni dosahovat vysoce kvalitních ripů bez velkého přemýšlení,
|
|
42 protože většina těchto nástrojů je navržena tak, aby dělala vhodná rozhodnutí
|
|
43 za vás.
|
|
44 </para>
|
|
45
|
|
46 <sect2 id="menc-feat-dvd-mpeg4-preparing-encode">
|
|
47 <title>Příprava na enkódování: Určení zdrojového materiálu a datového toku</title>
|
|
48 <para>
|
|
49 Předtím než i jen pomyslíte na enkódování filmu, budete muset učinit
|
|
50 několik přípravných kroků.
|
|
51 </para>
|
|
52
|
|
53 <para>
|
|
54 Prvním a nejdůležitějším krokem před enkódováním by mělo být zjištění
|
|
55 druhu obsahu se kterým máte co do činění.
|
|
56 Pokud vaše zdrojové video pochází z DVD nebo veřejné/kabelové/satelitní
|
|
57 TV, bude uložen v jednom ze dvou formátů: NTSC v Severní Americe a
|
|
58 Japonsku, PAL v Euvropě, atd.
|
|
59 Je ovšem důležité si uvědomit, že to je pouze formátování pro prezentaci
|
|
60 v televizi a často <emphasis role="bold">neodpovídá</emphasis>
|
|
61 originálnímu formátu filmu.
|
|
62 Zkušenosti ukazují, že NTSC materiál je mnohem těžší enkódovat,
|
|
63 jelikož musíme identifikovat více věcí ve zdrojovém videu.
|
|
64 Abyste dosáhli uspokojivého výsledku, musíte znát původní formát.
|
|
65 Nevezmete-li to správně v potaz, dostanete obraz plný nejrůznějších vad,
|
|
66 včetně ošklivých kombinačních (proklad) artefaktů a zdvojených nebo dokonce
|
|
67 zahozených snímků.
|
|
68 Kromě toho, že budete mít nekvalitní obraz, artefakty rovněž snižují
|
|
69 efektivitu kódování:
|
|
70 Dosáhnete horší kvalitu na jednotku datového toku.
|
|
71 </para>
|
|
72
|
|
73 <sect3 id="menc-feat-dvd-mpeg4-preparing-encode-fps">
|
|
74 <title>Zjištění snímkové rychlosti zdroje</title>
|
|
75 <para>
|
|
76 Zde máte seznam běžných typů zdrojového materiálu, kde na který nejspíš
|
|
77 narazíte a jejich volby:
|
|
78 </para>
|
|
79 <itemizedlist>
|
|
80 <listitem><para>
|
|
81 <emphasis role="bold">Standardní film</emphasis>: Vytvořený pro promítání
|
|
82 v kině při 24fps.
|
|
83 </para></listitem>
|
|
84 <listitem><para>
|
|
85 <emphasis role="bold">PAL video</emphasis>: Zaznamenáno PAL
|
|
86 video kamerou s rychlostí 50 půlsnímků za sekundu.
|
|
87 Půlsnímek sestává jen z lichých nebo sudých řádků daného snímku.
|
|
88 Televize je navržena pro jejich střídavé zobrazování jako laciná
|
|
89 forma analogové komprese.
|
|
90 Lidské oko to pravděpodobně vykompenzuje, ale jakmile porozumíte
|
|
91 prokládání, naučíte se jej vidět i v TV a už si ji neužijete.
|
|
92 Dva půlsnímky <emphasis role="bold">netvoří</emphasis> úplný snímek,
|
|
93 protože jsou zaznamenány s časovou odchylkou 1/50 sekundy a proto se
|
|
94 nekryjí, dokud je zde pohyb.
|
|
95 </para></listitem>
|
|
96 <listitem><para>
|
|
97 <emphasis role="bold">NTSC Video</emphasis>: Zaznamenáno
|
|
98 NTSC video kamerou s rychlostí 60000/1001 půlsnímků za sekundu, nebo 60
|
|
99 půlsnímků za sekundu v době před barevnou televizí.
|
|
100 Jinak obdobné PAL.
|
|
101 </para></listitem>
|
|
102 <listitem><para>
|
|
103 <emphasis role="bold">Animovaný film</emphasis>: Obvykle kreslený při
|
|
104 24 snímcích za sekundu, ale rovněž bývá v některé variantě prměnné snímkové
|
|
105 rychlosti.
|
|
106 </para></listitem>
|
|
107 <listitem><para>
|
|
108 <emphasis role="bold">Počítačová grafika (CG)</emphasis>: Může mít jakoukoli
|
|
109 snímkovou rychlost, ale některé jsou častější než jiné; 24 a 30 snímků za
|
|
110 sekundu jsou typické pro NTSC a 25 snímků za sekundu zase pro PAL.
|
|
111 </para></listitem>
|
|
112 <listitem><para>
|
|
113 <emphasis role="bold">Starý film</emphasis>: Různé nižší snímkové rychlosti.
|
|
114 </para></listitem>
|
|
115 </itemizedlist>
|
|
116 </sect3>
|
|
117
|
|
118 <sect3 id="menc-feat-dvd-mpeg4-preparing-encode-material">
|
|
119 <title>Určení zdrojového materiálu</title>
|
|
120 <para>
|
|
121 Filmy sestávající ze snímků jsou nazývány progresivní,
|
|
122 zatímco ty složené z nezávislých půlsnímků buď prokládané, nebo
|
|
123 jen video – ačkoli druhý termín je zavádějící.
|
|
124 </para>
|
|
125 <para>
|
|
126 Abychom to ještě zkomplikovali, některé filmy mohou být směsí
|
|
127 všeho výše uvedeného.
|
|
128 </para>
|
|
129 <para>
|
|
130 Nejdůležitějším rozdílem mezi všemi těmito formáty je to, že základem
|
|
131 některých jsou snímky a jiných půlsnímky.
|
|
132 <emphasis role="bold">Vždy</emphasis>, když je film připravován pro promítání
|
|
133 v televizi (včetně DVD), je převeden na půlsnímky.
|
|
134 Různé metody jak toho lze dosáhnout jsou souhrnně nazývány "pulldown" a
|
|
135 nechvalně známé NTSC "3:2 telecine" je jednou z variant.
|
|
136 Pokud nebyl základ vašeho filmu rovněž půlsnímkový (se stejnou půlsnímkovou
|
|
137 rychlostí), máte film v jiném formátu, než byl původně.
|
|
138 </para>
|
|
139
|
|
140 <itemizedlist>
|
|
141 <title>Zde je několik běžných typů pulldown:</title>
|
|
142 <listitem><para>
|
|
143 <emphasis role="bold">PAL 2:2 pulldown</emphasis>: Je nejhezčí z nich.
|
|
144 Každý snímek je zobrazován po dobu dvou půlsnímků tak, že se oddělí liché
|
|
145 a sudé řádky a zobrazují se střídavě.
|
|
146 Pokud měl originál 24 snímků za sekundu, zrychlí se film o 4%.
|
|
147 </para></listitem>
|
|
148 <listitem><para>
|
|
149 <emphasis role="bold">PAL 2:2:2:2:2:2:2:2:2:2:2:3 pulldown</emphasis>:
|
|
150 Každý 12 snímek je zobrazen po dobu tří půlsnímků, místo dvou.
|
|
151 To odstraní nevýhodu 4% zrychlení, ale znesnadní obrácený proces.
|
|
152 Obvykle je používán pouze u hudební produkce, jelikož zde by 4% zrychlení
|
|
153 znatelně poškodilo hudební zážitek.
|
|
154 </para></listitem>
|
|
155 <listitem><para>
|
|
156 <emphasis role="bold">NTSC 3:2 telecine</emphasis>: Snímky jsou zobrazovány
|
|
157 po dobu 2 nebo 3 půlsnímků, čímž je dosaženo 2.5 krát
|
|
158 vyšší půlsnímkové rychlosti, než je originální snímková rychlost.
|
|
159 Výsledek je dále velmi mírně spomalen ze 60 půlsnímků za sekundu na
|
|
160 60000/1001 půlsnímků za sekundu, aby se dosáhlo NTSC půlsnímkové rychlosti.
|
|
161 </para></listitem>
|
|
162 <listitem><para>
|
|
163 <emphasis role="bold">NTSC 2:2 pulldown</emphasis>: Používá se pro
|
|
164 promítání 30fps materiálu na NTSC.
|
|
165 Pěkné, stejně jako 2:2 PAL pulldown.
|
|
166 </para></listitem>
|
|
167 </itemizedlist>
|
|
168
|
|
169 <para>
|
|
170 Existují rovněž metody pro konverzi mezi NTSC a PAL vieem, ale to
|
|
171 již je nad rámec této příručky.
|
|
172 Pokud se setkáte s takovým filmem a budete jej chtít enkódovat,
|
|
173 bude pro vás nejlepší opatřit si jej v originálním formátu.
|
|
174 Konverze mezi těmito formáty je vysoce destruktivní a nelze ji
|
|
175 čistě zvrátit, takže výsledek velmi utrpí, pokud je vytvořen z
|
|
176 konvertovaného materiálu.
|
|
177 </para>
|
|
178 <para>
|
|
179 Když je video ukládáno na DVD, po sobě jdoucí páry půlsnímků jsou
|
|
180 seskupovány do snímků, dokonce i když nejsou určeny pro zobrazení
|
|
181 ve stejném okamžiku.
|
|
182 Standard MPEG-2 použitý na DVD a digitální televizi poskytuje možnost
|
|
183 jak pro enkódování originálních progresivních snímků, tak pro uložení
|
|
184 informací do hlavičky snímku o počtu půlsnímků, po jejichž dobu by měl
|
|
185 být daný snímek zobrazován.
|
|
186 Pokud je použita tato metoda, film bývá často označen jako
|
|
187 "soft-telecined", jelikož proces pouze řídí DVD přehrávač pro
|
|
188 aplikaci pulldown na film spíše než že mění samotný film.
|
|
189 Tento případ je velmi upřednostňován, jalikož může být snadno
|
|
190 zvrácen (ve skutečnosti ignorován) enkodérem a proto poskytuje maximální
|
|
191 kvalitu.
|
|
192 Mnoho DVD a televizních produkčních společností však nepoužívá vhodné
|
|
193 enkódovací techniky, ale místo toho produkují filmy s
|
|
194 "hard telecine", kdy jsou ve skutečnosti půlsnímky duplikovány
|
|
195 ve výsledném MPEG-2.
|
|
196 </para>
|
|
197 <para>
|
|
198 Postupy pro tyto případy budou uvedeny
|
|
199 <link linkend="menc-feat-telecine">později v této příručce</link>.
|
|
200 Prozatím si řekneme několik návodů pro identifikaci o jaký typ materiálu jde:
|
|
201 </para>
|
|
202
|
|
203 <itemizedlist>
|
|
204 <title>NTSC regiony:</title>
|
|
205 <listitem><para>
|
|
206 Pokud <application>MPlayer</application> při přehrávání vypíše, že se snímková
|
|
207 rychlost změnila na 24000/1001 a již se to nezmění, pak se nejspíš jedná
|
|
208 o progresivní obsah, který byl "soft telecinován".
|
|
209 </para></listitem>
|
|
210 <listitem><para>
|
|
211 Pokud <application>MPlayer</application> ukazuje, že se snímková rychlost
|
|
212 mění tam a zpět mezi 24000/1001 a 30000/1001 a někdy vidíte
|
|
213 "combing", pak je zde několik možností.
|
|
214 Segmenty 24000/1001 fps mají téměř jistě "soft telecinovaný" progresivní
|
|
215 obsah, ale 30000/1001 fps části mohou mít buď hard-telecined 24000/1001 fps
|
|
216 obsah, nobo se jedná o 60000/1001 půlsnímků za sekundu NTSC video.
|
|
217 Použijte stejný postup jako v následujících dvou případech pro určení
|
|
218 který z nich to je.
|
|
219 </para></listitem>
|
|
220 <listitem><para>
|
|
221 Pokud <application>MPlayer</application> neukáže změnu snímkové rychlosti
|
|
222 a všechny snímky jsou zubaté, je váš film ve formátu NTSC video s 60000/1001
|
|
223 půlsnímky za sekundu.
|
|
224 </para></listitem>
|
|
225 <listitem><para>
|
|
226 Pokud <application>MPlayer</application> neukáže změnu snímkové rychlosti
|
|
227 a dva snímky z pěti vypadají zubatě, má vaše video "hard telecinovaný"
|
|
228 24000/1001fps obsah.
|
|
229 </para></listitem>
|
|
230 </itemizedlist>
|
|
231
|
|
232 <itemizedlist>
|
|
233 <title>PAL regiony:</title>
|
|
234 <listitem><para>
|
|
235 Pokud není nikde vidět žádné zubatění, je váš film 2:2 pulldown.
|
|
236 </para></listitem>
|
|
237 <listitem><para>
|
|
238 Pokud vidíte jak se objevuje a mizí zubatění každou půlsekundu,
|
|
239 pak je váš film 2:2:2:2:2:2:2:2:2:2:2:3 pulldown.
|
|
240 </para></listitem>
|
|
241 <listitem><para>
|
|
242 Pokud je zubatění vidět stále, je to PAL video s 50 půlsnímky za sekundu.
|
|
243 </para></listitem>
|
|
244 </itemizedlist>
|
|
245
|
|
246 <note><title>Rada:</title>
|
|
247 <para>
|
|
248 <application>MPlayer</application> umí spomalit přehrávání videa
|
|
249 pomocí volby -speed.
|
|
250 Zkuste použít <option>-speed</option> 0.2 pro velmi pomalé přehrávání a
|
|
251 najděte vzor, pokud jej nevidíte při plné rychlosti.
|
|
252 </para>
|
|
253 </note>
|
|
254 </sect3>
|
|
255 </sect2>
|
|
256
|
|
257 <sect2 id="menc-feat-dvd-mpeg4-2pass">
|
|
258 <title>Pevný kvantizer vs. více průchodů</title>
|
|
259
|
|
260 <para>
|
|
261 Enkódování vašeho videa je možné provést v široké škále kvality.
|
|
262 S moderními video enkodéry a trochou předkodekové komprese
|
|
263 (zmenšení a odšumování) je možné dosáhnout velmi dobré kvality v 700 MB,
|
|
264 pro 90-110 minut dlouhé širokoúhlé video.
|
|
265 Jinak lze všechna videa, snad kromě těch nejdelších, enkódovat v téměř
|
|
266 perfektní kvalitě do 1400 MB.
|
|
267 </para>
|
|
268
|
|
269 <para>
|
|
270 Jsou tři přístupy k enkódování videa: pevný datový tok (CBR), pevný kvantizer
|
|
271 a víceprůchodový (ABR, neboli průměrovaný datový tok).
|
|
272 </para>
|
|
273
|
|
274 <para>
|
|
275 Komplexnost snímků ve filmu, a tím i počet bitů potřebných pro jejich
|
|
276 komprimaci, se může velmi lišit od scény ke scéně.
|
|
277 Moderní enkodéry se umí přizpůsobit těmto potřebám změnou datového toku.
|
|
278 V jednoduchých režiměch, jako je CBR, však enkodéry neznají nároky na
|
|
279 datový tok budoucích scén a tak nemohou překročit požadovaný střední
|
|
280 datový tok na dlouhou dobu.
|
|
281 Pokročilejší režimy, jako je víceprůchodové enkódování, umí vzít v
|
|
282 potaz statistiky z předchozích režimů, což odstraní výše zmíněný problém.
|
|
283 </para>
|
|
284
|
|
285 <note><title>Poznámka:</title>
|
|
286 <para>
|
|
287 Většina kodeků, které podporují ABR enkódování, podporují pouze dvouprůchodové
|
|
288 enkódování, zatímco ostatní jako <systemitem class="library">x264</systemitem>,
|
|
289 <systemitem class="library">XviD</systemitem>
|
|
290 a <systemitem class="library">libavcodec</systemitem> podporují víceprůchodové
|
|
291 enkódování, které s každým průchodem trochu zlepší kvalitu, ačkoli toto
|
|
292 zlepšení již není viditelné, nebo měřitelné po asi čtvrtém průchodu.
|
|
293 V této sekci budeme považovat dvouprůchodové a víceprůchodové
|
|
294 enkódování za shodné.
|
|
295 </para>
|
|
296 </note>
|
|
297
|
|
298 <para>
|
|
299 V každém z těchto režimů video kodek (jako je
|
|
300 <systemitem class="library">libavcodec</systemitem>)
|
|
301 rozbije videosnímek na makrobloky 16x16 pixelů a potom na každý makroblok
|
|
302 aplikuje kvantizer. Čím je nižší kvantizer, tím je vyšší kvalita a datový tok.
|
|
303 Metoda, kterou enkodér filmu používá pro
|
|
304 určení jaký kvantizer použít pro daný makroblok, se liší a je vysoce
|
|
305 ovlivnitelná. (Toto je extrémní zjednodušení daného procesu, ale je vhodné
|
|
306 rozumět základnímu principu.)
|
|
307 </para>
|
|
308
|
|
309 <para>
|
|
310 Pokud nastavíte konstantní datový tok, bude videokodek enkódovat video tak,
|
|
311 že zahodí
|
|
312 detaily podle potřeby a jen tolik, aby se udržel pod zadaným datovým tokem.
|
|
313 Pokud je vám opravdu lhostejná velikost souboru, můžete také použít CBR a
|
|
314 nastavit datový tok na nekonečno. (V praxi to znamená nastavit hodnotu tak
|
|
315 vysoko, aby nijak neomezovala, jako 10000 Kbitů.) Bez reálného omezení
|
|
316 datového toku použije kodek
|
|
317 nejnižší možný kvantizer pro každý makroblok (ten je nastaven pomocí
|
|
318 <option>vqmin</option> pro <systemitem class="library">libavcodec</systemitem>,
|
|
319 kde je výchozí 2). Jakmile nastavíte dostatečně nižší
|
|
320 datový tok, takže je kodek
|
|
321 přinucen použít vyšší kvantizer, pak téměř jistě snížíte kvalitu svého videa.
|
|
322 Abyste se tomu vyhnuli, měli byste zvážit zmenšení videa podle postupu
|
|
323 popsaného později v této příručce.
|
|
324 </para>
|
|
325
|
|
326 <para>
|
|
327 Při konstantním kvantizeru kodek
|
|
328 používá kvantizer nastavený volbou <option>vqscale</option> (pro
|
|
329 <systemitem class="library">libavcodec</systemitem>) na každý makroblok.
|
|
330 Pokud chcete maximálně kvalitní rip, opět bez ohledu na datový tok, můžete
|
|
331 použít <option>vqscale=2</option>. To povede ke stejnému datovému toku a PSNR
|
|
332 (odstup signál – šum) jako CBR s <option>vbitrate</option>=infinity a
|
|
333 výchozím <option>vqmin</option> rovným 2.
|
|
334 </para>
|
|
335
|
|
336 <para>
|
|
337 Problém s konstantní kvantizací je ten, že používá zadaný kvantizer ať to daný
|
|
338 makroblok potřebuje či nikoli. Je totiž možné použít vyšší kvantizer na
|
|
339 makroblok bez obětování viditelné kvality. Proč tedy plýtvat bity s nemístně
|
|
340 nízkým kvantizerem? Váše CPU má tolik cyklů, kolik máte času, ale na harddisku
|
|
341 máte jen určitý počet bitů.
|
|
342 </para>
|
|
343
|
|
344 <para>
|
|
345 Při dvouprůchodovém enkódování se v prvním průchodu projde film jakoby měl být
|
|
346 CBR, ale vlastnosti každého snímku se zaznamenají do logu. Tato data jsou pak
|
|
347 použita při druhém průchodu pro inteligentní stanovení použitého kvantizeru.
|
|
348 V rychlých scénách nebo scénách s malým počtem detailů budou častěji používány
|
|
349 vyšší kvantizery a v pomalých nebo detailních scénách zase nižší kvantizery.
|
|
350 </para>
|
|
351
|
|
352 <para>
|
|
353 Pokud použijete <option>vqscale=2</option>, plýtváte bity. Pokud použijete
|
|
354 <option>vqscale=3</option>, pak nedostanete nejkvalitnější možný rip.
|
|
355 Dejme tomu, že ripujete DVD při <option>vqscale=3</option> a
|
|
356 výsledkem je 1800Kbit. Pokud provedete dvouprůchodové enkódování
|
|
357 s <option>vbitrate=1800</option>, výsledné video bude mít <emphasis
|
|
358 role="bold">vyšší kvalitu</emphasis> při
|
|
359 <emphasis role="bold">stejném datovém toku</emphasis>.
|
|
360 </para>
|
|
361
|
|
362 <para>
|
|
363 Jelikož jsme vás nyní přesvědčili, že dvouprůchodový režim je správná volba,
|
|
364 skutečnou otázkou je, jaký datový tok použít? Odpověď je, že není jediná
|
|
365 odpověď. Ideálně byste měli zvolit takový datový tok, který zajistí nejlepší
|
|
366 rovnováhu mezi kvalitou a velikostí souboru. Ten bude pokaždé jiný
|
|
367 v závislosti na zdrojovém videu.
|
|
368 </para>
|
|
369
|
|
370 <para>
|
|
371 Pokud na velikosti souboru nezáleží, pak je dobrý startovní můstek pro rip
|
|
372 s velmi vysokou kvalitou je kolem 2000 Kbitů plus-mínus 200 Kbitů.
|
|
373 Pro rychlé akční nebo vysoce detailní zdrojové video, nebo máte-li velmi
|
|
374 kritické oko, se budete rozhodovat mezi 2400 nebo 2600.
|
|
375 U některých DVD nepoznáte rozdíl při 1400 Kbitech. Je vhodné experimentovat
|
|
376 se scénami při různých datových tocích, abyste pro to dostali cit.
|
|
377 </para>
|
|
378
|
|
379 <para>
|
|
380 Pokud se snažíte o určitou velikost, budete muset nějak spočítat datový tok.
|
|
381 Ale ještě předtím musíte zjistit, kolik místa byste měli rezervovat pro
|
|
382 zvukové(ou) stopy(u), takže byste si
|
|
383 <link linkend="menc-feat-dvd-mpeg4-audio">je měli ripnout</link> jako první.
|
|
384 Můžete si pak spočítat datový tok pomocí následující rovnice:
|
|
385 <systemitem>datový_tok = (požadovaná_velikost_v_Mbajtech - velikost_zvuku_v_Mbajtech) *
|
|
386 1024 * 1024 / délka_v_sek * 8 / 1000</systemitem>
|
|
387 Například abyste nacpali dvouhodinový film na 702MB CD, se 60MB zvukovou
|
|
388 stopou, bude muset být datový tok videa:
|
|
389 <systemitem>(702 - 60) * 1024 * 1024 / (120*60) * 8 / 1000
|
|
390 = 740kbps (kilobitů za sekundu)</systemitem>
|
|
391 </para>
|
|
392
|
|
393 </sect2>
|
|
394
|
|
395
|
|
396 <sect2 id="menc-feat-dvd-mpeg4-constraints">
|
|
397 <title>Omezení pro efektivní enkódování</title>
|
|
398
|
|
399 <para>
|
|
400 Ze samé podstaty komprese typu MPEG vyplývají určitá omezení, která byste měli
|
|
401 ctít, pokud chcete maximální kvalitu.
|
|
402 MPEG rozdělí video na čtverce 16x16 nazývané makrobloky, které se skládají
|
|
403 ze čtyř bloků 8x8 jasové (luma) složky a dvou bloků 8x8 barevné (chroma)
|
|
404 složky v polovičním rozlišení (jeden pro osu červená-cyan (modrozelená) a druhý pro osu
|
|
405 modrá-žlutá).
|
|
406 Dokonce i když šířka a výška vašeho videa nejsou násobky 16, použije enkodér
|
|
407 dostatek 16x16 makrobloků, aby pokryl celou oblast obrazu a zabere místo
|
|
408 navíc, které přijde vniveč.
|
|
409 Takže chcete-li maximalizovat kvalitu při dané velikosti souboru, není dobrý
|
|
410 nápad používat rozměry které nejsou násobky 16.
|
|
411 </para>
|
|
412
|
|
413 <para>
|
|
414 Většina DVD má také různě velké černé okraje videa. Ponechání těchto ploch
|
|
415 může různým způsobem snížit kvalitu.
|
|
416 </para>
|
|
417
|
|
418 <orderedlist>
|
|
419 <listitem>
|
|
420 <para>
|
|
421 Komprese typu MPEG je rovněž velmi závislá na plošných frekvenčních
|
|
422 transformacích, konkrétně Diskrétní Kosinové Transformaci (DCT), která se
|
|
423 podobá Fourierově transformaci. Tento druh enkódování je efektivní na
|
|
424 reprezentaci opakujících se vzorů a pozvolné přechody, ale má potíže s ostrými
|
|
425 přechody. Chcete-li je enkódovat, musíte použít mnoho bitů, jinak se objeví
|
|
426 artefakty známé jako kroužkování.
|
|
427 </para>
|
|
428
|
|
429 <para>
|
|
430 Frekvenční transformace (DCT) je provedena zvlášť pro každý makroblok
|
|
431 (ve skutečnosti na každý blok), takže problém nastane pouze tehdy, je-li ostrý
|
|
432 přechod uvnitř bloku. Pokud vaše černé okraje začínají přesně na hranicích
|
|
433 násobků 16 pixelů, pak to není problém. Černé okraje jsou však na DVD jen
|
|
434 málokdy pěkně umístěny, takže je v praxi budete muset vždy odstranit, abyste
|
|
435 se vyhnuli tomuto problému.
|
|
436 </para>
|
|
437 </listitem>
|
|
438 </orderedlist>
|
|
439
|
|
440 <para>
|
|
441 Navíc k plošně frekvenčním transformacím používá komprese typu MPEG vektory
|
|
442 pohybu k popisu změn od jednoho snímku ke druhému. Vektory pohybu přirozeně
|
|
443 pracují méně efektivně s novým obsahem přicházejícím zpoza okrajů snímku,
|
|
444 protože ten nebyl přítomen na předchozím snímku. Dokud se obraz rozšiřuje
|
|
445 směrem k okrajům snímku, nemají s tím vektory pohybu žádný problém, ale
|
|
446 jsou-li zde černé okraje, může problém nastat:
|
|
447 </para>
|
|
448
|
|
449 <orderedlist continuation="continues">
|
|
450 <listitem>
|
|
451 <para>
|
|
452 Komprese typu MPEG ukládá pro každý makroblok vektor, identifikující která
|
|
453 část předchozího obrázku by měla být zkopírována onoho makrobloku jako základ
|
|
454 pro predikci následujícího snímku. Pouze zbývající odlišnosti musí být
|
|
455 enkódovány. Pokud makroblok přesahuje okraj obrázku a obsahuje část černého
|
|
456 okraje, vektory pohybu z ostatních částí obrázku přepíší černý okraj.
|
|
457 To znamená mnoho bitů spotřebovaných buď na znovuzačernění, nebo se (spíš)
|
|
458 vektory pohybu nepoužijí vůbec a všechny změny v tomto makrobloku se budou
|
|
459 kódovat přímo. Jinými slovy se velmi sníží efektivita enkódování.
|
|
460 </para>
|
|
461
|
|
462 <para>
|
|
463 Tento problém nastává opět jen v případě, že černé okraje nezačínají na lince
|
|
464 jejíž pozice je násobkem 16.
|
|
465 </para>
|
|
466 </listitem>
|
|
467
|
|
468 <listitem>
|
|
469 <para>
|
|
470 Nakonec zde máme makroblok uvnitř obrázku do nějž se posunuje objekt z okraje
|
|
471 obrázku. Kódování typu MPEG neumí říct "zkopíruj to co je na obrázku, ale ne
|
|
472 černý okraj." Takže se zkopíruje i černý okraj a spotřebuje se spousta bitů
|
|
473 na enkódování té části obrázku, která tu měla být.
|
|
474 </para>
|
|
475
|
|
476 <para>
|
|
477 Pokud se obrázek dostane úplně ven z enkódované oblasti, má MPEG speciální
|
|
478 optimalizace pro opakované kopírování pixelů na okraj obrázku pokud přijde
|
|
479 vektor pohybu zvenčí enkódované oblasti. Tato vlastnost bude k ničemu, pokud
|
|
480 má film černé okraje. Na rozdíl od problémů 1 a 2 zde umístění okrajů na
|
|
481 násobky 16 nepomůže.
|
|
482 </para>
|
|
483 </listitem>
|
|
484
|
|
485 <listitem>
|
|
486 <para>
|
|
487 Navzdory tomu, že okraje jsou úplně černé a nikdy se nemění, je zde vždy
|
|
488 alespoň minimální datový tok spotřebovaný na větší množství makrobloků.
|
|
489 </para>
|
|
490 </listitem>
|
|
491 </orderedlist>
|
|
492
|
|
493 <para>
|
|
494 Ze všech těchto důvodů doporučujeme zcela odstranit černé okraje. Dále, pokud
|
|
495 je na okraji obrázku oblast se šumem/zkreslením, jejím odstřižením se ještě
|
|
496 zvýší efektivita enkódování. Videofilní puristé, kteří chtějí zůstat tak
|
|
497 blízko originálu, jak je to jen možné, mohou protestovat proti tomuto ořezání,
|
|
498 ale pokud nehodláte enkódovat s konstantním kvantizerem, kvalita kterou
|
|
499 dostanete díky ořezání znatelně převýší množství ztracených informací na
|
|
500 okrajích.
|
|
501 </para>
|
|
502 </sect2>
|
|
503
|
|
504
|
|
505 <sect2 id="menc-feat-dvd-mpeg4-crop">
|
|
506 <title>Ořezávání a škálování</title>
|
|
507
|
|
508 <para>
|
|
509 Připomeňme z předchozí části, že konečná velikost obrázku by měla mít
|
|
510 jak šířku, tak výšku beze zbytku dělitelnou 16, čehož můžete dosáhnout
|
|
511 pomocí ořezání, škálování, nebo kombinací obou.
|
|
512 </para>
|
|
513
|
|
514 <para>
|
|
515 Při ořezávání byste se měli držet několika zásad, abyste předešli poškození
|
|
516 svého filmu.
|
|
517 Normální YUV formát 4:2:0, ukládá barvonosnou (chroma) informaci
|
|
518 podvzorkovanou, čili hustota vzorkování barvy je poloviční oproti jasové
|
|
519 (černobílé) složce v obou směrech.
|
|
520 Prohlédněte si tento diagram, kde L označuje vzorkovací body jasu a C
|
|
521 barvy.
|
|
522 </para>
|
|
523
|
|
524 <informaltable>
|
|
525 <?dbhtml table-width="40%" ?>
|
|
526 <?dbfo table-width="40%" ?>
|
|
527 <tgroup cols="8" align="center">
|
|
528 <colspec colnum="1" colname="col1"/>
|
|
529 <colspec colnum="2" colname="col2"/>
|
|
530 <colspec colnum="3" colname="col3"/>
|
|
531 <colspec colnum="4" colname="col4"/>
|
|
532 <colspec colnum="5" colname="col5"/>
|
|
533 <colspec colnum="6" colname="col6"/>
|
|
534 <colspec colnum="7" colname="col7"/>
|
|
535 <colspec colnum="8" colname="col8"/>
|
|
536 <spanspec spanname="spa1-2" namest="col1" nameend="col2"/>
|
|
537 <spanspec spanname="spa3-4" namest="col3" nameend="col4"/>
|
|
538 <spanspec spanname="spa5-6" namest="col5" nameend="col6"/>
|
|
539 <spanspec spanname="spa7-8" namest="col7" nameend="col8"/>
|
|
540 <tbody>
|
|
541 <row>
|
|
542 <entry>L</entry>
|
|
543 <entry>L</entry>
|
|
544 <entry>L</entry>
|
|
545 <entry>L</entry>
|
|
546 <entry>L</entry>
|
|
547 <entry>L</entry>
|
|
548 <entry>L</entry>
|
|
549 <entry>L</entry>
|
|
550 </row>
|
|
551 <row>
|
|
552 <entry spanname="spa1-2">C</entry>
|
|
553 <entry spanname="spa3-4">C</entry>
|
|
554 <entry spanname="spa5-6">C</entry>
|
|
555 <entry spanname="spa7-8">C</entry>
|
|
556 </row>
|
|
557 <row>
|
|
558 <entry>L</entry>
|
|
559 <entry>L</entry>
|
|
560 <entry>L</entry>
|
|
561 <entry>L</entry>
|
|
562 <entry>L</entry>
|
|
563 <entry>L</entry>
|
|
564 <entry>L</entry>
|
|
565 <entry>L</entry>
|
|
566 </row>
|
|
567 <row>
|
|
568 <entry>L</entry>
|
|
569 <entry>L</entry>
|
|
570 <entry>L</entry>
|
|
571 <entry>L</entry>
|
|
572 <entry>L</entry>
|
|
573 <entry>L</entry>
|
|
574 <entry>L</entry>
|
|
575 <entry>L</entry>
|
|
576 </row>
|
|
577 <row>
|
|
578 <entry spanname="spa1-2">C</entry>
|
|
579 <entry spanname="spa3-4">C</entry>
|
|
580 <entry spanname="spa5-6">C</entry>
|
|
581 <entry spanname="spa7-8">C</entry>
|
|
582 </row>
|
|
583 <row>
|
|
584 <entry>L</entry>
|
|
585 <entry>L</entry>
|
|
586 <entry>L</entry>
|
|
587 <entry>L</entry>
|
|
588 <entry>L</entry>
|
|
589 <entry>L</entry>
|
|
590 <entry>L</entry>
|
|
591 <entry>L</entry>
|
|
592 </row>
|
|
593 </tbody>
|
|
594 </tgroup>
|
|
595 </informaltable>
|
|
596
|
|
597 <para>
|
|
598 Jak vidíte, řádky i sloupce obrázku se přirozeně párují. Při ořezávání tedy
|
|
599 <emphasis>musí</emphasis> být hodnoty odsazení i rozměrů sudá čísla.
|
|
600 Pokud nejsou, nebude se barvonosná informace zprávně krýt s jasovou.
|
|
601 Teoreticky lze stříhat s lichým odsazením, ale to vyžaduje převzorkování
|
|
602 barvy, což je potenciálně ztrátový úkon a není podporován filtrem crop.
|
|
603 </para>
|
|
604
|
|
605 <para>
|
|
606 Dále, prokládané video je vzorkováno takto:
|
|
607 </para>
|
|
608
|
|
609 <informaltable>
|
|
610 <?dbhtml table-width="80%" ?>
|
|
611 <?dbfo table-width="80%" ?>
|
|
612 <tgroup cols="16" align="center">
|
|
613 <colspec colnum="1" colname="col1"/>
|
|
614 <colspec colnum="2" colname="col2"/>
|
|
615 <colspec colnum="3" colname="col3"/>
|
|
616 <colspec colnum="4" colname="col4"/>
|
|
617 <colspec colnum="5" colname="col5"/>
|
|
618 <colspec colnum="6" colname="col6"/>
|
|
619 <colspec colnum="7" colname="col7"/>
|
|
620 <colspec colnum="8" colname="col8"/>
|
|
621 <colspec colnum="9" colname="col9"/>
|
|
622 <colspec colnum="10" colname="col10"/>
|
|
623 <colspec colnum="11" colname="col11"/>
|
|
624 <colspec colnum="12" colname="col12"/>
|
|
625 <colspec colnum="13" colname="col13"/>
|
|
626 <colspec colnum="14" colname="col14"/>
|
|
627 <colspec colnum="15" colname="col15"/>
|
|
628 <colspec colnum="16" colname="col16"/>
|
|
629 <spanspec spanname="spa1-2" namest="col1" nameend="col2"/>
|
|
630 <spanspec spanname="spa3-4" namest="col3" nameend="col4"/>
|
|
631 <spanspec spanname="spa5-6" namest="col5" nameend="col6"/>
|
|
632 <spanspec spanname="spa7-8" namest="col7" nameend="col8"/>
|
|
633 <spanspec spanname="spa9-10" namest="col9" nameend="col10"/>
|
|
634 <spanspec spanname="spa11-12" namest="col11" nameend="col12"/>
|
|
635 <spanspec spanname="spa13-14" namest="col13" nameend="col14"/>
|
|
636 <spanspec spanname="spa15-16" namest="col15" nameend="col16"/>
|
|
637 <tbody>
|
|
638 <row>
|
|
639 <entry namest="col1" nameend="col8">Horní půlsnímek</entry>
|
|
640 <entry namest="col9" nameend="col16">Spodní půlsnímek</entry>
|
|
641 </row>
|
|
642 <row>
|
|
643 <entry>L</entry>
|
|
644 <entry>L</entry>
|
|
645 <entry>L</entry>
|
|
646 <entry>L</entry>
|
|
647 <entry>L</entry>
|
|
648 <entry>L</entry>
|
|
649 <entry>L</entry>
|
|
650 <entry>L</entry>
|
|
651 <entry></entry>
|
|
652 <entry></entry>
|
|
653 <entry></entry>
|
|
654 <entry></entry>
|
|
655 <entry></entry>
|
|
656 <entry></entry>
|
|
657 <entry></entry>
|
|
658 <entry></entry>
|
|
659 </row>
|
|
660 <row>
|
|
661 <entry spanname="spa1-2">C</entry>
|
|
662 <entry spanname="spa3-4">C</entry>
|
|
663 <entry spanname="spa5-6">C</entry>
|
|
664 <entry spanname="spa7-8">C</entry>
|
|
665 <entry></entry>
|
|
666 <entry></entry>
|
|
667 <entry></entry>
|
|
668 <entry></entry>
|
|
669 <entry></entry>
|
|
670 <entry></entry>
|
|
671 <entry></entry>
|
|
672 <entry></entry>
|
|
673 </row>
|
|
674 <row>
|
|
675 <entry></entry>
|
|
676 <entry></entry>
|
|
677 <entry></entry>
|
|
678 <entry></entry>
|
|
679 <entry></entry>
|
|
680 <entry></entry>
|
|
681 <entry></entry>
|
|
682 <entry></entry>
|
|
683 <entry>L</entry>
|
|
684 <entry>L</entry>
|
|
685 <entry>L</entry>
|
|
686 <entry>L</entry>
|
|
687 <entry>L</entry>
|
|
688 <entry>L</entry>
|
|
689 <entry>L</entry>
|
|
690 <entry>L</entry>
|
|
691 </row>
|
|
692 <row>
|
|
693 <entry>L</entry>
|
|
694 <entry>L</entry>
|
|
695 <entry>L</entry>
|
|
696 <entry>L</entry>
|
|
697 <entry>L</entry>
|
|
698 <entry>L</entry>
|
|
699 <entry>L</entry>
|
|
700 <entry>L</entry>
|
|
701 <entry></entry>
|
|
702 <entry></entry>
|
|
703 <entry></entry>
|
|
704 <entry></entry>
|
|
705 <entry></entry>
|
|
706 <entry></entry>
|
|
707 <entry></entry>
|
|
708 <entry></entry>
|
|
709 </row>
|
|
710 <row>
|
|
711 <entry></entry>
|
|
712 <entry></entry>
|
|
713 <entry></entry>
|
|
714 <entry></entry>
|
|
715 <entry></entry>
|
|
716 <entry></entry>
|
|
717 <entry></entry>
|
|
718 <entry></entry>
|
|
719 <entry spanname="spa9-10">C</entry>
|
|
720 <entry spanname="spa11-12">C</entry>
|
|
721 <entry spanname="spa13-14">C</entry>
|
|
722 <entry spanname="spa15-16">C</entry>
|
|
723 </row>
|
|
724 <row>
|
|
725 <entry></entry>
|
|
726 <entry></entry>
|
|
727 <entry></entry>
|
|
728 <entry></entry>
|
|
729 <entry></entry>
|
|
730 <entry></entry>
|
|
731 <entry></entry>
|
|
732 <entry></entry>
|
|
733 <entry>L</entry>
|
|
734 <entry>L</entry>
|
|
735 <entry>L</entry>
|
|
736 <entry>L</entry>
|
|
737 <entry>L</entry>
|
|
738 <entry>L</entry>
|
|
739 <entry>L</entry>
|
|
740 <entry>L</entry>
|
|
741 </row>
|
|
742 <row>
|
|
743 <entry>L</entry>
|
|
744 <entry>L</entry>
|
|
745 <entry>L</entry>
|
|
746 <entry>L</entry>
|
|
747 <entry>L</entry>
|
|
748 <entry>L</entry>
|
|
749 <entry>L</entry>
|
|
750 <entry>L</entry>
|
|
751 <entry></entry>
|
|
752 <entry></entry>
|
|
753 <entry></entry>
|
|
754 <entry></entry>
|
|
755 <entry></entry>
|
|
756 <entry></entry>
|
|
757 <entry></entry>
|
|
758 <entry></entry>
|
|
759 </row>
|
|
760 <row>
|
|
761 <entry spanname="spa1-2">C</entry>
|
|
762 <entry spanname="spa3-4">C</entry>
|
|
763 <entry spanname="spa5-6">C</entry>
|
|
764 <entry spanname="spa7-8">C</entry>
|
|
765 <entry></entry>
|
|
766 <entry></entry>
|
|
767 <entry></entry>
|
|
768 <entry></entry>
|
|
769 <entry></entry>
|
|
770 <entry></entry>
|
|
771 <entry></entry>
|
|
772 <entry></entry>
|
|
773 </row>
|
|
774 <row>
|
|
775 <entry></entry>
|
|
776 <entry></entry>
|
|
777 <entry></entry>
|
|
778 <entry></entry>
|
|
779 <entry></entry>
|
|
780 <entry></entry>
|
|
781 <entry></entry>
|
|
782 <entry></entry>
|
|
783 <entry>L</entry>
|
|
784 <entry>L</entry>
|
|
785 <entry>L</entry>
|
|
786 <entry>L</entry>
|
|
787 <entry>L</entry>
|
|
788 <entry>L</entry>
|
|
789 <entry>L</entry>
|
|
790 <entry>L</entry>
|
|
791 </row>
|
|
792 <row>
|
|
793 <entry>L</entry>
|
|
794 <entry>L</entry>
|
|
795 <entry>L</entry>
|
|
796 <entry>L</entry>
|
|
797 <entry>L</entry>
|
|
798 <entry>L</entry>
|
|
799 <entry>L</entry>
|
|
800 <entry>L</entry>
|
|
801 <entry></entry>
|
|
802 <entry></entry>
|
|
803 <entry></entry>
|
|
804 <entry></entry>
|
|
805 <entry></entry>
|
|
806 <entry></entry>
|
|
807 <entry></entry>
|
|
808 <entry></entry>
|
|
809 </row>
|
|
810 <row>
|
|
811 <entry></entry>
|
|
812 <entry></entry>
|
|
813 <entry></entry>
|
|
814 <entry></entry>
|
|
815 <entry></entry>
|
|
816 <entry></entry>
|
|
817 <entry></entry>
|
|
818 <entry></entry>
|
|
819 <entry spanname="spa9-10">C</entry>
|
|
820 <entry spanname="spa11-12">C</entry>
|
|
821 <entry spanname="spa13-14">C</entry>
|
|
822 <entry spanname="spa15-16">C</entry>
|
|
823 </row>
|
|
824 <row>
|
|
825 <entry></entry>
|
|
826 <entry></entry>
|
|
827 <entry></entry>
|
|
828 <entry></entry>
|
|
829 <entry></entry>
|
|
830 <entry></entry>
|
|
831 <entry></entry>
|
|
832 <entry></entry>
|
|
833 <entry>L</entry>
|
|
834 <entry>L</entry>
|
|
835 <entry>L</entry>
|
|
836 <entry>L</entry>
|
|
837 <entry>L</entry>
|
|
838 <entry>L</entry>
|
|
839 <entry>L</entry>
|
|
840 <entry>L</entry>
|
|
841 </row>
|
|
842 </tbody>
|
|
843 </tgroup>
|
|
844 </informaltable>
|
|
845
|
|
846 <para>
|
|
847 Jak vidíte, tak se vzor opakuje každé 4 řádky, takže při ořezu prokládaného
|
|
848 videa musí být odsazení v ose y a výška beze zbytku delitelné 4.
|
|
849 </para>
|
|
850
|
|
851 <para>
|
|
852 Nativní DVD rozlišení je 720x480 pro NTSC a 720x576 pro PAL, ale je zde ještě
|
|
853 příznak poměru stran, který udává, zda se jedná o obrazovku (full-screen)(4:3),
|
|
854 nebo širokoúhlý film (wide-screen)(16:9). Mnoho (jestli ne většina)
|
|
855 širokoúhlých DVD není přesně 16:9, ale bude buď 1.85:1 anebo 2.35:1
|
|
856 (cinescope). To znamená, že zde budou ve videu černé okraje, které bude nutné
|
|
857 odstřihnout.
|
|
858 </para>
|
|
859
|
|
860 <para>
|
|
861 <application>MPlayer</application> poskytuje filtr pro detekci potřebného
|
|
862 ořezu, který stanoví ořezový obdélník (<option>-vf cropdetect</option>).
|
|
863 Spusťte <application>MPlayer</application> s volbou
|
|
864 <option>-vf cropdetect</option> a on vám vypíše nastavení filtru crop pro
|
|
865 ořezání okrajů.
|
|
866 Měli byste nechat běžet film tak dlouho, dokud není použita celá plocha
|
|
867 obrázku, abyste dostali správné hodnoty crop.
|
|
868 </para>
|
|
869
|
|
870 <para>
|
|
871 Pak otestujte získané hodnoty z příkazového řádku
|
|
872 <application>MPlayer</application>u vypisované <option>cropdetect</option>em
|
|
873 a upravte obdélník podle potřeby.
|
|
874 V tom vám pomůže filtr <option>rectangle</option>, který umožňuje interaktivně
|
|
875 nastavit obdélník pro váš film.
|
|
876 Nezapomeňte zachovat výše uvedená doporučení, abyste nepoškodili barevnou
|
|
877 mapu.
|
|
878 </para>
|
|
879
|
|
880 <para>
|
|
881 Škálování je obvykle nevhodné.
|
|
882 Škálování prokládaného videa je obtížné a pokud chcete zachovat prokládání,
|
|
883 měli byste se mu úplně vyhnout.
|
|
884 Pokud mebudete škálovat, ale budete chtít používat rozměry v násobcích 16,
|
|
885 budete muset oříznout i část obrazu.
|
|
886 Neponechávejte ani malé černé okraje, jelikož se velmi špatně kódují!
|
|
887 </para>
|
|
888
|
|
889 <para>
|
|
890 Protože MPEG-4 používá makrobloky 16x16, měli byste se ujistit, že oba rozměry
|
|
891 videa jsou násobkem 16, jinak snížíte kvalitu, zvlášť při nízkých datových
|
|
892 tocích. Můžete to zajistit zaokrouhlením šířky a výšky ořezového obdélníku
|
|
893 dolů na nejbližší násobek 16.
|
|
894 Jak jsme již řekli, měli byste při ořezávání zvýšit odsazení
|
|
895 (offset) v ose y o polovinu rozdílu mezi starou a novou výškou, takže bude
|
|
896 výsledné video bráno ze středu snímku. Z důvodu principu vzorkování DVD videa
|
|
897 se ujistěte, že je odsazení sudé číslo. (Popravdě, přijměte jako pravidlo,
|
|
898 nikdy nepoužívat liché hodnoty pro jakýkoli z parametrů při ořezávání a
|
|
899 škálování videa.) Pokud nechcete zahodit těch několik pixelů navíc, můžete
|
|
900 místo toho raději změnit velikost videa (škálovat). Na to se podíváme
|
|
901 v příkladu níže.
|
|
902 V praxi můžete nechat filtr <option>cropdetect</option> udělat všechnu práci
|
|
903 zmíněnou výše, jelikož má volitelný parametr <option>round</option>
|
|
904 (zaokrouhlení), jehož výchozí hodnota je 16.
|
|
905 </para>
|
|
906
|
|
907 <para>
|
|
908 Rovněž buďte opatrní na "napůl černé" pixely na okrajích. Vždy je rovněž
|
|
909 odstřihněte, jinak zde budete plýtvat bity, které můžete použít jinde.
|
|
910 </para>
|
|
911
|
|
912 <para>
|
|
913 Poté co provedete vše, co jsme si doposud řekli, budete mít video, které asi
|
|
914 nebude právě 1.85:1 nebo 2.35:1, ale někde poblíž. Můžete spočítat nový poměr
|
|
915 stran ručně, ale <application>MEncoder</application> nabízí volbu pro
|
|
916 <systemitem class="library">libavcodec</systemitem> nazývanou <option>autoaspect</option>,
|
|
917 která to za vás udělá. Nezvětšujte video jen proto, abyste dosáhli čtvercových
|
|
918 pixelů, pokud je vám milé místo na disku. Škálování by mělo být provedeno při
|
|
919 přehrávání, kdy přehrávač použije poměr stran uložený v AVI pro zajištění
|
|
920 správného rozlišení.
|
|
921 Naneštěstí ne všechny přehrávače uplatňují tuto autoškálovací informaci,
|
|
922 takže můžete přece jen chtít škálovat.
|
|
923 </para>
|
|
924 </sect2>
|
|
925
|
|
926
|
|
927 <sect2 id="menc-feat-dvd-mpeg4-resolution-bitrate">
|
|
928 <title>Volba rozlišení a datového toku</title>
|
|
929
|
|
930 <para>
|
|
931 Pokud nebudete enkódovat v režimu konstantního kvantizeru, musíte zvolit
|
|
932 velikost datového toku.
|
|
933 Koncepce datového toku je velmi jednoduchá.
|
|
934 Je to (průměrný) počet bitů spotřebovaný na jednu sekundu filmu.
|
|
935 Normálně se datový tok udává v kilobitech (1000 bitů) za sekundu.
|
|
936 Velikost vašeho filmu je pak datový tok násobený délkou filmu, plus malá
|
|
937 režie (viz například sekci
|
|
938 <link linkend="menc-feat-dvd-mpeg4-muxing-avi-limitations">kontejner AVI</link>).
|
|
939 Ostatní parametry jako je škálování, ořezání atd.
|
|
940 <emphasis role="bold">nezmění</emphasis> velikost souboru, pokud zároveň
|
|
941 nezměníte datový tok!
|
|
942 </para>
|
|
943 <para>
|
|
944 Datový tok se <emphasis role="bold">nemění</emphasis> proporcionálně
|
|
945 k rozlišení.
|
|
946 Jinými slovy, soubor 320x240 při 200 kbit/sek nebude mít stejnou kvalitu
|
|
947 jako ten samý film při 640x480 a 800 kbitech/sek!
|
|
948 Jsou pro to dva důvody:
|
|
949 <orderedlist>
|
|
950 <listitem><para>
|
|
951 <emphasis role="bold">Dojem</emphasis>: MPEG artefakty jsou patrné
|
|
952 tím více, čím jsou více zvětšené!
|
|
953 Artefakty se objevují ve velikosti bloků (8x8).
|
|
954 Vaše oko neodhalí chyby ve 4800 malých blocích tak snadno jako ve 1200
|
|
955 velkých (předpokládáme, že oboje budete škálovat na celou obrazovku).
|
|
956 </para></listitem>
|
|
957 <listitem><para>
|
|
958 <emphasis role="bold">Teoretický</emphasis>: Když zmenšíte obrázek,
|
|
959 ale stále použijete stejnou velikost bloků (8x8) pro frekvenční prostorovou
|
|
960 transformaci, přesunete více dat do oblasti vyšších frekvencí.
|
|
961 Zjednodušeně řečeno, každý pixel nyní obsahuje více detailů, než předtím.
|
|
962 Dokonce i když připustíme, že jste zmenšili obraz obsahující 1/4 informací
|
|
963 o daném prostoru, stále může obsahovat mnoho detailů v daném frekvenčním
|
|
964 pásmu (předpokládáme, že vysoké frekvence byly v originálním 640x480 snímku
|
|
965 ořezány).
|
|
966 </para></listitem>
|
|
967 </orderedlist>
|
|
968 </para>
|
|
969 <para>
|
|
970 Dřívější návody doporučovaly volit datový tok a rozlišení rozpočítáním
|
|
971 bitů na pixely, ale to obvykle není správně díky ze zmíněných důvodů.
|
|
972 Mnohem lepším se zdá odhad, že je datový tok úměrný čtverci rozlišení,
|
|
973 takže 320x240 při 400 kbit/sek by mělo být srovnatelné s 640x480
|
|
974 při 800 kbit/sek.
|
|
975 Tato úměra však nebyla ověřena teoreticky ani empiricky.
|
|
976 Navíc, vezmeme-li v úvahu to, že se filmy velmi liší šumem, počtem detailů,
|
|
977 množstvím pohybu atd, je beznadějné vytvořit obecná doporučení pro počet
|
|
978 bitů na délku diagonály (analogie bitů na pixel, avšak používá plochu obrazu).
|
|
979 </para>
|
|
980 <para>
|
|
981 Tolik k obtížnosti volby datového toku a rozlišení.
|
|
982 </para>
|
|
983
|
|
984
|
|
985 <sect3 id="menc-feat-dvd-mpeg4-resolution-bitrate-compute">
|
|
986 <title>Výpočet rozlišení</title>
|
|
987 <para>
|
|
988 Nejdřív byste si měli spočítat enkódovaný poměr stran:
|
|
989 <systemitem>PSo = (Šo x (PSa / PRdvd )) / Vo</systemitem>
|
|
990 <itemizedlist>
|
|
991 <title>kde:</title>
|
|
992 <listitem><para>
|
|
993 Šo a Vo jsou šířka a výška ořezaného videa,
|
|
994 </para></listitem>
|
|
995 <listitem><para>
|
|
996 PSa je zobrazovaný poměr stran, jež je obvykle 4/3 nebo 16/9,
|
|
997 </para></listitem>
|
|
998 <listitem><para>
|
|
999 PRdvd je poměr pixelů v DVD, který je roven 1.25=(720/576) pro DVD
|
|
1000 v PALu a 1.5=(720/480) pro DVD v NTSC,
|
|
1001 </para></listitem>
|
|
1002 </itemizedlist>
|
|
1003 </para>
|
|
1004
|
|
1005 <para>
|
|
1006 Pak si můžete spočítat rozlišení X a Y podle určitého faktoru kvality komprese
|
|
1007 (CQ):
|
|
1008 <systemitem>RozY = INT(SQRT( 1000*Datový_tok/25/PSo/CQ )/16) * 16</systemitem>
|
|
1009 a
|
|
1010 <systemitem>RozX = INT( RozY * PSo / 16) * 16</systemitem>
|
|
1011 </para>
|
|
1012
|
|
1013 <para>
|
|
1014 Dobře, ale co je ten CQ?
|
|
1015 CQ odpovídá počtu bitů na pixel a na snímek v zakódování. Jinými slovy, čím
|
|
1016 vyšší je CQ, tím nižší je šance uvidět enkódovací artefakty.
|
|
1017 Pokud ovšem máte cílový rozměr vašeho filmu (1 nebo 2 CD například), máte jen
|
|
1018 omezené množství bitů, které můžete spotřebovat; takže je nutné najít vhodný
|
|
1019 kompromis mezi komprimovatelností a kvalitou.
|
|
1020 </para>
|
|
1021
|
|
1022 <para>
|
|
1023 CQ závisí jak na datovém toku, tak na rozlišení filmu. Abyste zvýšili CQ,
|
|
1024 obvykle zmenšíte daný film, takže je datový tok spočítán ve funkci cílové
|
|
1025 velikosti a délky filmu, které jsou konstantní.
|
|
1026 CQ pod 0.18 obvykle vede k velmi čtverečkovanému obrazu, protože není dostatek
|
|
1027 bitů pro zakódování informací každého makrobloku (MPEG4, stejně jako mnoho
|
|
1028 jiných kodeků seskupuje pixely do bloků při komprimaci obrázku; pokud není
|
|
1029 dostatek bitů, jsou viditelné hranice těchto bloků).
|
|
1030 Proto je rozumné volit CQ v rozmezí 0.20 až 0.22 pro rip na 1 CD a
|
|
1031 0.26 až 0.28 pro 2 CD.
|
|
1032 </para>
|
|
1033
|
|
1034 <para>
|
|
1035 Prosíme berte v potaz, že CQ je jen informační pomůcka závisející na
|
|
1036 enkódovaném obsahu. CQ okolo 0.18 může být dostatečně dobrý pro Bergmana,
|
|
1037 na rozdíl od filmu jako je Matrix, který obsahuje mnoho rychlých scén.
|
|
1038 Na druhou stranu je zbytečné zvyšovat CQ výš než 0.30, jelikož budete plýtvat
|
|
1039 bity za minimální zisk kvality.
|
|
1040 </para>
|
|
1041
|
|
1042 </sect3>
|
|
1043
|
|
1044 </sect2>
|
|
1045
|
|
1046 <sect2 id="menc-feat-dvd-mpeg4-filtering">
|
|
1047 <title>Filtrování</title>
|
|
1048
|
|
1049 <para>
|
|
1050 Naučit se používat video filtry <application>MEncoder</application>u je
|
|
1051 základem pro produkci dobrých videí.
|
|
1052 Veškeré úpravy videa jsou prováděny pomocí filtrů -- ořezání, škálování,
|
|
1053 úprava barev, odstranění šumu, zaostření, odstranění prokladu, telecinování,
|
|
1054 inverzní telecine a deblokování, abychom jmenovali alespoň některé.
|
|
1055 Spolu s vyčerpávajícím počtem podporovaných vstupních formátů je nabídka
|
|
1056 dostupných filtrů v <application>MEncoder</application>u jednou z jeho
|
|
1057 hlavních výhod oproti podobným aplikacím.
|
|
1058 </para>
|
|
1059
|
|
1060 <para>
|
|
1061 Filtry jsou nahrávány v řadě za použití volby -vf :
|
|
1062
|
|
1063 <screen>-vf filtr1=volby,filtr2=volby,...</screen>
|
|
1064
|
|
1065 Většina filtrů přebírá několik číselných voleb oddělených dvojtečkou, ale
|
|
1066 syntaxe voleb se liší od filtru k filtru, takže si přečtěte manuál
|
|
1067 pro více informací o filtru který chcete použít.
|
|
1068 </para>
|
|
1069
|
|
1070 <para>
|
|
1071 Filtry zpracovávají video v pořadí, v jakém jsou načteny.
|
|
1072 Například následující řada:
|
|
1073
|
|
1074 <screen>-vf crop=688:464:12:4,scale=640:464</screen>
|
|
1075
|
|
1076 nejprve vyřízne z obrázku oblast 688x464 s levým horním rohem v bodě (12,4)
|
|
1077 a výsledek pak zmenší na 640x464.
|
|
1078 </para>
|
|
1079
|
|
1080 <para>
|
|
1081 Určité filtry potřebují být nahrány na začátku, nebo co nejblíž začátku
|
|
1082 řetězu filtrů, aby mohly využívat informace z video dekodéru, které budou
|
|
1083 ztraceny nebo znehodnoceny ostatními filtry.
|
|
1084 Nejdůležitější příklady jsou <option>pp</option> (postprocesing, pouze pokud
|
|
1085 provádí deblok nebo dering operace),
|
|
1086 <option>spp</option> (další postprocesor pro odstranění MPEG artefaktů),
|
|
1087 <option>pullup</option> (inverzní telecine) a
|
|
1088 <option>softpulldown</option> (pro konverzi soft telecine na hard
|
|
1089 telecine).
|
|
1090 </para>
|
|
1091
|
|
1092 <para>
|
|
1093 Všeobecně byste měli filtrovat co nejméně je to možné, abyste zůstali co
|
|
1094 nejblíže DVD originálu. Ořezání je často nutné (vysvětleno výše), ale vyhněte
|
|
1095 se škálování videa. Ačkoli je zmenšení občas preferováno před použitím
|
|
1096 vyšších kvantizérů. My se musíme vyvarovat obou těchto případů: pamatujte,
|
|
1097 že jsme se již na začátku rozhodli obětovat bity za kvalitu.
|
|
1098 </para>
|
|
1099
|
|
1100 <para>
|
|
1101 Rovněž neupravujte gamu, kontrast, jas, atd. Co vypadá dobře na vaší
|
|
1102 obrazovce, nemusí vypadat dobře na ostatních. Tyto korekce by měly být
|
|
1103 prováděny výhradně při přehrávání.
|
|
1104 </para>
|
|
1105
|
|
1106 <para>
|
|
1107 Jednu věc byste však udělat mohli, a to protáhnout video velmi lehkým
|
|
1108 odšumovacím filtrem, jako je <option>-vf hqdn3d=2:1:2</option>.
|
|
1109 Zde je opět důvodem využití bitů k lepšímu účelu: proč jimi plýtvat na
|
|
1110 enkódování šumu, když si můžete šum přidat až při přehrávání?
|
|
1111 Zvýšením parametrů pro <option>hqdn3d</option> dále zvýší komprimovatelnost,
|
|
1112 ale pokud zvýšíte hodnoty příliš, riskujete zhoršení viditelnosti obrazu.
|
|
1113 Výše zmíněné hodnoty (<option>2:1:2</option>) jsou dost konzervativní;
|
|
1114 měli byste si zaexperimentovat s vyššími hodnotami a zhodnotit výsledky sami.
|
|
1115 </para>
|
|
1116
|
|
1117 </sect2>
|
|
1118
|
|
1119
|
|
1120 <sect2 id="menc-feat-dvd-mpeg4-interlacing">
|
|
1121 <title>Prokládání a Telecine</title>
|
|
1122
|
|
1123 <para>
|
|
1124 Téměř veškeré filmy jsou natáčeny při 24 snímcích/s. Jelikož NTSC má
|
|
1125 snímkovou rychlost 30000/1001 snímků/s, je třeba provést úpravu těchto
|
|
1126 24 snímků/s videí, aby měly správnou NTSC snímkovou rychlost. Tato úprava se
|
|
1127 jmenuje 3:2 pulldown a obecně je známa jako telecine (protože je pulldown
|
|
1128 často prováděn během přenosu filmu na video) a, jednoduše řečeno, pracuje tak,
|
|
1129 že se film zpomalí na 24000/1001 snímků/s a každý čtvrtý snímek se zopakuje.
|
|
1130 </para>
|
|
1131
|
|
1132 <para>
|
|
1133 Naopak žádné speciální úpravy se neprovádějí videu pro PAL DVD, která běží
|
|
1134 při 25 snímcích/s. (Technicky lze na PAL provést telecine, tzv. 2:2 pulldown,
|
|
1135 ale v praxi se nepoužívá.) Film s 24 snímky/s je jednoduše přehráván rychlostí
|
|
1136 25 snímků/s. Výsledkem je, že video běží o něco rychleji, ale pokud nejste
|
|
1137 vetřelec, tak si rozdílu ani nevšimnete. Většina filmů má navíc výškově
|
|
1138 korigovaný zvuk, takže při přehrávání 25 snímků/s vše zní jak má i přesto, že
|
|
1139 zvuk (a proto i celé video) má o 4% kratší dobu přehrávání než NTSC DVD.
|
|
1140 </para>
|
|
1141
|
|
1142 <para>
|
|
1143 Jelikož video na PAL DVD nebylo upravováno, nemusíte si dělat starosti s jeho
|
|
1144 snímkovou rychlostí. Zdroj má 25 snímků/s, váš rip také. Pokud ovšem ripujete
|
|
1145 NTSC DVD film, musíte provést inverzní telecine.
|
|
1146 </para>
|
|
1147
|
|
1148 <para>
|
|
1149 Filmy točené rychlostí 24 snímků/s jsou na NTSC DVD uloženy buď jako
|
|
1150 30000/1001 po telecine, nebo jako progresivní (neprokládaný) se snímkovou
|
|
1151 24000/1001 snímků/s, na kterých by měl provést telecine DVD přehrávač za letu.
|
|
1152 Není to ale zákon: některé TV série jsou prokládané (např. Buffy Lovec upírů),
|
|
1153 zatímco jiné jsou porůznu neprokládané nebo prokládané (např. Anděl, nebo 24
|
|
1154 hodin).
|
|
1155 </para>
|
|
1156
|
|
1157 <para>
|
|
1158 Doporučujeme, abyste si přečetli sekci o tom
|
|
1159 <link linkend="menc-feat-telecine">Jak si poradit s telecine a prokladem na NTSC DVD</link>
|
|
1160 a naučili se jak využít různé možnosti.
|
|
1161 </para>
|
|
1162
|
|
1163 <para>
|
|
1164 Pokud ovšem většinou ripujete pouze filmy, nejspíš se setkáváte
|
|
1165 s neprokládaným nebo prokládaným videem 24 snímků/s. V tom případě můžete
|
|
1166 použít <option>pullup</option> filtr <option>-vf pullup,softskip</option>.
|
|
1167 </para>
|
|
1168
|
|
1169 </sect2>
|
|
1170
|
|
1171 <sect2 id="menc-feat-dvd-mpeg4-encoding-interlaced">
|
|
1172 <title>Enkódování prokládaného videa</title>
|
|
1173
|
|
1174 <para>
|
|
1175 Pokud je film, který chcete enkódovat, prokládaný (NTSC video nebo
|
|
1176 PAL video), budete si muset vybrat, zda jej chcete "odproložit" nebo ne.
|
|
1177 Zatímco odstranění prokladu učiní váš film použitelným na progresivně
|
|
1178 vykreslovaných zobrazovačích jako jsou počítačové monitory a projektory.
|
|
1179 Cenou za to je, snížení rychlosti z 50 nebo 60000/1001 půlsnímků za sekundu
|
|
1180 na 25 nebo 30000/1001 snímků za sekundu a zhruba polovina informací bude
|
|
1181 z vašeho filmu ztracena ve scénách s významným množstvím pohybu.
|
|
1182 </para>
|
|
1183
|
|
1184 <para>
|
|
1185 Proto pokud enkódujete ve vysoké kvalitě pro archivační účely, doporučujeme
|
|
1186 ponechat film prokládaný.
|
|
1187 Vždy můžete provést odstranění prokladu při přehrávání pokud zobrazujete
|
|
1188 na progresivním zařízení a přehrávače v budoucnosti budou schopny odstraňovat
|
|
1189 proklad v plné půlsnímkové rychlosti, čili odvozovat 50 nebo 60000/1001
|
|
1190 úplných snímků za sekundu z prokládaného videa.
|
|
1191 </para>
|
|
1192
|
|
1193 <para>
|
|
1194 Když pracujete s prokládaným videem, musíte zvláště dbát na:
|
|
1195 </para>
|
|
1196
|
|
1197 <orderedlist>
|
|
1198 <listitem><para>
|
|
1199 Výška a svislé odsazení pro ořezání musí být násobkem 4.
|
|
1200 </para></listitem>
|
|
1201 <listitem><para>
|
|
1202 Jakékoli svislé škálování musí být provedeno v prokládaném režimu.
|
|
1203 </para></listitem>
|
|
1204 <listitem><para>
|
|
1205 Postprocesní a odšumovací filtry nemusí pracovat podle očekávání,
|
|
1206 dokud nezařídíte, aby zpracovávaly najednou pouze jeden půlsnímek a
|
|
1207 mohou vám poškodit video při nesprávném použití.
|
|
1208 </para></listitem>
|
|
1209 </orderedlist>
|
|
1210
|
|
1211 <para>
|
|
1212 S vědomím těchto souvislostí vám předkládáme první příklad:
|
|
1213 </para>
|
|
1214 <screen>
|
|
1215 mencoder <replaceable>capture.avi</replaceable> -mc 0 -oac lavc -ovc lavc -lavcopts \
|
|
1216 vcodec=mpeg2video:vbitrate=6000:ilmv:ildct:acodec=mp2:abitrate=224
|
|
1217 </screen>
|
|
1218 <para>
|
|
1219 Povšimněte si voleb <option>ilmv</option> a <option>ildct</option>.
|
|
1220 </para>
|
|
1221 </sect2>
|
|
1222
|
|
1223
|
|
1224 <sect2 id="menc-feat-dvd-mpeg4-audio">
|
|
1225 <title>Zvuk</title>
|
|
1226
|
|
1227 <para>
|
|
1228 Zvuk je mnohem jednodušší problém k řešení: pokud prahnete po kvalitě, prostě
|
|
1229 jej nechte tak jak je.
|
|
1230 Dokonce i AC3 5.1 datové proudy mají nanejvýš 448Kbitů/s a stojí za každý bit.
|
|
1231 Možná jste v pokušení převést zvuk do Ogg Vorbis při vysoké kvalitě, ale jen
|
|
1232 proto, že dnes nemáte A/V receiver pro hardwarové dekódování AC3 neznamená,
|
|
1233 že jej nebudete mít zítra. Připravte své DVD ripy zachováním AC3 datových
|
|
1234 proudů.
|
|
1235 Datový proud AC3 můžete zachovat buď jeho zkopírováním přímo do video proudu
|
|
1236 <link linkend="menc-feat-mpeg4">během enkódování</link>.
|
|
1237 Také můžete extrahovat AC3 proud, abyste jej pak namixovali do nosičů jako je
|
|
1238 NUT nebo Matroska.
|
|
1239 <screen>mplayer <replaceable>zdrojový_soubor.vob</replaceable> -aid 129 -dumpaudio -dumpfile <replaceable>zvuk.ac3</replaceable></screen>
|
|
1240 vytáhne do souboru <replaceable>zvuk.ac3</replaceable> zvukovou stopu
|
|
1241 číslo 129 ze souboru <replaceable>zdrojový_soubor.vob</replaceable> (NB: DVD
|
|
1242 VOB soubory obvykle používají odlišné číslování audia,
|
|
1243 což znamená, že VOB zvuková stopa 120 je druhou zvukovou stopou v souboru).
|
|
1244 </para>
|
|
1245
|
|
1246 <para>
|
|
1247 Někdy ovšem opravdu nemáte jinou možnost než dále zkomprimovat zvuk, aby vám
|
|
1248 zbylo více bitů na video.
|
|
1249 Většina lidí volí komprimaci buď pomocí MP3 nebo Vorbis audio kodeků.
|
|
1250 Zatímco ten druhý je efektivnější z prostorového hlediska, MP3 je lépe
|
|
1251 podporován hardwarovými přehrávači, ačkoli časy se mění.
|
|
1252 </para>
|
|
1253
|
|
1254 <para>
|
|
1255 Nejdříve ze všeho budete muset převést DVD zvuk do WAV souboru, který pak
|
|
1256 použije zvukový kodek jako vstup.
|
|
1257 Například:
|
|
1258 <screen>mplayer <replaceable>zdrojový_soubor.vob</replaceable> -ao pcm:file=<replaceable>výsledný_zvuk.wav</replaceable> -vc dummy -aid 1 -vo null</screen>
|
|
1259 vylije druhou zvukovou stopu ze souboru
|
|
1260 <replaceable>zdrojový_soubor.vob</replaceable> do souboru
|
|
1261 <replaceable>výsledný_zvuk.wav</replaceable>.
|
|
1262 Měli byste normalizovat zvuk před enkódováním, protože DVD zvukové stopy jsou
|
|
1263 obvykle nahrávány při nízkých hlasitostech.
|
|
1264 Můžete například použít nástroj <application>normalize</application>, který je
|
|
1265 k dispozici ve většině distribucí.
|
|
1266 Pokud používáte Windows, stejnou práci udělá nástroj jako
|
|
1267 <application>BeSweet</application>.
|
|
1268 Komprimovat budete buď ve Vorbisu nebo MP3.
|
|
1269 Například:
|
|
1270 <screen>oggenc -q1 <replaceable>cílový_zvuk.wav</replaceable></screen>
|
|
1271 provede enkódování <replaceable>cílového_zvuku.wav</replaceable> s kvalitou 1,
|
|
1272 která přibližně odpovídá 80Kb/s a je to minimální kvalita na kterou byste měli
|
|
1273 enkódovat, pokud vám záleží na kvalitě.
|
|
1274 Poznamenejme, že <application>MEncoder</application> v současnosti neumí
|
|
1275 muxovat Vorbis zvukové stopy do výstupního souboru, protože podporuje pouze
|
|
1276 AVI a MPEG kontejnery jako výstup. Pro oba platí, že některé přehrávače mohou
|
|
1277 mít problémy s udržením audio/video synchronizace, pokud je přítomen VBR zvuk
|
|
1278 jako je Vorbis.
|
|
1279 Nemějte obavy, v tomto dokumentu vám ukážeme, jak to lze udělat pomocí
|
|
1280 programů třetích stran.
|
|
1281 </para>
|
|
1282
|
|
1283 </sect2>
|
|
1284
|
|
1285
|
|
1286 <sect2 id="menc-feat-dvd-mpeg4-muxing">
|
|
1287 <title>Muxování (multiplexování)</title>
|
|
1288 <para>
|
|
1289 Nyní, když máte své video enkódované, budete jej nejspíš chtít muxovat
|
|
1290 s jedním nebo více zvukovými stopami do nosného filmového formátu, jako je
|
|
1291 AVI, MPEG, Matroska nebo NUT.
|
|
1292 <application>MEncoder</application> je zatím schopen zvuk a video zapracovat
|
|
1293 pouze do nosných formátů MPEG a AVI.
|
|
1294 Například:
|
|
1295 <screen>mencoder -oac copy -ovc copy -o <replaceable>výstupní_film.avi</replaceable> -audiofile <replaceable>vstupní_audio.mp2</replaceable> <replaceable>vstupní_video.avi</replaceable></screen>
|
|
1296 To by mělo sloučit video soubor <replaceable>vstupní_video.avi</replaceable>
|
|
1297 a zvukový soubor <replaceable>vstupní_audio.mp2</replaceable>
|
|
1298 do AVI souboru <replaceable>výstupní_film.avi</replaceable>.
|
|
1299 Tento příkaz pracuje s MPEG-1 layer I, II a III (známým jako MP3) zvukem,
|
|
1300 WAV a také několika dalšími formáty zvuku.
|
|
1301 </para>
|
|
1302
|
|
1303 <para>
|
|
1304 <application>MEncoder</application> obsahuje experimentální podporu pro
|
|
1305 <systemitem class="library">libavformat</systemitem>, což je knihovna
|
|
1306 z projektu FFmpeg, která podporuje muxování a demuxování celé řady nosných
|
|
1307 formátů.
|
|
1308 Například:
|
|
1309 <screen>mencoder -oac copy -ovc copy -o <replaceable>výstupní_film.asf</replaceable> -audiofile <replaceable>vstupní_audio.mp2</replaceable> <replaceable>vstupní_video.avi</replaceable> -of lavf -lavfopts format=asf</screen>
|
|
1310 To provede stejnou činnost jako předchozí příklad, avšak výstupním formátem
|
|
1311 bude ASF.
|
|
1312 Prosím berte na vědomí, že tato podpora je velmi experimentální (ale de ode
|
|
1313 dne lepší) a bude funkční pouze pokud jste zkompilovali
|
|
1314 <application>MPlayer</application> s podporou pro
|
|
1315 <systemitem class="library">libavformat</systemitem> (což znamená, že
|
|
1316 předkompilovaná binární verze nebude většinou fungovat).
|
|
1317 </para>
|
|
1318
|
|
1319 <sect3 id="menc-feat-dvd-mpeg4-muxing-avi-limitations">
|
|
1320 <title>Limitace nosného formátu AVI</title>
|
|
1321 <para>
|
|
1322 Ačkoli je to po MPEG-1 nejpodporovanější nosný formát, má AVI i jisté
|
|
1323 zásadní nedostatky. Snad nejviditelnější je režie.
|
|
1324 Na každý chunk AVI souboru je 24 bajtů ztraceno na hlavičky a index.
|
|
1325 To se projeví asi 5 MP na hodinu, neboli 1-2.5% prodloužení 700 MB filmu.
|
|
1326 Nevypadá to jako mnoho, ale může to znamenat rozdíl mezi možností použít
|
|
1327 video při 700 kbitech/s nebo 714 kbitech/s a tady se každý bit projeví na
|
|
1328 kvalitě.
|
|
1329 </para>
|
|
1330
|
|
1331 <para>
|
|
1332 Navíc k této neefektivitě má AVI také následující hlavní omezení:
|
|
1333 </para>
|
|
1334
|
|
1335 <orderedlist>
|
|
1336 <listitem>
|
|
1337 <para>
|
|
1338 Může být uchováván pouze obsah s konstantní snímkovou rychlostí. To je
|
|
1339 zvláště omezující, když má původní materiál, který chcete enkódovat, smíšený
|
|
1340 obsah. Například směs NTSC videa a filmového materiálu.
|
|
1341 Jistěže jsou zde cestičky, které umožní uložit obsah se smíšenou snímkovou
|
|
1342 rychlostí v AVI, ale ty zvyšují (již tak velkou) režii pětinásobně nebo víc,
|
|
1343 proto nejsou praktické.
|
|
1344 </para>
|
|
1345 </listitem>
|
|
1346 <listitem>
|
|
1347 <para>
|
|
1348 Zvuk v AVI musí mít buď konstantní datový tok (CBR) nebo konstantní velikost
|
|
1349 rámce (čili všechny rámce se dekódují na stejný počet vzorků).
|
|
1350 Naneštěstí ten nejefektivnější kodek, Vorbis, nesplňuje ani jeden z těchto
|
|
1351 požadavků.
|
|
1352 Pokud tedy plánujete uložit svůj film do AVI, budete muset použít méně
|
|
1353 efektivní kodek, jako MP3 nebo AC3.
|
|
1354 </para>
|
|
1355 </listitem>
|
|
1356 </orderedlist>
|
|
1357
|
|
1358 <para>
|
|
1359 Z výše uvedených důvodů <application>MEncoder</application> zatím
|
|
1360 nepodporuje proměnnou snímkovou rychlost ani enkódování do Vorbisu.
|
|
1361 Nemusíte to však považovat za omezení, jestliže je
|
|
1362 <application>MEncoder</application> jediným nástrojem pro vaše
|
|
1363 enkódování. Nakonec je možné použít <application>MEncoder</application> pouze
|
|
1364 pro enkódování videa a pak použít externí nástroje pro enkódování zvuku a
|
|
1365 namuxování do jiného nosného formátu.
|
|
1366 </para>
|
|
1367 </sect3>
|
|
1368
|
|
1369 <sect3 id="menc-feat-dvd-mpeg4-muxing-matroska">
|
|
1370 <title>Muxování do nosného formátu Matroska</title>
|
|
1371 <para>
|
|
1372 Matroska je svobodný a otevřený standard nosného formátu, zaměřený na
|
|
1373 nabídku mnoha pokročilých vlastností, které starší nosné formáty, jako AVI,
|
|
1374 nemohou poskytnout.
|
|
1375 Například Matroska podporuje zvuk s proměnným datovým tokem (VBR),
|
|
1376 proměnné snímkové rychlosti (VFR), kapitoly, přílohy souborů, kód pro
|
|
1377 detekci chyb (EDC) a moderní A/V kodeky jako "Advanced Audio
|
|
1378 Coding" (AAC), "Vorbis" nebo "MPEG-4 AVC" (H.264), z nichž žádný nelze
|
|
1379 použít v AVI.
|
|
1380 </para>
|
|
1381
|
|
1382 <para>
|
|
1383 Nástroje pro vytváření Matroska souborů jsou souhrnně nazvány
|
|
1384 <application>mkvtoolnix</application> a jsou dostupné pro většinu Unixových
|
|
1385 platforem a stejně tak <application>Windows</application>.
|
|
1386 Protože je Matroska otevřený standard, můžete najít jiné nástroje, které vám
|
|
1387 lépe padnou, ale protože mkvtoolnix je nejrozšířenější a je podporován
|
|
1388 přímo Matroska týmem, pokryjeme jen jejich použití.
|
|
1389 </para>
|
|
1390
|
|
1391 <para>
|
|
1392 Asi nejsnazší způsob, jak začít s Matroskou je použít
|
|
1393 <application>MMG</application>, grafickou nadstavbu dodávanou s
|
|
1394 <application>mkvtoolnix</application> a řídit se
|
|
1395 <ulink url="http://www.bunkus.org/videotools/mkvtoolnix/doc/mkvmerge-gui.html">návodem k mkvmerge GUI (mmg)</ulink>
|
|
1396 </para>
|
|
1397
|
|
1398 <para>
|
|
1399 Můžete rovněž muxovat zvukové a video soubory z příkazového řádku:
|
|
1400 <screen>mkvmerge -o <replaceable>výstup.mkv</replaceable> <replaceable>vstupní_video.avi</replaceable> <replaceable>vstupní_audio1.mp3</replaceable> <replaceable>vstupní_audio2.ac3</replaceable></screen>
|
|
1401 To spojí video soubor <replaceable>vstupní_video.avi</replaceable>
|
|
1402 a dva zvukové soubory <replaceable>vstupní_audio1.mp3</replaceable>
|
|
1403 a <replaceable>vstupní_audio2.ac3</replaceable> do Matroska souboru
|
|
1404 <replaceable>výstup.mkv</replaceable>.
|
|
1405 Matroska, jak jsme již řekli, umí mnohem víc než to, jako více zvukových stop
|
|
1406 (včetně doladění audio/video synchronizace), kapitoly, titulky, stříhání,
|
|
1407 atd...
|
|
1408 Detaily naleznete v dokumentaci k těmto aplikacím.
|
|
1409 </para>
|
|
1410
|
|
1411 </sect3>
|
|
1412
|
|
1413 </sect2>
|
|
1414
|
|
1415 </sect1>
|
|
1416
|
|
1417 <sect1 id="menc-feat-telecine">
|
|
1418 <title>Jak naložit s telecine a prokladem v NTSC DVD</title>
|
|
1419
|
|
1420 <sect2 id="menc-feat-telecine-intro">
|
|
1421 <title>Představení</title>
|
|
1422 <formalpara>
|
|
1423 <title>Co je to telecine?</title>
|
|
1424 <para>
|
|
1425 Pokud moc nerozumíte tomu, co je napsáno v tomto dokumentu, doporučujeme
|
|
1426 navštívit tuto stránku:
|
|
1427 <ulink url="http://www.divx.com/support/guides/guide.php?gid=10">http://www.divx.com/support/guides/guide.php?gid=10</ulink>
|
|
1428 Na této adrese je srozumitelný a rozumně vyčerpávající popis co je to
|
|
1429 telecine.
|
|
1430 </para></formalpara>
|
|
1431
|
|
1432 <formalpara>
|
|
1433 <title>Poznámka k číslům.</title>
|
|
1434 <para>
|
|
1435 Mnoho dokumentů, včetně výše odkazované příručky, udává hodnotu půlsnímků za
|
|
1436 sekundu NTSC videa jako 59.94 a odpovídající snímky za sekundu jako 29.97
|
|
1437 (pro telecinované a prokládané video) a 23.976 (pro neprokládané).
|
|
1438 Pro jednoduchost některé dokumenty zaokrouhlují tyto hodnoty na 60, 30 a 24.
|
|
1439 </para></formalpara>
|
|
1440
|
|
1441 <para>
|
|
1442 Přesně řečeno jsou všechny tyto čísla přibližná. Černobílé NTSC video mělo
|
|
1443 přesně 60 půlsnímků za sekundu, ale později byla zvolena hodnota 60000/1001,
|
|
1444 aby bylo možné přidat barevná data a zůstat kompatibilní se starými
|
|
1445 černobílými televizemi. Digitální NTSC (jak je na DVD) má rovněž rychlost
|
|
1446 60000/1001 půlsnímků za sekundu. Z toho vyplývá, že prokládané a telecinované
|
|
1447 video má 30000/1001 snímků za sekundu; neprokládané video má 24000/1001 snímků
|
|
1448 za sekundu.
|
|
1449 </para>
|
|
1450
|
|
1451 <para>
|
|
1452 Starší verze dokumentace <application>MEncoder</application>u a mnoho zpráv
|
|
1453 v archivu konference hovoří o 59.94, 29.97 a 23.976.
|
|
1454 Všechna dokumentace <application>MEncoder</application>u byla aktualizována
|
|
1455 a používá zlomkových hodnot. Vy byste je měli používat také.
|
|
1456 </para>
|
|
1457
|
|
1458 <para>
|
|
1459 <option>-ofps 23.976</option> je nesprávně.
|
|
1460 Místo toho byste měli použít <option>-ofps 24000/1001</option>.
|
|
1461 </para>
|
|
1462
|
|
1463 <formalpara>
|
|
1464 <title>Jak je používáno telecine.</title>
|
|
1465 <para>
|
|
1466 Veškeré video určené k zobrazení na NTSC televizi musí mít 60000/1001
|
|
1467 půlsnímků za sekundu. Filmy vyráběné pro televizi jsou často natáčeny přímo
|
|
1468 ve 60000/1001 půlsnímcích za sekundu, ale většina filmů do kin je natáčena při
|
|
1469 24 nebo 24000/1001 snímcích za sekundu. Když je film přepisován na DVD, je
|
|
1470 video upraveno pro televizi v procesu zvaném telecine.
|
|
1471 </para></formalpara>
|
|
1472
|
|
1473 <para>
|
|
1474 Na DVD není video ve skutečnosti nikdy uloženo v 60000/1001 půlsnímcích za
|
|
1475 sekundu. Video jež bylo původně 60000/1001, bude mít každý pár půlsnímků
|
|
1476 zkombinován do podoby snímku s rychlostí 30000/1001 snímků za sekundu.
|
|
1477 Hardwarové DVD přehrávače pak čtou příznak, zabudovaný ve video proudu, který
|
|
1478 udává jestli první půlsnímek tvoří liché nebo sudé řádky.
|
|
1479 </para>
|
|
1480
|
|
1481 <para>
|
|
1482 Obsah ve 24000/1001 snímcích za sekundu obvykle zůstává tak jak byl v době
|
|
1483 přepisu na DVD a DVD přehrávač musí provést telecine za letu. Někdy je však
|
|
1484 video telecinováno <emphasis>před</emphasis> uložením na DVD; dokonce i když
|
|
1485 mělo původně 24000/1001 snímků za sekundu, bude mít 60000/1001 půlsnímků za
|
|
1486 sekundu. Pokud je uložen na DVD, páry půlsnímků jsou zkombinovány do formy
|
|
1487 30000/1001 snímků za sekundu.
|
|
1488 </para>
|
|
1489
|
|
1490 <para>
|
|
1491 Když se podíváme na jednotlivé snímky vzniklé z videa o 60000/10001 půlsnímcích
|
|
1492 za sekundu, telecinovaného nebo ne, je zřetelně vidět toto prokládání jakmile
|
|
1493 je zde nějaký pohyb, jelikož jeden půlsnímek (řekněme liché řádky)
|
|
1494 reprezentuje časový okamžik o 1/(60000/1001) sekundy pozdější než ten druhý.
|
|
1495 Přehrávání prokládaného videa na počítači vypadá škaredě jak proto, že monitor
|
|
1496 má vyšší rozlišení, ale i protože video je zobrazováno snímek po snímku místo
|
|
1497 půlsnímek po půlsnímku.
|
|
1498 </para>
|
|
1499
|
|
1500 <itemizedlist>
|
|
1501 <title>Poznámky:</title>
|
|
1502 <listitem><para>
|
|
1503 Tento odstavec platí pouze pro NTSC DVD, nikoli PAL.
|
|
1504 </para></listitem>
|
|
1505 <listitem><para>
|
|
1506 Řádky s příklady spuštění <application>MEncoder</application>u v dokumentu
|
|
1507 <emphasis role="bold">nejsou</emphasis> určeny pro opravdové použití.
|
|
1508 Obsahují pouze nutné minimum vyžadované pro enkódování příslušné ke kategorii
|
|
1509 videa. Jak dělat dobré DVD ripy nebo doladit
|
|
1510 <systemitem class="library">libavcodec</systemitem> pro maximální kvalitu
|
|
1511 není v záběru tohoto dokumentu.
|
|
1512 </para></listitem>
|
|
1513 <listitem><para>
|
|
1514 Poznámky pod čarou příslušné pro tuto příručku jsou linkovány takto:
|
|
1515 <link linkend="menc-feat-telecine-footnotes">[1]</link>
|
|
1516 </para></listitem>
|
|
1517 </itemizedlist>
|
|
1518 </sect2>
|
|
1519
|
|
1520 <sect2 id="menc-feat-telecine-ident">
|
|
1521 <title>Jak zjistit o jaký typ videa se jedná</title>
|
|
1522
|
|
1523 <sect3 id="menc-feat-telecine-ident-progressive">
|
|
1524 <title>Progresivní (neprokládané)</title>
|
|
1525 <para>
|
|
1526 Progresivní video je původně natočeno při 24000/1001 snímcích za sekundu a
|
|
1527 uloženo na DVD beze změn.
|
|
1528 </para>
|
|
1529
|
|
1530 <para>
|
|
1531 Když přehrajete progresivní DVD v <application>MPlayer</application>u,
|
|
1532 <application>MPlayer</application> vypíše následující řádek jakmile začne
|
|
1533 přehrávat:
|
|
1534
|
|
1535 <screen> demux_mpg: 24000/1001 fps progressive NTSC content detected, switching framerate.</screen>
|
|
1536
|
|
1537 Od tohoto okamžiku by demux_mpg neměl nikdy říct že našel
|
|
1538 "30000/1001 fps NTSC obsah."
|
|
1539 </para>
|
|
1540
|
|
1541 <para>
|
|
1542 Když sledujete progresivní video, neměli byste nikdy vidět žádný proklad.
|
|
1543 Dejte si ale pozor, jelikož je občas trošku telecine namixováno tam, kde byste
|
|
1544 to vůbec nečekali. Setkal jsem se s TV show na DVD, které měly sekundu
|
|
1545 telecine při každé změně scény nebo na zcela náhodných místech. Jednou jsem se
|
|
1546 díval na DVD, které bylo do půlky progresivní a od půlky telecinováno. Pokud
|
|
1547 chcete být <emphasis>opravdu</emphasis> důkladní, můžete oskenovat celý film:
|
|
1548
|
|
1549 <screen>mplayer dvd://1 -nosound -vo null -benchmark</screen>
|
|
1550
|
|
1551 Použití volby <option>-benchmark</option> nechá
|
|
1552 <application>MPlayer</application> přehrát film tak rychle, jak je to jen
|
|
1553 možné; stejně to ale, v závislosti na vašem stroji, chvíli potrvá.
|
|
1554 Vždy, když demux_mpg ohlásí změnu snímkové rychlosti, řádek těsně nad hlášením
|
|
1555 ukáže čas ve kterém ke změně došlo.
|
|
1556 </para>
|
|
1557
|
|
1558 <para>
|
|
1559 Občas je progresivní video na DVD označeno jako
|
|
1560 "soft-telecine" protože je zamýšleno, aby telecine provedl DVD
|
|
1561 přehrávač.
|
|
1562 </para>
|
|
1563 </sect3>
|
|
1564
|
|
1565 <sect3 id="menc-feat-telecine-ident-telecined">
|
|
1566 <title>Telecinováno (přepsáno pro NTSC televizi)</title>
|
|
1567 <para>
|
|
1568 Telecinované video bylo původně natočeno při 24000/1001, ale bylo telecinováno
|
|
1569 <emphasis>před</emphasis> zápisem na DVD.
|
|
1570 </para>
|
|
1571
|
|
1572 <para>
|
|
1573 <application>MPlayer</application> (nikdy) nehlásí žádnou změnu snímkové
|
|
1574 rychlosti, když přehrává telecinované video.
|
|
1575 </para>
|
|
1576
|
|
1577 <para>
|
|
1578 Při sledování telecinovaného videa uvidíte prokladové artefakty, které jako by
|
|
1579 "blikaly": opakovaně mizí a objevují se.
|
|
1580 Blíže se na to můžete podívat:
|
|
1581 <orderedlist>
|
|
1582 <listitem>
|
|
1583 <screen>mplayer dvd://1</screen>
|
|
1584 </listitem>
|
|
1585 <listitem><para>
|
|
1586 Převiňte na část s pohybem.
|
|
1587 </para></listitem>
|
|
1588 <listitem><para>
|
|
1589 Použijte klávesu <keycap>.</keycap> pro krokování po jednom snímku.
|
|
1590 </para></listitem>
|
|
1591 <listitem><para>
|
|
1592 Sledujte vzor prokládaně vypadajících a progresivně vypadajících snímků.
|
|
1593 Pokud je vzor, který sledujete PPPII,PPPII,PPPII,..., pak je video
|
|
1594 telecinováno. Pokud vidíte jiný vzor, pak mohlo být video telecinováno
|
|
1595 použitím nějaké nestandardní metody; <application>MEncoder</application>
|
|
1596 neumí bezztrátově převést nestandardní telecine do progresivního. Pokud
|
|
1597 nevidíte žádný vzor, pak je video nejspíš prokládané.
|
|
1598 </para></listitem>
|
|
1599 </orderedlist>
|
|
1600 </para>
|
|
1601
|
|
1602 <para>
|
|
1603 Někdy je telecinované video na DVD označeno jako "hard-telecine".
|
|
1604 Jelikož hard-telecine již je ve 60000/1001 půlsnímcích za sekundu, DVD
|
|
1605 přehrávač přehraje video bez jakýchkoli manipulací.
|
|
1606 </para>
|
|
1607
|
|
1608 <para>
|
|
1609 Dalším způsobem jak zjistíte, že je váš zdroj telecinován, je přehrát
|
|
1610 jej s volbami <option>-vf pullup</option> a <option>-v</option> a
|
|
1611 uvidíte, jak <option>pullup</option> nachází vzor.
|
|
1612 Pokud je zdroj telecinován, mělibyste vidět na konzoli vzor 3:2 s opakujícím
|
|
1613 se <systemitem>0+.1.+2</systemitem> a <systemitem>0++1</systemitem>.
|
|
1614 Tato technika má tu výhodu, že nemusíte sledovat zdroj, abyste jej
|
|
1615 identifikovali, což se může hodit, pokud chcete automatizovat enkódovací
|
|
1616 proceduru, nebo ji provést vzdáleně přes pomalou linku.
|
|
1617 </para>
|
|
1618
|
|
1619 </sect3>
|
|
1620
|
|
1621 <sect3 id="menc-feat-telecine-ident-interlaced">
|
|
1622 <title>Prokládané</title>
|
|
1623 <para>
|
|
1624 Prokládané video bylo od samého začátku filmováno při 60000/1001 půlsnímcích
|
|
1625 za sekundu a uloženo na DVD ve 30000/1001 snímcích za sekundu. Efekt
|
|
1626 prokládání (často označovaný jako "roztřepení") je výsledkem
|
|
1627 skládání půlsnímků do snímků. Vzdálenost mezi půlsnímky má být 1/(60000/1001)
|
|
1628 sekundy a proto když jsou zobrazeny současně, je rozdíl jasně patrný.
|
|
1629 </para>
|
|
1630
|
|
1631 <para>
|
|
1632 Stejně jako u telecinovaného videa by <application>MPlayer</application> neměl
|
|
1633 hlásit jakékoli změny snímkové rychlosti při přehrávání prokládaného obsahu.
|
|
1634 </para>
|
|
1635
|
|
1636 <para>
|
|
1637 Když si prohlédnete video blíže pomocí krokování snímků pomocí klávesy
|
|
1638 <keycap>.</keycap>, uvidíte, že každý jednotlivý snímek je prokládaný.
|
|
1639 </para>
|
|
1640 </sect3>
|
|
1641
|
|
1642 <sect3 id="menc-feat-telecine-ident-mixedpt">
|
|
1643 <title>Smíšené progresivní a telecinované</title>
|
|
1644 <para>
|
|
1645 Veškerý obsah "smíšeného progresivního a telecinovaného" videa měl
|
|
1646 původně 24000/1001 snímků za sekundu, ale některé části prošly telecine.
|
|
1647 </para>
|
|
1648
|
|
1649 <para>
|
|
1650 Když <application>MPlayer</application> přehrává tuto kategorii, bude (často
|
|
1651 i opakovaně) přepínat mezi "30000/1001 snímky/s NTSC"
|
|
1652 a "24000/1001 snímky/s progresivním NTSC". Sledujte spodek
|
|
1653 <application>MPlayer</application>ova výstupu, abyste zachytili tyto zprávy.
|
|
1654 </para>
|
|
1655
|
|
1656 <para>
|
|
1657 Měli byste prověřit části se "30000/1001 snímky/s NTSC", abyste měli
|
|
1658 jistotu, že jsou skutečně telecinovány a ne jen prokládané.
|
|
1659 </para>
|
|
1660 </sect3>
|
|
1661
|
|
1662 <sect3 id="menc-feat-telecine-ident-mixedpi">
|
|
1663 <title>Smíšené progresivní a prokládané</title>
|
|
1664 <para>
|
|
1665 Ve "smíšeném progresivním a prokládaném" obsahu bylo progresivní a
|
|
1666 prokládané video splácáno dohromady.
|
|
1667 </para>
|
|
1668
|
|
1669 <para>
|
|
1670 Tato kategorie vypadá jako "smíšené progresivní a telecine",
|
|
1671 dokud si neprohlédnete části se 30000/1001 snímky/s a neuvidíte, že nemají
|
|
1672 telecine vzor.
|
|
1673 </para>
|
|
1674 </sect3>
|
|
1675
|
|
1676 </sect2>
|
|
1677
|
|
1678 <sect2 id="menc-feat-telecine-encode">
|
|
1679 <title>Jak enkódovat jednotlivé kategorie</title>
|
|
1680 <para>
|
|
1681 Jak jsem se zmínil na začátku, příklady příkazových řádků
|
|
1682 <application>MEncoder</application>u níže <emphasis role="bold">nejsou</emphasis>
|
|
1683 určeny pro praktické použití; pouze demonstrují, minimum voleb nutných k tomu,
|
|
1684 abyste správně enkódovali každou kategorii.
|
|
1685 </para>
|
|
1686
|
|
1687 <sect3 id="menc-feat-telecine-encode-progressive">
|
|
1688 <title>Progresivní</title>
|
|
1689 <para>
|
|
1690 Progresivní video nevyžaduje žádné speciální filtrování pro enkódování.
|
|
1691 Jediná volba, která by určitě neměla chybět je
|
|
1692 <option>-ofps 24000/1001</option>. Jinak se <application>MEncoder</application>
|
|
1693 pokusí enkódovat při 30000/1001 snímcích/s a bude opakovat snímky.
|
|
1694 </para>
|
|
1695
|
|
1696 <para>
|
|
1697 <screen>mencoder dvd://1 -nosound -ovc lavc -ofps 24000/1001</screen>
|
|
1698 </para>
|
|
1699
|
|
1700 <para>
|
|
1701 Často se stává, že video, které vypadá progresivně, má v sobě zamíchány
|
|
1702 kratičké telecinované části. Pokud si nejste jisti, je nejbezpečnější
|
|
1703 považovat video za
|
|
1704 <link linkend="menc-feat-telecine-encode-mixedpt">smíšené progresivní a
|
|
1705 telecinované</link>. Ztráta výkonu je jen malá
|
|
1706 <link linkend="menc-feat-telecine-footnotes">[3]</link>.
|
|
1707 </para>
|
|
1708 </sect3>
|
|
1709
|
|
1710 <sect3 id="menc-feat-telecine-encode-telecined">
|
|
1711 <title>Telecinované</title>
|
|
1712 <para>
|
|
1713 Telecine lze obrátit a dostat tak původní 24000/1001 obsah, za použití metody
|
|
1714 zvané inverzní telecine.
|
|
1715 <application>MPlayer</application> má několik filtrů právě pro tuto činnost;
|
|
1716 nejlepší z těchto filtrů, <option>pullup</option>, je popsán v části
|
|
1717 <link linkend="menc-feat-telecine-encode-mixedpt">smíšené progresivní a
|
|
1718 telecinované</link>.
|
|
1719 </para>
|
|
1720 </sect3>
|
|
1721
|
|
1722 <sect3 id="menc-feat-telecine-encode-interlaced">
|
|
1723 <title>Prokládané</title>
|
|
1724 <para>
|
|
1725 V praxi není většinou možné dostat kompletní progresivní video z prokládaného
|
|
1726 obsahu. Jediný způsob jak to udělat bez ztráty poloviny svislého rozlišení je
|
|
1727 zdvojením snímkové rychlosti a zkusit "odhadnout" co mám provést
|
|
1728 s odpovídajícími linkami každého z půlsnímků (má to ovšem i nevýhody –
|
|
1729 viz metoda 3).
|
|
1730 </para>
|
|
1731
|
|
1732 <orderedlist>
|
|
1733 <listitem><para>
|
|
1734 Enkódujte video v prokládané formě. Obvykle prokládání způsobí těžkou újmu
|
|
1735 schopnosti enkodéru dobře komprimovat, ale
|
|
1736 <systemitem class="library">libavcodec</systemitem> má dvě volby určené právě
|
|
1737 pro lepší ukládání prokládaného videa: <option> ildct</option> a
|
|
1738 <option>ilme</option>. Rovněž velmi doporučujeme použití volby
|
|
1739 <option>mbd=2</option> <link linkend="menc-feat-telecine-footnotes">[2] </link>
|
|
1740 protože bude enkódovat makrobloky jako neprokládané tam, kde není žádný pohyb.
|
|
1741 Volba <option>-ofps</option> zde <emphasis role="bold">není</emphasis> nutná.
|
|
1742
|
|
1743 <screen>mencoder dvd://1 -nosound -ovc lavc -lavcopts ildct:ilme:mbd=2</screen>
|
|
1744 </para></listitem>
|
|
1745 <listitem><para>
|
|
1746 Použijte filtr odstraňující proklad před enkódováním. Je jich zde několik,
|
|
1747 můžete si vybrat. Každý z nich má svá pro i proti. Prohlédněte si výstup
|
|
1748 <option>mplayer -pphelp</option> abyste zjistili, které jsou k dispozici
|
|
1749 (grep pro "deint") a vyhledejte
|
|
1750 <ulink url="http://www.mplayerhq.hu/homepage/design6/info.html#mailing_lists">
|
|
1751 e-mailové konference MPlayeru</ulink>, kde naleznete mnoho diskusí o různých
|
|
1752 filtrech. Snímková rychlost se ani zde nemění, takže žádné
|
|
1753 <option>-ofps</option>. Odstranění proklady by rovněž mělo být provedeno po
|
|
1754 ořezání <link linkend="menc-feat-telecine-footnotes">[1]</link>, ale před
|
|
1755 škálováním.
|
|
1756
|
|
1757 <screen>mencoder dvd://1 -nosound -vf pp=lb -ovc lavc</screen>
|
|
1758 </para></listitem>
|
|
1759 <listitem><para>
|
|
1760 Naneštěstí je tato volba vadná v <application>MEncoder</application>u;
|
|
1761 měla by dobře pracovat v <application>MEncoder G2</application>, ale ten tu
|
|
1762 zatím není. Stejně je určením <option> -vf tfields</option> vytvoření
|
|
1763 kompletního snímku z každého půlsnímku, což zvýší snímkovou rychlost na
|
|
1764 60000/1001. Výhoda tohoto přístupu je v tom, že nepřijdete o žádná data;
|
|
1765 Protože však každý snímek pochází jen z jediného půlsnímku, musí být chybějící
|
|
1766 linky nějak dopočítány. Neexistuje mnoho dobrých metod, generujících chybějící
|
|
1767 data, takže výsledek bude trochu podobný tomu, když se použije některý filtr
|
|
1768 odstraňující proklad.
|
|
1769 Generováním chybějících linek vznikají další problémy tím, že se zdvojnásobí
|
|
1770 množství dat. Takže jsou potřeba vyšší datové toky pro enkódování, aby byla
|
|
1771 zachována kvalita a spotřebuje se více výkonu CPU jak pro enkódování, tak pro
|
|
1772 dekódování. tfields má několik různých voleb pro volbu způsobu generování
|
|
1773 chybějících linek. Pokud použijete tuto možnost, prostudujte si manuál a
|
|
1774 zvolte si volbu, která s vaším materiálem vypadá nejlépe.
|
|
1775 Poznamenejme, že při použití <option>tfields</option>
|
|
1776 <emphasis role="bold">musíte</emphasis> nastavit <option>-fps</option> a
|
|
1777 <option>-ofps</option> na dvojnásobek snímkové rychlosti originálu.
|
|
1778
|
|
1779 <screen>mencoder dvd://1 -nosound -vf tfields=2 -ovc lavc -fps 60000/1001 -ofps 60000/1001</screen>
|
|
1780 </para></listitem>
|
|
1781 <listitem><para>
|
|
1782 Pokud plánujete výrazné zmenšování, můžete extrahovat a enkódovat jen jeden
|
|
1783 z půlsnímků. Samozřejmě přijdete o polovinu svislého rozlišení, ale pokud
|
|
1784 plánujete zmenšení ideálně na 1/2 originální velikosti, nebude na této ztrátě
|
|
1785 vůbec záležet. Výsledek bude progresivní soubor s 30000/1001 snímky za sekundu.
|
|
1786 Celý postup spočívá v použití <option>-vf field</option> a následném ořezu
|
|
1787 <link linkend="menc-feat-telecine-footnotes">[1]</link> a příslušném
|
|
1788 škálování. Pamatujte, že musíte nastavit scale tak, aby kompenzoval
|
|
1789 zmenšení svislého rozměru na polovinu.
|
|
1790 <screen>mencoder dvd://1 -nosound -vf field=0 -ovc lavc</screen>
|
|
1791 </para></listitem>
|
|
1792 </orderedlist>
|
|
1793 </sect3>
|
|
1794
|
|
1795 <sect3 id="menc-feat-telecine-encode-mixedpt">
|
|
1796 <title>Smíšené progresivní a telecinované</title>
|
|
1797 <para>
|
|
1798 Abychom převedli smíšené progresivní a telecinované video zcela na progresivní
|
|
1799 video, musí být telecinované části inverzně telecinovány. K tomu lze dospět
|
|
1800 třemi postupy popsanými níže.Poznamenejme, že byste měli
|
|
1801 <emphasis role="bold">vždy</emphasis> provést inverzní telecine před
|
|
1802 jakýmkoliv škálováním; a v případě, že přesně nevíte co děláte, také před
|
|
1803 ořezáním <link linkend="menc-feat-telecine-footnotes">[1]</link>.
|
|
1804 Volba <option>-ofps 24000/1001</option> je vyžadována, protože výstupní video
|
|
1805 bude mít 24000/1001 snímků za sekundu.
|
|
1806 </para>
|
|
1807
|
|
1808 <itemizedlist>
|
|
1809 <listitem><para>
|
|
1810 <option>-vf pullup</option> je navržen tak, aby inverzně telecinoval, ale
|
|
1811 progresivní data nechával jak jsou. Pro správnou funkci
|
|
1812 <emphasis role="bold">musí</emphasis> být <option>pullup</option> následován
|
|
1813 filtrem <option>softskip</option>, jinak <application>MEncoder</application>
|
|
1814 zhavaruje. <option>pullup</option> je však nejčistší a nejpřesnější dostupnou
|
|
1815 metodou pro enkódování jak telecinovaného, tak "smíšeného progresivního a
|
|
1816 telecinovaného".
|
|
1817
|
|
1818 <screen>mencoder dvd://1 -nosound -vf pullup,softskip -ovc lavc -ofps 24000/1001</screen>
|
|
1819 </para>
|
|
1820
|
|
1821
|
|
1822 </listitem>
|
|
1823 <listitem><para>
|
|
1824 Starší metodou je, spíše než inverzně telecinovat telecinované části,
|
|
1825 telecinovat progresivní části a poté inverzně telecinovat celé video.
|
|
1826 Zní to zmateně? softpulldown je filtr, který projde celé video a převede celý
|
|
1827 soubor na telecinovaný. Pokud budeme následovat softpulldown buď
|
|
1828 <option>detc</option> nebo <option>ivtc</option>, bude konečný výsledek zcela
|
|
1829 progresivní. Nutná je volba <option>-ofps 24000/1001</option>.
|
|
1830
|
|
1831 <screen>mencoder dvd://1 -nosound -vf softpulldown,ivtc=1 -ovc lavc -ofps 24000/1001</screen>
|
|
1832 </para>
|
|
1833 </listitem>
|
|
1834
|
|
1835 <listitem><para>
|
|
1836 Osobně jsem nepoužil <option>-vf filmdint</option>, ale toto o něm (přibližně)
|
|
1837 řekl D Richard Felker III:
|
|
1838
|
|
1839 <blockquote><para>Je to OK, ale IMO to zkouší až příliš často odstraňovat
|
|
1840 proklad místo provádění inverzního telecine (stejně jako settop DVD
|
|
1841 přehrávače & progresivní televize) což vede ke škaredému třepotání a
|
|
1842 dalším artefaktům. Pokud jej chcete používat, měli byste předtím alespoň
|
|
1843 trochu času věnovat ladění voleb a sledováním výstupu, abyste měli jistotu,
|
|
1844 že vám to něco nekazí.</para></blockquote>
|
|
1845 </para></listitem>
|
|
1846 </itemizedlist>
|
|
1847 </sect3>
|
|
1848
|
|
1849 <sect3 id="menc-feat-telecine-encode-mixedpi">
|
|
1850 <title>Smíšené progresivní a prokládané</title>
|
|
1851 <para>
|
|
1852 Máme dvě volby pro práci s touto kategorií, obě jsou však kompromisem. Měli
|
|
1853 byste se rozhodnout podle trvání/umístění každého typu.
|
|
1854 </para>
|
|
1855
|
|
1856 <itemizedlist>
|
|
1857 <listitem><para>
|
|
1858 Považujte to za progresivní. Prokládané části budou vypadat prokládaně a
|
|
1859 některé z prokládaných políček bude muset být zahozeno, což povede
|
|
1860 k nestejnoměrnému poskakování. Můžete proti tomu nasadit postprocesní filtr,
|
|
1861 pokud chcete, ale tím mírně degradujete progresivní části.
|
|
1862 </para>
|
|
1863
|
|
1864 <para>
|
|
1865 Této volbě byste se měli rozhodně vyhnout, pokud chcete nakonec zobrazovat
|
|
1866 video na zobrazovači s prokládaným obrazem (přes TV kartu například).
|
|
1867 Pokud máte prokládané snímky ve videu s rychlostí 24000/1001 snímků za
|
|
1868 sekundu, budou telecinovány spolu s progresivními snímky. Polovina
|
|
1869 prokládaných "snímků" bude zobrazena po dobu trvání třech snímků
|
|
1870 (3/(60000/1001) sekund), což povede k poskakování. Efekt
|
|
1871 "cukání zpět" vypadá skutečně zle. Pokud se o to přece pokusíte,
|
|
1872 <emphasis role="bold">musíte</emphasis> použít filtr odstraňující proklad,
|
|
1873 jako je <option>lb</option> nebo <option>l5</option>.
|
|
1874 </para>
|
|
1875
|
|
1876 <para>
|
|
1877 Špatnou volbou je to i pro progresivní zobrazovač. Ten zahodí páry po sobě
|
|
1878 jdoucích snímků, což povede k přerušování, které může být více viditelné, než
|
|
1879 při druhé metodě, která zobrazuje některé progresivní snímky dvakrát.
|
|
1880 Prokládané video se 30000/1001 snímky za sekundu je totiž poněkud trhané,
|
|
1881 protože by ve skutečnosti mělo být promítáno při 60000/1001 půlsnímcích za
|
|
1882 sekundu, takže zdvojení některých snímků není tak moc vidět.
|
|
1883 </para>
|
|
1884
|
|
1885 <para>
|
|
1886 V každém případě je nejlepší posoudit obsah a způsob, jakým bude zobrazován.
|
|
1887 Pokud je vaše video z 90% progresivní a nikdy jej nebudete pouštět na
|
|
1888 televizi, měli byste volit progresivní přístup.
|
|
1889 Pokud je progresívní jen z poloviny, pravděpodobně jej bude lepší enkódovat
|
|
1890 jako by bylo celé prokládané.
|
|
1891 </para>
|
|
1892 </listitem>
|
|
1893
|
|
1894 <listitem><para>
|
|
1895 Pokládat jej za prokládané. Některé snímky v progresivních částech budou muset
|
|
1896 být duplikovány, což povede k nepravidelnému poskakování. Opět platí, že
|
|
1897 filtry pro odstranění prokladu mohou poněkud degradovat progresivní části.
|
|
1898 </para></listitem>
|
|
1899
|
|
1900 </itemizedlist>
|
|
1901 </sect3>
|
|
1902
|
|
1903 </sect2>
|
|
1904
|
|
1905 <sect2 id="menc-feat-telecine-footnotes">
|
|
1906 <title>Poznámky pod čarou</title>
|
|
1907 <orderedlist>
|
|
1908 <listitem><formalpara>
|
|
1909 <title>K ořezu:</title>
|
|
1910 <para>
|
|
1911 Video data na DVD jsou ukládána ve formátu zvaném YUV 4:2:0. V YUV videu jsou,
|
|
1912 jasová ("černobílá"; angl. luma) a barvonosná (angl. chroma) složka
|
|
1913 ukládány odděleně. Protože je lidské oko méně citlivé na změnu barvy, než na
|
|
1914 jas, připadá v YUV 4:2:0 obrázku pouze jeden barvonosný pixel na každé čtyři
|
|
1915 jasové pixely. V progresivním obrázku má každý čtverec 2x2 jasových pixelů
|
|
1916 právě jeden barvonosný pixel. Proto musíte ořezávat progresivní YUV 4:2:0
|
|
1917 na sudé rozměry a používat sudé odsazení (offsety). Například
|
|
1918 <option>crop=716:380:2:26</option> je OK, ale
|
|
1919 <option>crop=716:380:3:26 </option> není.
|
|
1920 </para>
|
|
1921 </formalpara>
|
|
1922
|
|
1923 <para>
|
|
1924 Když máte co do činění s prokládaným YUV 4:2:0, je situace mnohem
|
|
1925 komplikovanější. Místo každých čtyřech pixelů ve <emphasis>snímku</emphasis>
|
|
1926 sdílejících barvonosný pixel, každé čtyři jasové pixely v každém
|
|
1927 <emphasis>půlsnímku</emphasis> sdílejí barvonosný pixel. Když jsou půlsnímky
|
|
1928 proloženy do snímku, každá linka má výšku jeden pixel. A nyní místo aby dané
|
|
1929 čtyři pixely tvořily čtverec, jsou první dva vedle sebe a druhé dva jsou vedle
|
|
1930 sebe o dvě linky níž. Dva pixely těsně pod nimi patří do jiného půlsnímku a
|
|
1931 proto sdílí jiný barvonosný pixel se dvěma jasovými pixely o dva řádky níž.
|
|
1932 Všechno tohle nás nutí mít svislé rozměry ořezání a odsazení bezezbytku
|
|
1933 dělitelné čtyřmi. Vodorovné stačí když budou sudé.
|
|
1934 </para>
|
|
1935
|
|
1936 <para>
|
|
1937 Pro telecinované video doporučuji, abyste ořezání prováděli až po inverzi
|
|
1938 telecine. Jakmile je video progresivní, stačí řezat jen na sudé rozměry.
|
|
1939 Pokud si však přece jen chcete dopřát mírné zrychlení, které může poskytnout
|
|
1940 časný ořez, musíte svisle dodržet násobky čtyřech, jinak nebude mít filtr
|
|
1941 pro inverzi telecine správná data.
|
|
1942 </para>
|
|
1943
|
|
1944 <para>
|
|
1945 Prokládané (nikoli telecinované) video musíte vždy ořezávat svisle násobky
|
|
1946 čtyř, pokud před ořezáním nepoužijete <option>-vf field</option>.
|
|
1947 </para>
|
|
1948 </listitem>
|
|
1949
|
|
1950 <listitem><formalpara>
|
|
1951 <title>K volbám pro enkódování a kvalitě:</title>
|
|
1952 <para>
|
|
1953 Jen proto, že doporučuji <option>mbd=2</option> zde neznamená, že by tato
|
|
1954 volba nemohla být použita jinde. V kombinaci s <option>trell</option>, je
|
|
1955 <option>mbd=2</option> jednou ze dvou voleb
|
|
1956 <systemitem class="library">libavcodec</systemitem>u, které nejvíce zvyšují
|
|
1957 kvalitu a vy byste měli vždy použít alespoň tyto dvě, pokud není na škodu
|
|
1958 zpomalení rychlosti enkódování (např. při enkódování v reálném čase).
|
|
1959 Mnoho dalších voleb <systemitem class="library">libavcodec</systemitem>u
|
|
1960 zvyšuje kvalitu enkódování (a snižuje jeho rychlost), ale to je mimo zaměření
|
|
1961 tohoto textu.
|
|
1962 </para>
|
|
1963 </formalpara>
|
|
1964 </listitem>
|
|
1965
|
|
1966 <listitem><formalpara>
|
|
1967 <title>K výkonu filtru pullup:</title>
|
|
1968 <para>
|
|
1969 Použití <option>pullup</option> je bezpečné (spolu se <option>softskip
|
|
1970 </option>) na progresivní video a je to obvykle dobrá volba, pokud nebyl zdroj
|
|
1971 prověřen, že je celý progresivní. Ve většině případů je ztráta výkonu malá.
|
|
1972 V ojedinělých případech enkódování způsobí <option>pullup</option>, že je
|
|
1973 <application>MEncoder</application> o 50% pomalejší. Přidání zpracování zvuku
|
|
1974 a pokročilých <option>lavcopts</option> zastíní tento rozdíl tak, že rozdíl
|
|
1975 v rychlosti působený použitím <option>pullup</option> se sníží na 2%.
|
|
1976 </para>
|
|
1977 </formalpara>
|
|
1978 </listitem>
|
|
1979
|
|
1980 </orderedlist>
|
|
1981
|
|
1982 </sect2>
|
|
1983
|
|
1984 </sect1>
|
|
1985
|
|
1986
|
|
1987 <sect1 id="menc-feat-enc-libavcodec">
|
|
1988 <title>Enkódování s rodinou kodeků <systemitem class="library">libavcodec</systemitem>
|
|
1989 </title>
|
|
1990
|
|
1991 <para>
|
|
1992 <link linkend="ffmpeg"><systemitem class="library">libavcodec</systemitem></link>
|
|
1993 zajišťuje jednoduché enkódování do mnoha zajímavých video a audio formátů.
|
|
1994 Můžete enkódovat do následujících kodeků (více méně aktuální):
|
|
1995
|
|
1996 <informaltable frame="all">
|
|
1997 <tgroup cols="2">
|
|
1998 <thead>
|
|
1999 <row><entry>Jméno kodeku</entry><entry>Popis</entry></row>
|
|
2000 </thead>
|
|
2001 <tbody>
|
|
2002 <row><entry>mjpeg</entry><entry>
|
|
2003 Motion JPEG
|
|
2004 </entry></row>
|
|
2005 <row><entry>ljpeg</entry><entry>
|
|
2006 Lossless (bezztrátový) JPEG
|
|
2007 </entry></row>
|
|
2008 <row><entry>h261</entry><entry>
|
|
2009 H.261
|
|
2010 </entry></row>
|
|
2011 <row><entry>h263</entry><entry>
|
|
2012 H.263
|
|
2013 </entry></row>
|
|
2014 <row><entry>h263p</entry><entry>
|
|
2015 H.263+
|
|
2016 </entry></row>
|
|
2017 <row><entry>mpeg4</entry><entry>
|
|
2018 standardní ISO MPEG-4 (DivX 5, XVID kompatibilní)
|
|
2019 </entry></row>
|
|
2020 <row><entry>msmpeg4</entry><entry>
|
|
2021 prvotní MPEG-4 varianta od MS, v3 (DivX3)
|
|
2022 </entry></row>
|
|
2023 <row><entry>msmpeg4v2</entry><entry>
|
|
2024 prvotní MPEG-4 od MS, v2 (použitý ve starých asf souborech)
|
|
2025 </entry></row>
|
|
2026 <row><entry>wmv1</entry><entry>
|
|
2027 Windows Media Video, verze 1 (WMV7)
|
|
2028 </entry></row>
|
|
2029 <row><entry>wmv2</entry><entry>
|
|
2030 Windows Media Video, verze 2 (WMV8)
|
|
2031 </entry></row>
|
|
2032 <row><entry>rv10</entry><entry>
|
|
2033 starý RealVideo kodek
|
|
2034 </entry></row>
|
|
2035 <row><entry>mpeg1video</entry><entry>
|
|
2036 MPEG-1 video
|
|
2037 </entry></row>
|
|
2038 <row><entry>mpeg2video</entry><entry>
|
|
2039 MPEG-2 video
|
|
2040 </entry></row>
|
|
2041 <row><entry>huffyuv</entry><entry>
|
|
2042 bezztrátová komprese
|
|
2043 </entry></row>
|
|
2044 <row><entry>asv1</entry><entry>
|
|
2045 ASUS Video v1
|
|
2046 </entry></row>
|
|
2047 <row><entry>asv2</entry><entry>
|
|
2048 ASUS Video v2
|
|
2049 </entry></row>
|
|
2050 <row><entry>ffv1</entry><entry>
|
|
2051 bezztrátový video kodek z FFmpeg
|
|
2052 </entry></row>
|
|
2053 <row><entry>flv</entry><entry>
|
|
2054 Sorenson H.263 používaný ve Flash Video
|
|
2055 </entry></row>
|
|
2056 <row><entry>dvvideo</entry><entry>
|
|
2057 Sony Digital Video
|
|
2058 </entry></row>
|
|
2059 <row><entry>snow</entry><entry>
|
|
2060 Experimentální vlnkově orientovaný kodek z FFmpeg
|
|
2061 </entry></row>
|
|
2062 </tbody>
|
|
2063 </tgroup>
|
|
2064 </informaltable>
|
|
2065
|
|
2066 První pole obsahuje názvy kodeků, které můžete přiřadit konfiguračnímu parametru
|
|
2067 <literal>vcodec</literal>, např: <option>-lavcopts vcodec=msmpeg4</option>
|
|
2068 </para>
|
|
2069
|
|
2070 <informalexample>
|
|
2071 <para>
|
|
2072 Příklad, s MJPEG kompresí:
|
|
2073 <screen>mencoder dvd://2 -o titul2.avi -ovc lavc -lavcopts vcodec=mjpeg -oac copy</screen>
|
|
2074 </para>
|
|
2075 </informalexample>
|
|
2076
|
|
2077 <sect2 id="menc-feat-dvd-mpeg4-lavc-encoding-options">
|
|
2078 <title>Enkódovací volby libavcodecu</title>
|
|
2079
|
|
2080 <para>
|
|
2081 V ideálním případě byste asi chtěli jen říct enkodéru, aby se přepnul do
|
|
2082 režimu "vysoká kvalita" a šel na to.
|
|
2083 To by bylo jistě hezké, ale naneštěstí je to těžké zavést, jelikož různé
|
|
2084 volby enkódování vedou k různé kvalitě v závislosti na zdrojovém materiálu.
|
|
2085 To proto, že komprese závisí na vizuálních vlastnostech daného videa.
|
|
2086 Například anime a živá akce mají zcela rozdílné vlastnosti a tedy vyžadují
|
|
2087 odlišné volby pro dosažení optimálního enkódování.
|
|
2088 Dobrá zpráva je, že některé volby by nikdy neměly chybět, jako
|
|
2089 <option>mbd=2</option>, <option>trell</option> a <option>v4mv</option>.
|
|
2090 Podrobný popis obvyklých enkódovacích voleb naleznete níže.
|
|
2091 </para>
|
|
2092
|
|
2093
|
|
2094 <itemizedlist>
|
|
2095 <title>Volby k nastavení:</title>
|
|
2096 <listitem><para>
|
|
2097 <emphasis role="bold">vmax_b_frames</emphasis>: 1 nebo 2 je v pořádku,
|
|
2098 v závislosti na filmu.
|
|
2099 Poznamenejme, že pokud chcete mít svá videa dekódovatelná kodekem DivX5,
|
|
2100 budete muset zapnout podporu uzavřeného GOP, pomocí volby
|
|
2101 <systemitem class="library">libavcodec</systemitem>u <option>cgop</option>,
|
|
2102 ale budete také muset vypnout detekci scény, což není dobrý nápad, jelikož
|
|
2103 tak trochu zhoršíte efektivitu enkódování.
|
|
2104 </para></listitem>
|
|
2105
|
|
2106 <listitem><para>
|
|
2107 <emphasis role="bold">vb_strategy=1</emphasis>: pomáhá ve scénách s rychlým
|
|
2108 pohybem.
|
|
2109 Vyžaduje vmax_b_frames >= 2.
|
|
2110 V některých videích může vmax_b_frames snížit kvalitu, ale vmax_b_frames=2
|
|
2111 spolu s vb_strategy=1 pomůže.
|
|
2112 </para></listitem>
|
|
2113
|
|
2114 <listitem><para>
|
|
2115 <emphasis role="bold">dia</emphasis>: okruh vyhledávání pohybu. Čím větší, tím
|
|
2116 lepší a pomalejší.
|
|
2117 Záporné hodnoty mají úplně jiný význam.
|
|
2118 Dobrými hodnotami jsou -1 pro rychlé enkódování, nebo 2-4 pro pomalejší.
|
|
2119 </para></listitem>
|
|
2120
|
|
2121 <listitem><para>
|
|
2122 <emphasis role="bold">predia</emphasis>: předprůchod pro vyhledávání pohybu.
|
|
2123 Není tak důležitý jako dia. Dobré hodnoty jsou 1 (výchozí) až 4. Vyžaduje
|
|
2124 preme=2, aby byla opravdu k něčemu.
|
|
2125 </para></listitem>
|
|
2126
|
|
2127 <listitem><para>
|
|
2128 <emphasis role="bold">cmp, subcmp, precmp</emphasis>: Porovnávací funkce pro
|
|
2129 odhad pohybu.
|
|
2130 Experimentujte s hodnotami 0 (výchozí), 2 (hadamard), 3 (dct) a 6 (omezení
|
|
2131 datového toku).
|
|
2132 0 je nejrychlejší a dostatečná pro precmp.
|
|
2133 Pro cmp a subcmp je 2 dobrá pro anime a 3 zase pro živou akci.
|
|
2134 6 může, ale nemusí být o něco lepší, ale je pomalá.
|
|
2135 </para></listitem>
|
|
2136
|
|
2137 <listitem><para>
|
|
2138 <emphasis role="bold">last_pred</emphasis>: Počet prediktorů pohybu
|
|
2139 přebíraných z předchozího snímku.
|
|
2140 1-3 nebo tak pomůžou za cenu menšího zdržení.
|
|
2141 Vyšší hodnoty jsou však pomalé a nepřináší žádný další užitek.
|
|
2142 </para></listitem>
|
|
2143
|
|
2144 <listitem><para>
|
|
2145 <emphasis role="bold">cbp, mv0</emphasis>: Ovládá výběr makrobloků.
|
|
2146 Malá ztráta rychlosti za malý zisk kvality.
|
|
2147 </para></listitem>
|
|
2148
|
|
2149 <listitem><para>
|
|
2150 <emphasis role="bold">qprd</emphasis>: adaptivní kvantizace založená na
|
|
2151 komplexnosti makrobloku.
|
|
2152 Může pomoci i uškodit v závislosti na videu a ostatních volbách.
|
|
2153 Toto může způsobovat artefakty, pokud nenastavíte vqmax na nějakou rozumně
|
|
2154 malou hodnotu (6 je dobrá, možná byste ale měli jít až na 4); vqmin=1 může
|
|
2155 také pomoci.
|
|
2156 </para></listitem>
|
|
2157
|
|
2158 <listitem><para>
|
|
2159 <emphasis role="bold">qns</emphasis>: velmi pomalá, zvlášť v kombinaci
|
|
2160 s qprd.
|
|
2161 Tato volba nutí enkodér minimalizovat šum díky kompresi artefaktů, místo aby
|
|
2162 se snažil striktně zachovávat věrnost videa. Nepoužívejte ji, pokud jste již
|
|
2163 nezkusili všechno ostatní kam až to šlo a výsledek přesto není dost dobrý.
|
|
2164 </para></listitem>
|
|
2165
|
|
2166 <listitem><para>
|
|
2167 <emphasis role="bold">vqcomp</emphasis>: Vylepšení ovládání datového toku.
|
|
2168 Dobré hodnoty se liší podle videa. Můžete to bezpečně ponechat jak to je,
|
|
2169 pokud chcete.
|
|
2170 Snížením vqcomp pustíte více bitů do scén s nízkou komplexností, zvýšením je
|
|
2171 pošlete do scén s vysokou komplexností (výchozí: 0.5, rozsah: 0-1. doporučený
|
|
2172 rozsah: 0.5-0.7).
|
|
2173 </para></listitem>
|
|
2174
|
|
2175 <listitem><para>
|
|
2176 <emphasis role="bold">vlelim, vcelim</emphasis>: Nastaví jediný koeficient
|
|
2177 prahu eliminace pro jasové a barevné roviny.
|
|
2178 Ty jsou enkódovány odděleně ve všech MPEGu podobných algoritmech.
|
|
2179 Myšlenka stojící za těmito volbami je použití dobré heuristiky pro určení,
|
|
2180 zda je změna v bloku menší než vámi nastavený práh a v tom případě se blok
|
|
2181 enkóduje jako "nezměněný".
|
|
2182 To šetří bity a možná i zrychlí enkódování. vlelim=-4 a vcelim=9 se zdají být
|
|
2183 dobré pro hrané filmy, ale příliš nepomohou s anime; pokud enkódujete
|
|
2184 animované vido, měli byste je asi nechat beze změn.
|
|
2185 </para></listitem>
|
|
2186
|
|
2187 <listitem><para>
|
|
2188 <emphasis role="bold">qpel</emphasis>: Odhad pohybu s přesností na čtvrt
|
|
2189 pixelu. MPEG-4 používá přesnost na půl pixelu jako výchozí při vyhledávání
|
|
2190 pohybu, proto je tato volba spojena s určitou režií, jelikož se do výstupního
|
|
2191 souboru ukládá více informací.
|
|
2192 Kompresní zisk/ztráta závisí na filmu, ale obvykle to není příliš efektivní
|
|
2193 na anime.
|
|
2194 qpel vždy způsobí zvýšení výpočetní náročnosti dekódování (v praxi +20% času
|
|
2195 CPU).
|
|
2196 </para></listitem>
|
|
2197
|
|
2198 <listitem><para>
|
|
2199 <emphasis role="bold">psnr</emphasis>: neovlivní aktuální enkódování, ale
|
|
2200 zaznamená typ/velikost/kvalitu každého snímku do log souboru a na konci vypíše
|
|
2201 souhrnný PSNR (odstup signálu od šumu).
|
|
2202 </para></listitem>
|
|
2203
|
|
2204 </itemizedlist>
|
|
2205
|
|
2206 <itemizedlist>
|
|
2207 <title>Volby se kterými nedoporučujeme si hrát:</title>
|
|
2208 <listitem><para>
|
|
2209 <emphasis role="bold">vme</emphasis>: Výchozí je nejlepší.
|
|
2210 </para></listitem>
|
|
2211
|
|
2212 <listitem><para>
|
|
2213 <emphasis role="bold">lumi_mask, dark_mask</emphasis>: Psychovizuálně
|
|
2214 adaptivní kvantizace.
|
|
2215 Nehrajte si s těmito volbami, pokud vám jde o kvalitu. Rozumné hodnoty mohou
|
|
2216 být efektivní ve vašem případě, ale pozor, je to velmi subjektivní.
|
|
2217 </para></listitem>
|
|
2218
|
|
2219 <listitem><para>
|
|
2220 <emphasis role="bold">scplx_mask</emphasis>: Snaží se předcházet blokovým
|
|
2221 artefaktům, ale postprocesing je lepší.
|
|
2222 </para></listitem>
|
|
2223 </itemizedlist>
|
|
2224
|
|
2225 </sect2>
|
|
2226
|
|
2227
|
|
2228 <sect2 id="custommatrices"><title>Uživatelské inter/intra matice</title>
|
|
2229
|
|
2230 <para>
|
|
2231 Díky této vlastnosti
|
|
2232 <link linkend="ffmpeg"><systemitem class="library">libavcodec</systemitem></link>u
|
|
2233 můžete nastavit uživatelskou inter (I-snímky/klíčové snímky) a intra
|
|
2234 (P-snímky/predikované (rozumějte vypočítané) snímky) matice. To je podporováno
|
|
2235 mnoha kodeky:
|
|
2236 <systemitem>mpeg1video</systemitem> a <systemitem>mpeg2video</systemitem>
|
|
2237 jsou hlášeny jako funkční.
|
|
2238 </para>
|
|
2239
|
|
2240 <para>
|
|
2241 Typické použití této vlastnosti je nastavení matic preferovaných
|
|
2242 <ulink url="http://www.kvcd.net/">KVCD</ulink> specifikacemi.
|
|
2243 </para>
|
|
2244
|
|
2245 <para>
|
|
2246 <emphasis role="bold">Kvantizační Matice KVCD "Notch":</emphasis>
|
|
2247 </para>
|
|
2248
|
|
2249 <para>
|
|
2250 Intra:
|
|
2251 <screen>
|
|
2252 8 9 12 22 26 27 29 34
|
|
2253 9 10 14 26 27 29 34 37
|
|
2254 12 14 18 27 29 34 37 38
|
|
2255 22 26 27 31 36 37 38 40
|
|
2256 26 27 29 36 39 38 40 48
|
|
2257 27 29 34 37 38 40 48 58
|
|
2258 29 34 37 38 40 48 58 69
|
|
2259 34 37 38 40 48 58 69 79
|
|
2260 </screen>
|
|
2261
|
|
2262 Inter:
|
|
2263 <screen>
|
|
2264 16 18 20 22 24 26 28 30
|
|
2265 18 20 22 24 26 28 30 32
|
|
2266 20 22 24 26 28 30 32 34
|
|
2267 22 24 26 30 32 32 34 36
|
|
2268 24 26 28 32 34 34 36 38
|
|
2269 26 28 30 32 34 36 38 40
|
|
2270 28 30 32 34 36 38 42 42
|
|
2271 30 32 34 36 38 40 42 44
|
|
2272 </screen>
|
|
2273 </para>
|
|
2274
|
|
2275 <para>
|
|
2276 Použití:
|
|
2277 <screen>
|
|
2278 $ mencoder <replaceable>vstup.avi</replaceable> -o <replaceable>výstup.avi</replaceable> -oac copy -ovc lavc -lavcopts inter_matrix=...:intra_matrix=...
|
|
2279 </screen>
|
|
2280 </para>
|
|
2281
|
|
2282 <para>
|
|
2283 <screen>
|
|
2284 $ mencoder <replaceable>input.avi</replaceable> -ovc lavc -lavcopts
|
|
2285 vcodec=mpeg2video:intra_matrix=8,9,12,22,26,27,29,34,9,10,14,26,27,29,34,37,
|
|
2286 12,14,18,27,29,34,37,38,22,26,27,31,36,37,38,40,26,27,29,36,39,38,40,48,27,
|
|
2287 29,34,37,38,40,48,58,29,34,37,38,40,48,58,69,34,37,38,40,48,58,69,79
|
|
2288 :inter_matrix=16,18,20,22,24,26,28,30,18,20,22,24,26,28,30,32,20,22,24,26,
|
|
2289 28,30,32,34,22,24,26,30,32,32,34,36,24,26,28,32,34,34,36,38,26,28,30,32,34,
|
|
2290 36,38,40,28,30,32,34,36,38,42,42,30,32,34,36,38,40,42,44 -oac copy -o svcd.mpg
|
|
2291 </screen>
|
|
2292 </para>
|
|
2293 </sect2>
|
|
2294
|
|
2295
|
|
2296 <sect2 id="menc-feat-dvd-mpeg4-example">
|
|
2297 <title>Příklad</title>
|
|
2298
|
|
2299 <para>
|
|
2300 Takže jste si koupili zbrusu novou kopii filmu Harry Potter a Tajemná komnata
|
|
2301 (širokoúhlou verzi samozřejmě) a chcete si toto DVD ripnout, takže si jej
|
|
2302 můžete přidat do svého Domácího kino-počítače PC. Je to region 1 DVD, takže je
|
|
2303 v NTSC. Níže uvedený příklad je stále vhodný i pro PAL, jen musíte vynechat
|
|
2304 <option>-ofps 24000/1001</option> (protože výstupní snímková rychlost je
|
|
2305 shodná se vstupní) a přirozeně budou rozdílné souřadnice pro ořez.
|
|
2306 </para>
|
|
2307
|
|
2308 <para>
|
|
2309 Po spuštění <option>mplayer dvd://1</option>, postupujeme podle informací
|
|
2310 obsažených v sekci <link linkend="menc-feat-telecine">Jak naložit s telecine
|
|
2311 a prokladem v NTSC DVD</link> a zjistíme že je to 24000/1001 neprokládané
|
|
2312 video, takže nepotřebujeme použít inverzní telecine filtr, jako je
|
|
2313 <option>pullup</option> nebo <option>filmdint</option>.
|
|
2314 </para>
|
|
2315
|
|
2316 <para>
|
|
2317 Dále musíme zjistit vhodný ořezový obdélník, takže použijeme filtr cropdetect:
|
|
2318
|
|
2319 <screen>mplayer dvd://1 -vf cropdetect</screen>
|
|
2320
|
|
2321 Ujistěte se, že jste přešli přes zaplněný snímek (nějakou jasnou scénu) a
|
|
2322 v konzoli <application>MPlayer</application>u uvidíte:
|
|
2323
|
|
2324 <screen>crop area: X: 0..719 Y: 57..419 (-vf crop=720:362:0:58)</screen>
|
|
2325
|
|
2326 Potom přehrajeme film s tímto filtrem, abychom otestovali jeho správnost:
|
|
2327
|
|
2328 <screen>mplayer dvd://1 -vf crop=720:362:0:58</screen>
|
|
2329
|
|
2330 A zjistíme, že to vypadá zcela v pořádku. Dále se ujistíme, že šířka i výška
|
|
2331 jsou násobky 16. Šířka je v pořádku, výška ovšem ne. Protože jsme nepropadli
|
|
2332 v sedmé třídě z matematiky, víme, že nejbližším násobkem 16 nižším než 362 je
|
|
2333 352.
|
|
2334 </para>
|
|
2335
|
|
2336 <para>
|
|
2337 Mohli bychom použít <option>crop=720:352:0:58</option>, ale bude lepší
|
|
2338 ustřihnout kousek nahoře i dole, takže zachováme střed. Zkrátili jsme výšku
|
|
2339 o 10 pixelů, ale nechceme zvýšit odsazení y o 5 pixelů, protože je to liché
|
|
2340 číslo, což by nepříznivě ovlivnilo kvalitu. Místo toho zvýšíme odsazení y o 4
|
|
2341 pixely:
|
|
2342
|
|
2343 <screen>mplayer dvd://1 -vf crop=720:352:0:62</screen>
|
|
2344
|
|
2345 Další důvod pro odstřižení pixelů shora i zdola je to, že si můžeme být jisti
|
|
2346 odstřižením napůl černých pixelů pokud existují. Pokud je však vaše video
|
|
2347 telecinováno, ujistěte se, že máte v řetězu filtrů <option>pullup</option>
|
|
2348 filtr (nebo jiný filtr pro inverzi telecine, který hodláte použít) ještě před
|
|
2349 odstraněním prokladu a ořezem. (Pokud se rozhodnete zachovat vaše video
|
|
2350 prokládané, pak se ujistěte, že vaše vertikální odsazení (offset)
|
|
2351 je násobkem 4.)
|
|
2352 </para>
|
|
2353
|
|
2354 <para>
|
|
2355 Pokud si děláte starosti se ztrátou těch 10 pixelů, možná raději snížíte
|
|
2356 rozměry na nejbližší násobek 16. Řetězec filtrů by pak vypadal asi takto:
|
|
2357
|
|
2358 <screen>-vf crop=720:362:0:58,scale=720:352</screen>
|
|
2359
|
|
2360 Takovéto zmenšení videa bude znamenat ztrátu malého množství detailů, což bude
|
|
2361 pravděpodobně stěží postřehnutelné. Zvětšování by naopak vedlo ke snížení
|
|
2362 kvality (pokud byste nezvýšili datový tok). Ořez odstraní tyto pixely úplně.
|
|
2363 To je jedna z věcí, kterou byste si měli uvážit pro každý případ zvlášť.
|
|
2364 Například pokud bylo DVD video vyrobeno pro televizi, měli byste se vyvarovat
|
|
2365 vertikálnímu škálování, jelikož počet řádků odpovídá originální nahrávce.
|
|
2366 </para>
|
|
2367
|
|
2368 <para>
|
|
2369 Při prohlídce jsme zjistili, že video je poměrně akční, s vysokým počtem
|
|
2370 detailů, takže jsme zvolili datový tok 2400 Kbitů.
|
|
2371 </para>
|
|
2372
|
|
2373 <para>
|
|
2374 Nyní jsme připraveni provést dvouprůchodové enkódování. Průchod jedna:
|
|
2375
|
|
2376 <screen>mencoder dvd://1 -ofps 24000/1001 -oac copy -vf crop=720:352:0:62,hqdn3d=2:1:2 -ovc lavc \
|
|
2377 -lavcopts vcodec=mpeg4:vbitrate=2400:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:autoaspect:vpass=1 \
|
|
2378 -o Harry_Potter_2.avi</screen>
|
|
2379
|
|
2380 A průchod dva je stejný, jen nastavíme <option>vpass=2</option>:
|
|
2381
|
|
2382 <screen>mencoder dvd://1 -ofps 24000/1001 -oac copy -vf crop=720:352:0:62,hqdn3d=2:1:2 -ovc lavc \
|
|
2383 -lavcopts vcodec=mpeg4:vbitrate=2400:v4mv:mbd=2:trell:cmp=3:subcmp=3:mbcmp=3:autoaspect:vpass=2 \
|
|
2384 -o Harry_Potter_2.avi</screen>
|
|
2385 </para>
|
|
2386
|
|
2387 <para>
|
|
2388 Volby <option>v4mv:mbd=2:trell</option> velmi zvýší kvalitu za cenu časové
|
|
2389 náročnosti enkódování. Vcelku není důvod tyto volby vypustit, pokud je
|
|
2390 primárním cílem kvalita. Volby <option>cmp=3:subcmp=3:mbcmp=3</option>
|
|
2391 vyberou porovnávací funkci, která poskytuje lepší kvalitu, než výchozí.
|
|
2392 S tímto parametrem můžete zkusit experimentovat (nahlédněte do man stránky pro
|
|
2393 seznam možných hodnot), jelikož různé funkce mohou mít velký vliv na kvalitu
|
|
2394 v závislosti na zdrojovém materiálu. Například pokud zjistíte, že
|
|
2395 <systemitem class="library">libavcodec</systemitem> produkuje příliš mnoho
|
|
2396 čtverečkových artefaktů, můžete zkusit zvolit experimentální NSSE jako
|
|
2397 porovnávací funkci přes <option>*cmp=10</option>.
|
|
2398 </para>
|
|
2399
|
|
2400 <para>
|
|
2401 V případě tohoto filmu bude výsledné AVI dlouhé 138 minut a veliké kolem 3GB.
|
|
2402 A protože jste řekli, že na velikosti nezáleží, je to přijatelná velikost.
|
|
2403 Ale pokud byste jej chtěli menší, můžete zkusit nižší datový tok.
|
|
2404 Efekt zvyšování datového toku se totiž neustále snižuje, takže zatímco je
|
|
2405 zlepšení po zvýšení z 1800 Kbitů na 2000 Kbitů zjevné, nemusí být již tak
|
|
2406 velké nad 2000 Kbitů. Beze všeho s tím experimentujte, dokud nebudete
|
|
2407 spokojeni.
|
|
2408 </para>
|
|
2409
|
|
2410 <para>
|
|
2411 Jelikož jsme protáhli video odšumovacím filtrem, měli bychom jej trochu přidat
|
|
2412 během přehrávání. To, spolu s <option>spp</option> post-procesním filtrem,
|
|
2413 znatelně zvýší vnímanou kvalitu a pomůže odstranit čtverečkové artefakty ve
|
|
2414 videu. S <application>MPlayer</application>ovou volbou <option>autoq</option>
|
|
2415 může být množství postprocesingu prováděného filtrem spp přizpůsobováno
|
|
2416 vytížení CPU. V tuto chvíli rovněž můžete provést korekci gama a/nebo barevnou
|
|
2417 korekci k dosažení nejlepších výsledků. Například:
|
|
2418
|
|
2419 <screen>mplayer Harry_Potter_2.avi -vf spp,noise=9ah:5ah,eq2=1.2 -autoq 3</screen>
|
|
2420
|
|
2421 </para>
|
|
2422 </sect2>
|
|
2423 </sect1>
|
|
2424
|
|
2425
|
|
2426 <sect1 id="menc-feat-xvid">
|
|
2427 <title>Enkódování pomocí kodeku <systemitem class="library">XviD</systemitem>
|
|
2428 </title>
|
|
2429 <para>
|
|
2430 <systemitem class="library">XviD</systemitem> je svobodná knihovna pro
|
|
2431 enkódování MPEG-4 ASP video datových proudů.
|
|
2432 Před začátkem enkódování budete muset <link linkend="xvid">
|
|
2433 nastavit <application>MEncoder</application> pro jeho podporu</link>.
|
|
2434 </para>
|
|
2435 <para>
|
|
2436 Tato příručka se zaměřuje na poskytování stejného druhu informací
|
|
2437 jako příručka enkódování s x264.
|
|
2438 Takže prosím začněte přečtením
|
|
2439 <link linkend="menc-feat-x264-encoding-options-intro">první části</link>
|
|
2440 této příručky.
|
|
2441 </para>
|
|
2442
|
|
2443
|
|
2444 <sect2 id="menc-feat-xvid-intro">
|
|
2445 <title>Jaké volby by měly být použity, abychom dosáhli nejlepších výsledků?</title>
|
|
2446
|
|
2447 <para>
|
|
2448 Začněte prosím pročtením sekce
|
|
2449 <systemitem class="library">XviD</systemitem> v manuálové stránce
|
|
2450 <application>MPlayer</application>u.
|
|
2451 Tato část má být doplněním man stránky.
|
|
2452 </para>
|
|
2453 <para>
|
|
2454 Výchozí nastavení XviD jsou dobrým kompromisem mezi rychlostí a kvalitou,
|
|
2455 takže je můžete bez obav použít, pokud vám nebude něco v dalším textu jasné.
|
|
2456 </para>
|
|
2457 </sect2>
|
|
2458
|
|
2459 <sect2 id="menc-feat-xvid-encoding-options">
|
|
2460 <title>Volby pro enkódování s <systemitem class="library">XviD</systemitem></title>
|
|
2461
|
|
2462 <itemizedlist>
|
|
2463 <listitem><para>
|
|
2464 <emphasis role="bold">vhq</emphasis>
|
|
2465 Tato volba ovlivní rozhodovací algoritmus makrobloku, kde vyšší nastavení
|
|
2466 znamená lepší rozhodování.
|
|
2467 Výchozí nastavení mohou být bezpečně použita pro každé enkódování,
|
|
2468 zatímco vyšší nastavení vždy pomohou PSNR, ale je znatelně pomalejší.
|
|
2469 Poznamenejme, že lepší PSNR nemusí nutně znamenat, že bude obraz vypadat lépe,
|
|
2470 ale udává, že je blíže originálu.
|
|
2471 Vypnutí této volby viditelně zrychlí enkódování; pokud je pro vás
|
|
2472 rychlost kritická, pak to stojí za to.
|
|
2473 </para></listitem>
|
|
2474
|
|
2475 <listitem><para>
|
|
2476 <emphasis role="bold">bvhq</emphasis>
|
|
2477 Tato volba provádí to samé co vhq, ale v B-snímcích.
|
|
2478 Má zanedbatelný vliv na rychlost a trochu vylepšuje kvalitu
|
|
2479 (kolem +0.1dB PSNR).
|
|
2480 </para></listitem>
|
|
2481
|
|
2482 <listitem><para>
|
|
2483 <emphasis role="bold">max_bframes</emphasis>
|
|
2484 Větší počet povolených po sobě jdoucích B-snímků obvykle zvyšuje
|
|
2485 komprimovatelnost, ačkoli to může vést k většímu počtu blokových artefaktů.
|
|
2486 Výchozí nastavení je dobrým kompromisem mezi komprimovatelností a
|
|
2487 kvalitou, ale můžete ji zvýšit nad 3, pokud toužíte po nízkém datovém toku.
|
|
2488 Můžete ji rovněž snížit na 1 nebo 0, pokud vám jde o perfektní kvalitu,
|
|
2489 ale v tom případě byste se měli ujistit, že máte nastaven dostatečně
|
|
2490 vysoký datový tok, aby byla jistota, že komrimátor nebude zvyšovat kvantizer,
|
|
2491 aby jej dosáhl.
|
|
2492 </para></listitem>
|
|
2493
|
|
2494 <listitem><para>
|
|
2495 <emphasis role="bold">bf_threshold</emphasis>
|
|
2496 Tato volba ovládá B-snímkovou citlivost enkodéru, kdy vyšší hodnota
|
|
2497 vede k častějšímu použití B-snímků (a naopak).
|
|
2498 Má být použita spolu s <option>max_bframes</option>;
|
|
2499 pokud jste blázen do datového toku, měli byste zvýšit jak
|
|
2500 <option>max_bframes</option>, tak <option>bf_threshold</option>,
|
|
2501 nebo naopak můžete zvýšit <option>max_bframes</option> a snížit
|
|
2502 <option>bf_threshold</option>, takže bude enkodér používat více
|
|
2503 B-snímků pouze na místech, které je <emphasis role="bold">opravdu</emphasis>
|
|
2504 potřebují.
|
|
2505 Nízká hodnota <option>max_bframes</option> a vysoká
|
|
2506 <option>bf_threshold</option> asi není nejrozumnější volbou, jelikož přinutí
|
|
2507 enkodér umísťovat B-snímky na místa, které z nich nebudou těžit,
|
|
2508 ale sníží se jejich vizuální kvalita.
|
|
2509 Pokud však potřebujete být kompatibilní s domácími přehrávači, které
|
|
2510 podporují pouze staré DivX profily (ty podporují pouze 1 po sobě jdoucí
|
|
2511 B-snímek), je to vaše jediná cesta ke zvýšení komprimovatelnosti pomocí
|
|
2512 B-snímků.
|
|
2513 </para></listitem>
|
|
2514
|
|
2515 <listitem><para>
|
|
2516 <emphasis role="bold">trellis</emphasis>
|
|
2517 Optimalizuje proces kvantizace pro dosažení nejlepšího kompromisu
|
|
2518 mezi PSNR a datovým tokem, což umožňuje znatelnou úsporu bitů.
|
|
2519 Ušetřené bity budou využity v jiných částech videa, což zvýší
|
|
2520 celkovou vizuální kvalitu.
|
|
2521 Měli byste ji vždy mít zapnutou, jelikož její kvalitativní přínos je značný.
|
|
2522 Dokonce i když potřebujete vyšší rychlost, nevypínejte ji, dokud jste
|
|
2523 nevypli <option>vhq</option> a nezredukovali ostatní volby
|
|
2524 náročné na CPU na minimum.
|
|
2525 </para></listitem>
|
|
2526
|
|
2527 <listitem><para>
|
|
2528 <emphasis role="bold">hq_ac</emphasis>
|
|
2529 Aktivuje metodu odhadu s menšími náklady na koeficienty, což trochu
|
|
2530 zmenší výstupní soubor (okolo 0,15 až 0,19%) při zanedbatelném vlivu na
|
|
2531 rychlost.
|
|
2532 Je proto doporučeno ponechat ji vždy zapnutou.
|
|
2533 </para></listitem>
|
|
2534
|
|
2535 <listitem><para>
|
|
2536 <emphasis role="bold">cartoon</emphasis>
|
|
2537 Volba navržená pro lepší enkódování kresleného obsahu. Nemá vliv
|
|
2538 na rychlost, pouze doladí heuristiku pro výběr režimu pro tento
|
|
2539 druh obsahu.
|
|
2540 </para></listitem>
|
|
2541
|
|
2542 <listitem><para>
|
|
2543 <emphasis role="bold">me_quality</emphasis>
|
|
2544 Tato volba ovládá přesnost vyhledávání pohybu.
|
|
2545 Čím vyšší <option>me_quality</option>, tím bude
|
|
2546 přesnější odhad původního pohybu a výsledný snímek
|
|
2547 přesněji zachytí originální pohyb.
|
|
2548 </para>
|
|
2549 <para>
|
|
2550 Výchozí nastavení je nejlepší ve všech případech;
|
|
2551 takže ji nedoporučujeme vypínat, pokud nepotřebujete za každou cenu
|
|
2552 zvýšit rychlost, jelikož všechny bity ušetřené dobrým odhadem pohybu
|
|
2553 mohou být použity jinde a zvýšit tak celkovou kvalitu.
|
|
2554 Každopádně nechoďte níž než na 5, a když, tak jen jako poslední možnost.
|
|
2555 </para></listitem>
|
|
2556
|
|
2557 <listitem><para>
|
|
2558 <emphasis role="bold">chroma_me</emphasis>
|
|
2559 Zlepšuje odhad pohybu tím, že bere v potaz i chroma (barevnou)
|
|
2560 informaci, zatímco samotné <option>me_quality</option>
|
|
2561 používá pouze černobílou (luma).
|
|
2562 To spomalí enkódování o 5-10%, ale docela vylepší vizuální kvalitu
|
|
2563 omezením blokových artefaktů a zmenší velikost souboru asi o 1.3%.
|
|
2564 Pokud vám jde hlavně o rychlost, měli byste tuto volbu vypnout dříve,
|
|
2565 než začnete snižovat <option>me_quality</option>.
|
|
2566 </para></listitem>
|
|
2567
|
|
2568 <listitem><para>
|
|
2569 <emphasis role="bold">chroma_opt</emphasis>
|
|
2570 Je určena spíše ke zvýšení kvality barev a vyčištění bílých/černých
|
|
2571 okrajů, než k vylepšení koprimovatelnosti.
|
|
2572 To vám může pomoci omezit "red stairs" efekt.
|
|
2573 </para></listitem>
|
|
2574
|
|
2575 <listitem><para>
|
|
2576 <emphasis role="bold">lumi_mask</emphasis>
|
|
2577 Zkouší přiřadit nižší datový tok částem obrázku, které lidské oko
|
|
2578 dobře nevidí, což umožní enkodéru použít ušetřené bity na
|
|
2579 důležitějších místech obrázku.
|
|
2580 Kvalita výsledku značně závisí na osobních preferencích a
|
|
2581 na typu a nastavení monitoru použitého pro prohlížení
|
|
2582 (typicky to nebude vypadat dobře pokud je jasný, nebo je
|
|
2583 to TFT monitor).
|
|
2584 </para></listitem>
|
|
2585
|
|
2586 <listitem><para>
|
|
2587 <emphasis role="bold">qpel</emphasis>
|
|
2588 Zvýší počet možných vektorů pohybu zvýšením
|
|
2589 přesnosti vyhledávání pohybu z poloviny pixelu na
|
|
2590 čtvrtinu pixelu.
|
|
2591 Ideou je nalezení lepších vektorů pohybu, které naoplátku
|
|
2592 sníží datový tok (což zvýší kvalitu).
|
|
2593 Vektory pohybu s přesností na čtvrt pixelu však vyžadují pro sebe
|
|
2594 pár bitů navíc, ale výsledné vektory ne vždy dávají (o mnoho) lepší
|
|
2595 výsledky.
|
|
2596 Docela často vydá kodek bity na vyšší přesnost, ale dosáhne jen malého
|
|
2597 nebo žádného zvýšení kvality.
|
|
2598 Naneštěstí není způsob jak zjistit možný zisk <option>qpel</option>
|
|
2599 předem, takže musíte enkódovat s a bez ní, abyste měli jistotu.
|
|
2600 </para><para>
|
|
2601 <option>qpel</option> může až zdvojnásobit čas enkódování a
|
|
2602 vyžaduje až o 25% více výpočetního výkonu pro dekódování.
|
|
2603 Volba není podporována všemi stolními přehrávači.
|
|
2604 </para></listitem>
|
|
2605
|
|
2606 <listitem><para>
|
|
2607 <emphasis role="bold">gmc</emphasis>
|
|
2608 Pokouší se ušetřit bity v panoramatických scénách použitím jediného
|
|
2609 vektoru pohybu pro celý snímek.
|
|
2610 To téměř vždy zvýší PSNR, ale znatelně zpomalí enkódování
|
|
2611 (stejně jako dekódování).
|
|
2612 V každém případě byste ji měli používat pouze pokud máte
|
|
2613 <option>vhq</option> nastavené na maximum.
|
|
2614 GMC v <systemitem class="library">XviD</systemitem> je mnohem
|
|
2615 sofistikovanější než v DivX, ale je podporována jen několika
|
|
2616 stolními přehrávači.
|
|
2617 </para></listitem>
|
|
2618
|
|
2619 </itemizedlist>
|
|
2620 </sect2>
|
|
2621 </sect1>
|
|
2622
|
|
2623 <sect1 id="menc-feat-x264">
|
|
2624 <title>Enkódování s <systemitem class="library">x264</systemitem> kodekem</title>
|
|
2625 <para>
|
|
2626 <systemitem class="library">x264</systemitem> je svobodná knihovna pro
|
|
2627 enkódování H.264/AVC video proudů.
|
|
2628 Pře zahájením enkódování budete muset <link linkend="codec-x264-encode">
|
|
2629 nastavit její podporu v <application>MEncoder</application>u</link>.
|
|
2630 </para>
|
|
2631
|
|
2632 <sect2 id="menc-feat-x264-encoding-options">
|
|
2633 <title>Enkódovací volby x264</title>
|
|
2634
|
|
2635 <para>
|
|
2636 Začněte prosím prohlídkou sekce
|
|
2637 <systemitem class="library">x264</systemitem> man stránky
|
|
2638 <application>MPlayer</application>u.
|
|
2639 Tato sekce je zamýšlena jako doplněk nam stránky.
|
|
2640 Zde naleznete tipy, které volby budou nejspíše zajímat většinu lidí.
|
|
2641 Man stránka je více uhlazená, ale také více vyčerpávající a
|
|
2642 občas nabízí mnohem lepší technické detaily.
|
|
2643 </para>
|
|
2644
|
|
2645 <sect3 id="menc-feat-x264-encoding-options-intro">
|
|
2646 <title>Úvodem</title>
|
|
2647 <para>Tato příručka pokrývá dvě hlavní kategorie enkódovacích voleb:</para>
|
|
2648
|
|
2649 <orderedlist>
|
|
2650 <listitem><para>Volby které mění dobu enkódování za kvalitu
|
|
2651 </para></listitem>
|
|
2652 <listitem><para>Volby které mohou být použitelné pro naplnění různých
|
|
2653 osobních preferencí a speciálních požadavků</para></listitem>
|
|
2654 </orderedlist>
|
|
2655
|
|
2656 <para>
|
|
2657 Nakonec jen vy můžete rozhodnout, které volby jsou nejlepší pro
|
|
2658 vaše účely. Rozhodování v první kategorii voleb je nejjednodušší:
|
|
2659 stačí když zhodnotíte zda změny kvality ospravedlní rychlostní rozdíly.
|
|
2660 Druhá skupina voleb může být mnohem subjektivnější záležitostí a
|
|
2661 v úvahu může přijít více faktorů. Poznamenejme, že některé volby
|
|
2662 "osobních preferencí a speciálních požadavků" mohou také značně
|
|
2663 ovlivnit kvalitu nebo rychlost enkódování, ale to není jejich hlavní funkce.
|
|
2664 Několik voleb "osobních preferencí" může dokonce způsobit změny,
|
|
2665 po kterých se někomu zdá být výsledek lepší a jinému horší.
|
|
2666 </para>
|
|
2667
|
|
2668 <para>
|
|
2669 Než budeme pokračovat, poznamenejme, že tento návod používá jediné měřítko
|
|
2670 kvality: celkový PSNR.
|
|
2671 Stručné vysvětlení co je to PSNR, naleznete
|
|
2672 <ulink url="http://en.wikipedia.org/wiki/PSNR">ve Wikipedii pod heslem PSNR</ulink>.
|
|
2673 Celkové PSNR je poslední hlášené PSNR číslo při zařazení volby
|
|
2674 <option>psnr</option> v <option>x264encopts</option>.
|
|
2675 Kdykoli píšeme o PSNR, je jedním z předpokladů tohoto sdělení
|
|
2676 to, že jsou použity shodné datové toky.
|
|
2677 </para>
|
|
2678
|
|
2679 <para>
|
|
2680 Téměř všechny komentáře v tomto návodu předpokládají, že enkódujete
|
|
2681 dvouprůchodově.
|
|
2682 Při porovnávání voleb jsou zde dva hlavní důvody pro použití dvouprůchodového
|
|
2683 enkódování.
|
|
2684 Zaprvé, dvouprůchodové enkódování vám získá zhruba 1dB PSNR, což je
|
|
2685 znatelný rozdíl.
|
|
2686 Zadruhé, testování voleb pomocí přímého porovnání kvality v jednoprůchodových
|
|
2687 výsledcích je pochybné, jelikož se datový tok značně liší s každým
|
|
2688 enkódováním.
|
|
2689 Není vždy snadné určit, zda se změnila kvalita díky změně voleb, nebo
|
|
2690 z větší části odpovídají změnám datového toku.
|
|
2691 </para>
|
|
2692
|
|
2693 </sect3>
|
|
2694
|
|
2695 <sect3 id="menc-feat-x264-encoding-options-speedvquality">
|
|
2696 <title>Volby které primárně ovlivňují rychlost a kvalitu</title>
|
|
2697
|
|
2698 <itemizedlist>
|
|
2699 <listitem><para>
|
|
2700 <emphasis role="bold">subq</emphasis>:
|
|
2701 Z voleb, které umožňují vyměnit čas za kvalitu, jsou obvykle nejdůležitější
|
|
2702 <option>subq</option> a <option>frameref</option> (viz níže).
|
|
2703 Máte-li zájem ovlivnit jak rychlost, tak kvalitu, jsou to první volby,
|
|
2704 které byste měli zvážit.
|
|
2705 Ve smyslu rychlosti se spolu volby <option>frameref</option> a
|
|
2706 <option>subq</option> velmi silně ovlivňují.
|
|
2707 Zkušenosti ukazují, že při jednom referenčním snímku si
|
|
2708 <option>subq=5</option> vezme asi o 35% více času než
|
|
2709 <option>subq=1</option>.
|
|
2710 Při 6 referenčních snímcích naroste spomalení nad 60%.
|
|
2711 Vliv <option>subq</option> na PSNR se zdá být poměrně stálý,
|
|
2712 bez ohledu na počet referenčních snímků.
|
|
2713 Typicky <option>subq=5</option> získá 0.2-0.5 dB
|
|
2714 celkového PSNR přes <option>subq=1</option>.
|
|
2715 To je obvykle již viditelné.
|
|
2716 </para>
|
|
2717 <para>
|
|
2718 Režim <option>subq=6</option> je nejpomalejší s nejvyšší kvalitou.
|
|
2719 Oproti <option>subq=5</option> obvykle získává 0.1-0.4 dB
|
|
2720 celkového PSNR za cenu ztráty rychlosti 25%-100%.
|
|
2721 Narozdíl od ostatních úrovní <option>subq</option> nezávisí chování
|
|
2722 <option>subq=6</option> tolik na <option>frameref</option>
|
|
2723 a <option>me</option>. Místo toho závisí efektivita <option>subq=6
|
|
2724 </option> hlavně na počtu použitých B-snímků. Při běžném použití
|
|
2725 to znamená, že <option>subq=6</option> má velký vliv jak na rychlost, tak na
|
|
2726 kvalitu v komplexních, velmi pohyblivých scénách, ale nemusí mít takový vliv
|
|
2727 ve scénách s malým pohybem. Poznamenejme, že stále doporučujeme nastavit
|
|
2728 <option>bframes</option> na nenulovou hodnotu (viz níže).
|
|
2729 </para></listitem>
|
|
2730 <listitem><para>
|
|
2731 <emphasis role="bold">frameref</emphasis>:
|
|
2732 Výchozí nastavení <option>frameref</option> je 1, ale nemělo by to být bráno
|
|
2733 tak, že je rozumné nastavovat jej na 1.
|
|
2734 Pouhé zvýšení <option>frameref</option> na 2 získá okolo
|
|
2735 0.15dB PSNR s 5-10% spomalením, což je zřejmě dobrý obchod.
|
|
2736 <option>frameref=3</option> získá kolem 0.25dB PSNR navíc k
|
|
2737 <option>frameref=1</option>, což již může být viditelný
|
|
2738 rozdíl.
|
|
2739 <option>frameref=3</option> je asi o 15% pomalejší než
|
|
2740 <option>frameref=1</option>.
|
|
2741 Naneštěstí se zisk rychle vytrácí.
|
|
2742 Prř <option>frameref=6</option> můžete očekávat zisk pouze
|
|
2743 0.05-0.1 dB nad <option>frameref=3</option> při dodatečném
|
|
2744 15% zpomalení.
|
|
2745 Nad <option>frameref=6</option> je zisk kvality obvykle velmi malý
|
|
2746 (ačkoli byste měli mít na paměti, že se to může výrazně lišit v závislosti
|
|
2747 na zdrojovém materiálu).
|
|
2748 V poměrně typickém případě zlepší <option>frameref=12</option>
|
|
2749 celkový PSNR o pouhé 0.02dB nad <option>frameref=6</option>,
|
|
2750 při spomalení o 15%-20%.
|
|
2751 Při tak vysokých hodnotách <option>frameref</option> lze říct pouze
|
|
2752 jedinou dobrou věc, a to že jejich další zvyšování téměř nikdy
|
|
2753 <emphasis role="bold">nesníží</emphasis> PSNR, ale další zisk kvality
|
|
2754 je stěží měřitelný, natož viditelný.
|
|
2755 </para>
|
|
2756 <note><title>Poznámka:</title>
|
|
2757 <para>
|
|
2758 Zvýšení <option>frameref</option> na nemístně vysokou hodnotu
|
|
2759 <emphasis role="bold">může</emphasis> a
|
|
2760 <emphasis role="bold">obvykle taky sníží</emphasis>
|
|
2761 efektivitu kódování, pokud vypnete CABAC.
|
|
2762 Se zapnutým CABAC (výchozí chování) se zdá být možnost nastavit
|
|
2763 <option>frameref</option> "příliš vysoko" příliš vzdálená na to,
|
|
2764 abyste se tím museli trápit a v budoucnu mohou optimalizace
|
|
2765 tuto možnost zcela vyloučit.
|
|
2766 </para>
|
|
2767 </note>
|
|
2768 <para>
|
|
2769 Pokud vám záleží na rychlosti, bývá vhodným kompromisem použít
|
|
2770 nízké hodnoty <option>subq</option> a <option>frameref</option>
|
|
2771 v prvním průchodu a zvýšit je ve druhém.
|
|
2772 Typicky to má zanedbatelný záporný vliv na konečnou kvalitu:
|
|
2773 Pravděpodobně stratíte méně než 0.1dB PSNR, což by měl být až příliš
|
|
2774 malý rozdíl, než aby byl vidět.
|
|
2775 Odlišné hodnoty <option>frameref</option> však mohou místy ovlivnit
|
|
2776 volbu typu snímku.
|
|
2777 Nejspíš to budou ojedinělé případy, ale chcete-li si být zcela jisti,
|
|
2778 zjistěte, jestli vaše video obsahuje buď blýskavé vzory přes celou obrazovku,
|
|
2779 nebo rozsáhlé krátkodobé změny, které by mohly vynutit I-snímek.
|
|
2780 Nastavte <option>frameref</option> pro první průchod tak, aby byl
|
|
2781 dostatečně velký pro pokrytí doby bliknutí (nebo změny).
|
|
2782 Například, pokud scéna přepíná tam a zpět mezi dvěma obrázky přes tři snímky,
|
|
2783 nastavte <option>frameref</option> pro první průchod na 3 a více.
|
|
2784 Tento případ je nejspíš zcela ojedinělý v hraných filmech, ale občas se
|
|
2785 vyskytuje v záznamech z videoher.
|
|
2786 </para></listitem>
|
|
2787
|
|
2788 <listitem><para>
|
|
2789 <emphasis role="bold">me</emphasis>:
|
|
2790 Tato volba je určena pro výběr metody vyhledávání pohybu.
|
|
2791 Změnou této volby jednoduše měníte poměr kvalita-versus-rychlost.
|
|
2792 Volba <option>me=1</option> je jen o málo procent rychlejší než
|
|
2793 výchozí vyhledávání za cenu pod 0.1dB globálního PSNR.
|
|
2794 Výchozí nastavení (<option>me=2</option>) je rozumným kompromisem
|
|
2795 mezi rychlostí a kvalitou. Volba <option>me=3</option> získá o trošku méně
|
|
2796 než 0.1dB globální PSNR, při spomalení, které se liší v závislosti na
|
|
2797 <option>frameref</option>. Při vysokých hodnotách
|
|
2798 <option>frameref</option> (řekněme 12 nebo tak), je <option>me=3</option>
|
|
2799 asi o 40% pomalejší než výchozí <option> me=2</option>. Při
|
|
2800 <option>frameref=3</option>, klesne způsobené spomalení na
|
|
2801 25%-30%.
|
|
2802 </para>
|
|
2803 <para>
|
|
2804 Volba <option>me=4</option> používá tak rozsáhlé vyhledávání, že je příliš
|
|
2805 pomalá pro praktické využití.
|
|
2806 </para>
|
|
2807 </listitem>
|
|
2808
|
|
2809 <listitem><para>
|
|
2810 <emphasis role="bold">4x4mv</emphasis>:
|
|
2811 Tato volba zapíná použití podčástí 8x4, 4x8 a 4x4 v predikovaných
|
|
2812 makroblocích. Její aktivace vede k poměrně stálé
|
|
2813 10%-15% ztrátě rychlosti. Tato volba je poměrně neužitečná ve zdroji
|
|
2814 obsahujícím pouze pomalý pohyb, naproti tomu u některých zdrojů s rychlým
|
|
2815 pohybem, přesněji zdrojů s velkým množstvím malých pohyblivých objektů,
|
|
2816 můžete očekávat zisk okolo 0.1dB.
|
|
2817 </para>
|
|
2818 </listitem>
|
|
2819
|
|
2820 <listitem><para>
|
|
2821 <emphasis role="bold">bframes</emphasis>:
|
|
2822 Použitelnost B-snímků je ve většině ostatních kodeků diskutabilní.
|
|
2823 V H.264 se to změnilo: jsou zde nové techniky a typy bloků pro použití
|
|
2824 v B-snímcích.
|
|
2825 Obvykle i naivní algoritmus pro výběr B-snímku může zajistit znatelný
|
|
2826 zisk PSNR.
|
|
2827 Také je zajímavé, že pokud vypnete adaptivní rozhodování o B-snímku
|
|
2828 (<option>nob_adapt</option>), zvýší obvykle enkódování s
|
|
2829 <option>bframes</option> o trochu rychlost enkódování.
|
|
2830 </para>
|
|
2831 <para>
|
|
2832 S vypnutým adaptivním rozhodováním o B-snímku
|
|
2833 (<option>x264encopts</option> - volba <option>nob_adapt</option>),
|
|
2834 optimální hodnota tohoto nastavení nebývá obvykle vyšší než
|
|
2835 <option>bframes=1</option>, jinak mouhou utrpět velmi pohyblivé scény.
|
|
2836 Se zapnutým adaptivním rozhodováním o B-snímku (výchozí chování),
|
|
2837 je obvykle bezpečné použít vyšší hodnoty; enkodér se pokusí snížit
|
|
2838 použití B-snímků ve scénách, kde by snížily kompresi.
|
|
2839 Enkodér zřídka použije více než 3 nebo 4 B-snímky;
|
|
2840 nastavení této volby na vyšší hodnotu bude mít jen nepatrný vliv.
|
|
2841 </para></listitem>
|
|
2842
|
|
2843 <listitem><para>
|
|
2844 <emphasis role="bold">b_adapt</emphasis>:
|
|
2845 Poznámka: Výchozí je zapnuto.
|
|
2846 </para>
|
|
2847 <para>
|
|
2848 Je-li tato volba zapnuta, bude enkodér používat rychlou
|
|
2849 heuristiku pro snížení počtu B-snímků ve scénách, kde by jejich
|
|
2850 použitím příliš nezískaly.
|
|
2851 Můžete použít <option>b_bias</option> pro nastavení jak přátelský
|
|
2852 bude enkodér k B-snímkům.
|
|
2853 Spomalení působené adaptivními B-snímky je nyní spíše malé, ale
|
|
2854 stejně tak potenciální zisk kvality.
|
|
2855 Obvykle však nijak neškodí.
|
|
2856 Poznamenejme, že ovlivňuje rychlost a rozhodování o typu snímku pouze
|
|
2857 v prvním průchodu.
|
|
2858 <option>b_adapt</option> a <option>b_bias</option> nemají žádný vliv
|
|
2859 v následných průchodech.
|
|
2860 </para></listitem>
|
|
2861
|
|
2862 <listitem><para>
|
|
2863 <emphasis role="bold">b_pyramid</emphasis>:
|
|
2864 Pokud používáte >=2 B-snímky, můžete také zapnout tuto volbu; jak
|
|
2865 říká man stránka, dostanete malé zvýšení kvality bez ztráty rychlosti.
|
|
2866 Poznamenejme, že tato videa nelze číst dekodéry založenými na libavcodec
|
|
2867 staršími než 5. března 2005.
|
|
2868 </para></listitem>
|
|
2869
|
|
2870 <listitem><para>
|
|
2871 <emphasis role="bold">weight_b</emphasis>:
|
|
2872 V typických případech tato volba nepřináší velký zisk.
|
|
2873 V prolínacích nebo stmívacích scénách však vážená predikce
|
|
2874 umožňuje poměrně velkou úsporu datového toku.
|
|
2875 V MPEG-4 ASP bývá stmívání obvykle nejlépe kódováno jako série
|
|
2876 velkých I-snímků; použití vážené predikce v B-snímcích umožňuje
|
|
2877 změnit alespoň některé z nich na rozumně menší B-snímky.
|
|
2878 Spomalení enkódování se zdá být minimální, pokud nějaké je.
|
|
2879 Rovněž, v rozporu s tím, co si někteří lidé mohou myslet,
|
|
2880 požadavky dekodéru na CPU nejsou váženou predikcí ovlivněny,
|
|
2881 ostatní možnosti jsou stejně náročné.
|
|
2882 </para>
|
|
2883 <para>
|
|
2884 Naneštěstí má aktuálně algoritmus adaptivního rozhodování o B-snímcích
|
|
2885 výraznou tendenci vyvarovat se B-snímků při stmívání.
|
|
2886 Dokud se to nezmění, bude dobré přidat
|
|
2887 <option>nob_adapt</option> do x264encopts, pokud očekáváte, že stmívání
|
|
2888 bude mít znatelný vliv ve vašem konkrétním klipu.
|
|
2889 </para></listitem>
|
|
2890 </itemizedlist>
|
|
2891 </sect3>
|
|
2892
|
|
2893 <sect3 id="menc-feat-x264-encoding-options-misc-preferences">
|
|
2894 <title>Volby náležející různým preferencím</title>
|
|
2895 <itemizedlist>
|
|
2896 <listitem><para>
|
|
2897 <emphasis role="bold">Dvouprůchodové enkodování</emphasis>:
|
|
2898 Výše jsme doporučovali vždy používat dvouprůchodové enkódování, ale
|
|
2899 stále existují důvody proč jej nepoužít. Například pokud zachytáváte
|
|
2900 TV vysílání a enkódujete v reálném čase, nemáte jinou možnost, než
|
|
2901 použít jeden průchod. Jeden průchod je samozřejmě rychlejší
|
|
2902 než dva; pokud použijete stejné volby v obou průchodech, pak je dvouprůchodové
|
|
2903 enkódování téměř dvakrát pomalejší.
|
|
2904 </para>
|
|
2905 <para>
|
|
2906 Stále jsou však velmi dobré důvody pro použití dvouprůchodového režimu.
|
|
2907 Volič datového toku v jednoprůchodovém režimu není oduševnělý a často
|
|
2908 dělá nerozumné volby, protože nevidí celkový obraz. Předpokládejme, že
|
|
2909 máte například dvouminutové video skládající se ze dvou částí.
|
|
2910 První polovina je vysoce pohyblivá scéna dlouhá 60 sekund, která samostatně
|
|
2911 vyžaduje kolem 2500kbps, aby vypadala slušně.
|
|
2912 Hned za ní následuje méně náročná 60 sekundová scéna, která vypadá dobře
|
|
2913 při 300kbps. Vyžádáte si 1400kbps, což je teoreticky dostatečné pro pokrytí
|
|
2914 obou scén. Jednoprůchodový volič datového toku v tom případě učiní
|
|
2915 několik "chyb". První blok může skončit těžce překvantizovaný, takže
|
|
2916 bude nepoužitelně a zbytečně čtverečkovaný. Druhá část bude velmi
|
|
2917 podkvantizovaná; to může vypadat dobře, ale spotřeba bitů na tento
|
|
2918 vzhled je nerozumně vysoká. Čeho se dá ještě hůře vyvarovat je problém
|
|
2919 přechodu mezi těmito scénami. První sekundy málo pohyblivé poloviny
|
|
2920 budou těžce překvantizovány, protože volič toku stále očekává nároky na
|
|
2921 datový tok, se kterými se potýkal v první polovině videa.
|
|
2922 Tato "chybová doba" překvantizované málo pohyblivé scény bude vypadat
|
|
2923 neskutečně špatně a skutečně použije méně než 300kbps, které by potřebovala,
|
|
2924 aby vypadala dobře. Existují způsoby pro zmírnění nástrah jednoprůchodového
|
|
2925 enkódování, ale ty mohou tíhnout ke zvyšování nepřesnosti datového toku.
|
|
2926 </para>
|
|
2927 <para>
|
|
2928 Víceprůchodový volič datového toku nabízí velké výhody oproti jednomu
|
|
2929 průchodu. Díky statistikám generovaným v prvním průchodu může enkodér
|
|
2930 určit, s rozumnou přesností, bitovou náročnost enkódování každého snímku
|
|
2931 při jakémkoli kvantizéru. To umožňuje mnohem racionálnější, lépe naplánovanou
|
|
2932 spotřebu bitů mezi drahými (hodně pohyblivými) a levnými (málo pohyblivými)
|
|
2933 scénami. Několik nápadů jak upravit tuto spotřebu podle svého naleznete níže
|
|
2934 viz <option>qcomp</option>.
|
|
2935 </para>
|
|
2936 <para>
|
|
2937 Navíc dva průchody nemusí trvat dvakrát tak dlouho jako jeden. Můžete upravit
|
|
2938 volby prvního průchodu pro nejvyšší rychlost a nižší kvalitu.
|
|
2939 Pokud si dobře zvolíte své volby, můžete mít velmi rychlý první průchod.
|
|
2940 Výsledná kvalita ve druhém průchodu bude trochu horší, protože predikce
|
|
2941 velikosti je méně přesná, ale rozdíl v kvalitě je obvykle příliž malý, aby
|
|
2942 byl vidět. Zkuste např. přidat
|
|
2943 <option>subq=1:frameref=1</option> do <option>x264encopts</option>
|
|
2944 prvnímu průchodu. Pak ve druhém průchodu použijte pomalejší volby pro
|
|
2945 vyšší kvalitu:
|
|
2946 <option>subq=6:frameref=15:4x4mv:me=3</option>
|
|
2947 </para></listitem>
|
|
2948 <listitem><para>
|
|
2949 <emphasis role="bold">Tříprůchodové enkódování</emphasis>?
|
|
2950
|
|
2951 x264 nabízí možnost provádět větší počet následných průchodů.
|
|
2952 Pokud zadáte <option>pass=1</option> v prvním průchodu a pak použijete
|
|
2953 <option>pass=3</option> v následujícím průchodu, pak tento průchod
|
|
2954 jak načte statistiky z předchozího, tak zapíše své vlastní. Další průchod
|
|
2955 po něm pak bude mít velmi dobrou základnu pro vysoce přesnou predikci
|
|
2956 velikosti snímků při zvoleném kvantizéru. V praxi se celková kvalita
|
|
2957 z toho vzešlá blíží nule a je možné, že třetí průchod bude mít horší
|
|
2958 celkový PSNR než jeho předchúdce. Při běžném použití tři průchody pomůžou,
|
|
2959 pokud dostanete buď špatnou predikci datového toku, nebo špatně vypadající
|
|
2960 přechody mezi scénami po použití pouze dvou průchodů.
|
|
2961 To se nejspíš může stát v extrémně krátkých klipech. Je rovněž několik
|
|
2962 zvláštních případů, ve kterých jsou tři a více průchodů dobré pro
|
|
2963 pokročilé uživatele, ale pro stručnost se zde těmito případy zabývat nebudeme.
|
|
2964
|
|
2965 </para></listitem>
|
|
2966 <listitem><para>
|
|
2967 <emphasis role="bold">qcomp</emphasis>:
|
|
2968 <option>qcomp</option> mění poměr počtu bitů alokovaných "drahým"
|
|
2969 velmi pohyblivým snímkům k "levným" málo pohyblivým snímkům. V jednom
|
|
2970 extrému, <option>qcomp=0</option> vede k čistě konstantnímu datovému toku.
|
|
2971 Což typicky činí velmi pohyblivé scény velmi ošklivé, zatímco scény
|
|
2972 s malým pohybem vypadají perfektně, ale spotřebovávají mnohem větší datový
|
|
2973 tok, než by potřebovaly k tomu, aby ještě vypadaly skvěle.
|
|
2974 Ve druhém extrému, <option>qcomp=1</option>, dostanete téměř konstantní
|
|
2975 kvantizační parametr (QP). Konstantní QP nevypadá špatně, ale většina
|
|
2976 lidí soudí, že je rozumnější snížit trochu datový tok v extrémně
|
|
2977 náročných scénách (kde snížení kvality není tak vidět) a realokovat je
|
|
2978 do scén, které je snadnější enkódovat při excelentní kvalitě.
|
|
2979 Výchozí hodnota <option>qcomp</option> je 0.6, což může být, podle
|
|
2980 některých lidí poněkud málo (běžně se rovněž používá 0.7-0.8).
|
|
2981 </para></listitem>
|
|
2982 <listitem><para>
|
|
2983 <emphasis role="bold">keyint</emphasis>:
|
|
2984 <option>keyint</option> je výhradně pro výměnu míry převinutelnosti
|
|
2985 za efektivitu kódování. Výchozí hodnota <option>keyint</option> je 250.
|
|
2986 V materiálu 25 snímků za sekundu to zajišťuje schopnost převíjení
|
|
2987 s 10 sekundovou přesností. Pokud soudíte, že bude důležité a užitečné
|
|
2988 být schopen převíjet s přesností 5 sekund, nastavte
|
|
2989 <option>keyint=125</option>;
|
|
2990 to ovšem trochu sníží kvalitu/datový tok. Pokud vám jde jen o kvalitu, nikoli
|
|
2991 převinutelnost, můžete si nastavit mnohem vyšší hodnoty
|
|
2992 (rozumějte že zisk z toho klesá a může být neznatelný až žádný).
|
|
2993 Video proud bude stále mít převíjecí body, pokud jsou zde nějaké změny scény.
|
|
2994 </para></listitem>
|
|
2995 <listitem><para>
|
|
2996 <emphasis role="bold">deblockalpha, deblockbeta</emphasis>:
|
|
2997 Tato věc začíná být trochu kontroverzní.
|
|
2998 </para>
|
|
2999 <para>
|
|
3000 H.264 definuje jednoduchou deblokovací proceduru I-bloků, která používá
|
|
3001 přednastavených sil a prahů závislých na QP daného bloku.
|
|
3002 Výchozí je, že bloky s vysokým QP jsou filtrovány silně a bloky s nízkým QP
|
|
3003 nejsou deblokovány vůbec.
|
|
3004 Přednastavené síly definované standardem jsou dobře zvoleny a
|
|
3005 vyváženy tak, že jsou optimální z hlediska PSNR pro libovolné
|
|
3006 video, které zkoušíte enkódovat.
|
|
3007 Volby <option>deblockalpha</option> a <option>deblockbeta</option>
|
|
3008 umožňují nastavit offsety přednastaveným deblokovacím prahům.
|
|
3009 </para>
|
|
3010 <para>
|
|
3011 Zdá se, že si mnoho lidí myslí, že je dobré snížit sílu deblokovacího filtru
|
|
3012 o vysokou hodnotu (řekněme, -3).
|
|
3013 To však není téměř nikdy dobrý nápad a v mnoha případech lidé,
|
|
3014 kteří to dělají, nerozumí dobře tomu, jak pracuje výchozí deblokování.
|
|
3015 </para>
|
|
3016 <para>
|
|
3017 První a nejdůležitější věc, kterou byste měli vědět o in-loop
|
|
3018 deblokovacím filtru, je, že výchozí prahy jsou téměř vždy optimální
|
|
3019 z hlediska PSNR.
|
|
3020 V řídkých případech, kdy nejsou, je ideální offset plusmínus 1.
|
|
3021 Úprava deblokovacích parametrů o větší hodnotu téměř zaručeně
|
|
3022 poškodí PSNR.
|
|
3023 Zesílení filtru setře více detailů; oslabení filtru povede k
|
|
3024 zvýšené viditelnosti blokování.
|
|
3025 </para>
|
|
3026 <para>
|
|
3027 Rozhodně je hloupost snižovat deblokovací prahy pokud má vaše video
|
|
3028 převážně nízkou plošnou komplexnost (čili málo detailů nebo šumu).
|
|
3029 In-loop filtr odvádí téměř výbornou práci v ukrývání
|
|
3030 artefaktů, které se mohou vyskytnout.
|
|
3031 Pokud má zdroj vysokou plšnou komplexnost, pak jsou artefakty méně viditelné.
|
|
3032 To proto, že kroužkování vypadá podobně jako detail nebo šum.
|
|
3033 Lidské oko snadno rozpozná, pokud je odstraněn detail, ale ne
|
|
3034 už tak snadno pozná, že je šum reprezentován špatně.
|
|
3035 Když příjde na subjektivní kvalitu, pak jsou detaily a šum do jisté míry
|
|
3036 zaměnitelné.
|
|
3037 Oslabením deblokovacího filtru nejspíše zvýšíte chybu, přidáním
|
|
3038 kroužkových artefaktů, ale oko si toho nevšimne, jelikož je zamění
|
|
3039 za detaily.
|
|
3040 </para>
|
|
3041
|
|
3042 <para>
|
|
3043 <emphasis role="bold">Ani to</emphasis> však neospravedlňuje
|
|
3044 oslabení deblokovacího filtru.
|
|
3045 Obecně dostanete kvalitnější šum pomocí postprocesingu.
|
|
3046 Pokud vaše H.264 videa vypadají příliš neostře nebo rozmazaně, zkuste si
|
|
3047 pohrát s <option>-vf noise</option> při přehrávání.
|
|
3048 Volba <option>-vf noise=8a:4a</option> by měla skrýt většinu středně silných
|
|
3049 artefaktů.
|
|
3050 Téměř určitě to bude vypadat lépe, než výsledky, které byste mohli dosáhnout
|
|
3051 pohráváním si s deblokovacím filtrem.
|
|
3052 </para></listitem>
|
|
3053 </itemizedlist>
|
|
3054 </sect3>
|
|
3055 </sect2>
|
|
3056 </sect1>
|
|
3057
|
|
3058 <sect1 id="menc-feat-vcd-dvd">
|
|
3059 <title>Použití MEncoder k vytváření VCD/SVCD/DVD-kompatibilních souborů.</title>
|
|
3060
|
|
3061 <sect2 id="menc-feat-vcd-dvd-constraints">
|
|
3062 <title>Omezení Formátů</title>
|
|
3063 <para>
|
|
3064 <application>MEncoder</application> je schopen vytvořit soubory ve
|
|
3065 formátu MPEG pro VCD, SCVD a DVD pomocí knihovny
|
|
3066 <systemitem class="library">libavcodec</systemitem>.
|
|
3067 Tyto soubory pak mohou být použity ve spojení s programem
|
|
3068 <ulink url="http://www.gnu.org/software/vcdimager/vcdimager.html">vcdimager</ulink>
|
|
3069 nebo
|
|
3070 <ulink url="http://dvdauthor.sourceforge.net/">dvdauthor</ulink>
|
|
3071 pro vytvoření disku přehratelného na stolním přehrávači.
|
|
3072 </para>
|
|
3073
|
|
3074 <para>
|
|
3075 Formáty DVD, SVCD a VCD mají silná omezení.
|
|
3076 K dispozici máte pouze malý výběr vlikostí enkódovaného obrazu a poměrů stran.
|
|
3077 Pokud váš film nesplňuje tyto požadavky, budete jej muset škálovat, ořezat
|
|
3078 nebo přidat černé okraje, aby byl kompatibilní.
|
|
3079 </para>
|
|
3080
|
|
3081 <sect3 id="menc-feat-vcd-dvd-constraints-resolution">
|
|
3082 <title>Omezení Formátů</title>
|
|
3083
|
|
3084 <informaltable frame="all">
|
|
3085 <tgroup cols="9">
|
|
3086 <thead>
|
|
3087 <row>
|
|
3088 <entry>Formát</entry>
|
|
3089 <entry>Rozlišení</entry>
|
|
3090 <entry>V. kodec</entry>
|
|
3091 <entry>V. dat. tok</entry>
|
|
3092 <entry>Vzork. kmitočet</entry>
|
|
3093 <entry>A. kodec</entry>
|
|
3094 <entry>A. dat. tok</entry>
|
|
3095 <entry>FPS</entry>
|
|
3096 <entry>Poměr stran</entry>
|
|
3097 </row>
|
|
3098 </thead>
|
|
3099 <tbody>
|
|
3100 <row>
|
|
3101 <entry>NTSC DVD</entry>
|
|
3102 <entry>720x480, 704x480, 352x480, 352x240</entry>
|
|
3103 <entry>MPEG-2</entry>
|
|
3104 <entry>9800 kbps</entry>
|
|
3105 <entry>48000 Hz</entry>
|
|
3106 <entry>AC3,PCM</entry>
|
|
3107 <entry>1536 kbps</entry>
|
|
3108 <entry>23.976, 29.97</entry>
|
|
3109 <entry>4:3, 16:9 (pouze pro 720x480)</entry>
|
|
3110 </row>
|
|
3111 <row>
|
|
3112 <entry>NTSC DVD</entry>
|
|
3113 <entry>352x240<footnote id='fn-rare-resolutions'><para>
|
|
3114 Tato rozlišení jsou zřídka použita pro DVD, protože
|
|
3115 mají docela nízkou kvalitu.</para></footnote></entry>
|
|
3116 <entry>MPEG-1</entry>
|
|
3117 <entry>1856 kbps</entry>
|
|
3118 <entry>48000 Hz</entry>
|
|
3119 <entry>AC3,PCM</entry>
|
|
3120 <entry>1536 kbps</entry>
|
|
3121 <entry>23.976, 29.97</entry>
|
|
3122 <entry>4:3, 16:9</entry>
|
|
3123 </row>
|
|
3124 <row>
|
|
3125 <entry>NTSC SVCD</entry>
|
|
3126 <entry>480x480</entry>
|
|
3127 <entry>MPEG-2</entry>
|
|
3128 <entry>2600 kbps</entry>
|
|
3129 <entry>44100 Hz</entry>
|
|
3130 <entry>MP2</entry>
|
|
3131 <entry>384 kbps</entry>
|
|
3132 <entry>29.97</entry>
|
|
3133 <entry>4:3</entry>
|
|
3134 </row>
|
|
3135 <row>
|
|
3136 <entry>NTSC VCD</entry>
|
|
3137 <entry>352x240</entry>
|
|
3138 <entry>MPEG-1</entry>
|
|
3139 <entry>1150 kbps</entry>
|
|
3140 <entry>44100 Hz</entry>
|
|
3141 <entry>MP2</entry>
|
|
3142 <entry>224 kbps</entry>
|
|
3143 <entry>23.976, 29.97</entry>
|
|
3144 <entry>4:3</entry>
|
|
3145 </row>
|
|
3146 <row>
|
|
3147 <entry>PAL DVD</entry>
|
|
3148 <entry>720x576, 704x576, 352x576, 352x288</entry>
|
|
3149 <entry>MPEG-2</entry>
|
|
3150 <entry>9800 kbps</entry>
|
|
3151 <entry>48000 Hz</entry>
|
|
3152 <entry>MP2,AC3,PCM</entry>
|
|
3153 <entry>1536 kbps</entry>
|
|
3154 <entry>25</entry>
|
|
3155 <entry>4:3, 16:9 (pouze pro 720x576)</entry>
|
|
3156 </row>
|
|
3157 <row>
|
|
3158 <entry>PAL DVD</entry>
|
|
3159 <entry>352x288<footnoteref linkend='fn-rare-resolutions'/></entry>
|
|
3160 <entry>MPEG-1</entry>
|
|
3161 <entry>1856 kbps</entry>
|
|
3162 <entry>48000 Hz</entry>
|
|
3163 <entry>MP2,AC3,PCM</entry>
|
|
3164 <entry>1536 kbps</entry>
|
|
3165 <entry>25</entry>
|
|
3166 <entry>4:3, 16:9</entry>
|
|
3167 </row>
|
|
3168 <row>
|
|
3169 <entry>PAL SVCD</entry>
|
|
3170 <entry>480x576</entry>
|
|
3171 <entry>MPEG-2</entry>
|
|
3172 <entry>2600 kbps</entry>
|
|
3173 <entry>44100 Hz</entry>
|
|
3174 <entry>MP2</entry>
|
|
3175 <entry>384 kbps</entry>
|
|
3176 <entry>25</entry>
|
|
3177 <entry>4:3</entry>
|
|
3178 </row>
|
|
3179 <row>
|
|
3180 <entry>PAL VCD</entry>
|
|
3181 <entry>352x288</entry>
|
|
3182 <entry>MPEG-1</entry>
|
|
3183 <entry>1150 kbps</entry>
|
|
3184 <entry>44100 Hz</entry>
|
|
3185 <entry>MP2</entry>
|
|
3186 <entry>224 kbps</entry>
|
|
3187 <entry>25</entry>
|
|
3188 <entry>4:3</entry>
|
|
3189 </row>
|
|
3190 </tbody>
|
|
3191 </tgroup>
|
|
3192 </informaltable>
|
|
3193
|
|
3194 <para>
|
|
3195 Pokud má vaše video poměr stran 2.35:1 (většina současných akčních filmů),
|
|
3196 budete muset přidat černé okraje, nebo ořezat video na 16:9, abyste mohli
|
|
3197 vytvořit DVD nebo VCD.
|
|
3198 Pokud přidáváte černé okraje, zkuste je napasovat do 16 pixelových okrajů,
|
|
3199 abyste minimalizovali vliv na výkon enkódování.
|
|
3200 Naštěstí má DVD dostatečně vysoký datový tok, takže se nemusíte příliš
|
|
3201 zabývat efektivitou enkódování, ale u SVCD a VCD je k dispozici jen malý
|
|
3202 datový tok, takže vyžaduje větší snahu pro dosažení přijatelné kvlaity.
|
|
3203 </para>
|
|
3204 </sect3>
|
|
3205
|
|
3206 <sect3 id="menc-feat-vcd-dvd-constraints-gop">
|
|
3207 <title>Omezení velikosti GOP</title>
|
|
3208 <para>
|
|
3209 DVD, VCD a SVCD vás rovněž omezují na relativně nízké GOP (skupina obrázků)
|
|
3210 velikosti.
|
|
3211 Pro materiál 30 snímků za sekundu je největší povolená GOP velikost 18.
|
|
3212 Pro 25 nebo 24 snímků/s je maximum 15.
|
|
3213 Velikost GOP je nastavena pomocí volby <option>keyint</option>.
|
|
3214 </para>
|
|
3215 </sect3>
|
|
3216
|
|
3217 <sect3 id="menc-feat-vcd-dvd-constraints-bitrate">
|
|
3218 <title>Omezení datového toku</title>
|
|
3219 <para>
|
|
3220 VCD video musí být CBR při 1152 kbps.
|
|
3221 Tento velmi omezující požadavek je zde spolu s velmi malou vbv vyrovnávací
|
|
3222 pamětí 327 kilobitů.
|
|
3223 SVCD umožňuje proměnné datové toky až do 2500 kbps a poněkud méně
|
|
3224 omezující velikost vbv bufferu 917 kilobitů.
|
|
3225 Datové toky pro DVD mohou být libovolné až do 9800 kbps (ačkoli typické
|
|
3226 datové toky jsou asi poloviční) a velikost vbv buferu je 1835 kilobitů.
|
|
3227 </para>
|
|
3228 </sect3>
|
|
3229 </sect2>
|
|
3230
|
|
3231 <sect2 id="menc-feat-vcd-dvd-output">
|
|
3232 <title>Výstupní volby</title>
|
|
3233 <para>
|
|
3234 <application>MEncoder</application> má volby pro ovládání výstupního formátu.
|
|
3235 Pomocí těchto voleb jej můžete instruovat, aby použil správný typ souboru.
|
|
3236 </para>
|
|
3237
|
|
3238 <para>
|
|
3239 Volby pro VCD a SVCD se nazývají xvcd a xsvcd, protože to jsou rozšířené
|
|
3240 formáty.
|
|
3241 Nejsou přesně kompatibilní hlavně proto, že výstup neobsahuje skenovací
|
|
3242 offsety.
|
|
3243 Pokud potřebujete generovat SVCD obraz, měli byste protáhnout výstupní soubor
|
|
3244 programem
|
|
3245 <ulink url="http://www.gnu.org/software/vcdimager/vcdimager.html">vcdimager</ulink>.
|
|
3246 </para>
|
|
3247
|
|
3248 <para>
|
|
3249 VCD:
|
|
3250 <screen>
|
|
3251 -of mpeg -mpegopts format=xvcd
|
|
3252 </screen>
|
|
3253 </para>
|
|
3254
|
|
3255 <para>
|
|
3256 SVCD:
|
|
3257 <screen>
|
|
3258 -of mpeg -mpegopts format=xsvcd
|
|
3259 </screen>
|
|
3260 </para>
|
|
3261
|
|
3262 <para>
|
|
3263 DVD:
|
|
3264 <screen>
|
|
3265 -of mpeg -mpegopts format=dvd
|
|
3266 </screen>
|
|
3267 </para>
|
|
3268
|
|
3269 <sect3 id="menc-feat-vcd-dvd-output-aspect">
|
|
3270 <title>Poměr stran</title>
|
|
3271 <para>
|
|
3272 Argument aspect z <option>-lavcopts</option> se používá pro zakódování
|
|
3273 poměru stran souboru.
|
|
3274 Během přehrávání je pak tato hodnota použita pro obnovení videa na
|
|
3275 správnou velikost.
|
|
3276 </para>
|
|
3277
|
|
3278 <para>
|
|
3279 16:9 neboli "Widescreen"
|
|
3280 <screen>
|
|
3281 -lavcopts aspect=16/9
|
|
3282 </screen>
|
|
3283 </para>
|
|
3284
|
|
3285 <para>
|
|
3286 4:3 neboli "Fullscreen"
|
|
3287 <screen>
|
|
3288 -lavcopts aspect=4/3
|
|
3289 </screen>
|
|
3290 </para>
|
|
3291
|
|
3292 <para>
|
|
3293 2.35:1 neboli "Cinemascope" NTSC
|
|
3294 <screen>
|
|
3295 -vf scale=720:368,expand=720:480 -lavcopts aspect=16/9
|
|
3296 </screen>
|
|
3297 Pro výpočet správné velikosti pro škálování, použijte rozšířenou NTSC šířku
|
|
3298 854/2.35 = 368
|
|
3299 </para>
|
|
3300
|
|
3301 <para>
|
|
3302 2.35:1 neboli "Cinemascope" PAL
|
|
3303 <screen>
|
|
3304 -vf scale="720:432,expand=720:576 -lavcopts aspect=16/9
|
|
3305 </screen>
|
|
3306 Pro výpočet správné velikosti pro škálování, použijte rozšířenou PAL šířku
|
|
3307 1024/2.35 = 432
|
|
3308 </para>
|
|
3309
|
|
3310 </sect3>
|
|
3311
|
|
3312 <sect3 id="menc-feat-vcd-dvd-output-srate">
|
|
3313 <title>Převod vzorkovacího kmitočtu</title>
|
|
3314 <para>
|
|
3315 Pokud není vzorkovací kmitočet zvuku takový, jaký je vyžadován
|
|
3316 cílovým formátem, je nutný převod vzorkovacího kmitočtu.
|
|
3317 To zajišťuje použití volby <option>-srate</option> spolu se zvukovým filtrem
|
|
3318 <option>-af lavcresample</option>.
|
|
3319 </para>
|
|
3320 <para>
|
|
3321 DVD:
|
|
3322 <screen>
|
|
3323 -srate 48000 -af lavcresample=48000
|
|
3324 </screen>
|
|
3325 </para>
|
|
3326 <para>
|
|
3327 VCD a SVCD:
|
|
3328 <screen>
|
|
3329 -srate 44100 -af lavcresample=44100
|
|
3330 </screen>
|
|
3331 </para>
|
|
3332 </sect3>
|
|
3333 </sect2>
|
|
3334
|
|
3335 <sect2 id="menc-feat-vcd-dvd-lavc">
|
|
3336 <title>Použití libavcodec pro enkódování VCD/SVCD/DVD</title>
|
|
3337
|
|
3338 <sect3 id="menc-feat-vcd-dvd-lavc-intro">
|
|
3339 <title>Úvodem</title>
|
|
3340 <para>
|
|
3341 <systemitem class="library">libavcodec</systemitem> můžete použít pro
|
|
3342 vytvoření videa kompatibilního s VCD/SVCD/DVD použitím příslušných voleb.
|
|
3343 </para>
|
|
3344 </sect3>
|
|
3345
|
|
3346 <sect3 id="menc-feat-vcd-dvd-lavc-options">
|
|
3347 <title>lavcopts</title>
|
|
3348 <para>
|
|
3349 Zde máte seznam polí v <option>-lavcopts</option>, která je nutné
|
|
3350 změnit, abyste dostali video vhodné pro VCD, SVCD,
|
|
3351 nebo DVD:
|
|
3352 </para>
|
|
3353
|
|
3354 <itemizedlist>
|
|
3355 <listitem><para>
|
|
3356 <emphasis role="bold">acodec</emphasis>:
|
|
3357 <option>mp2</option> pro VCD, SVCD nebo PAL DVD;
|
|
3358 <option>ac3</option> je obecně používán pro DVD.
|
|
3359 PCM zvuk může být rovněž použitý pro DVD, ale většinou je to velké plýtvání
|
|
3360 místem.
|
|
3361 Poznamenejme, že MP3 není slučitelné s žádným z těchto formátů, ale
|
|
3362 přehrávače s jeho přehrátím obvykle nemají problém.
|
|
3363 </para></listitem>
|
|
3364
|
|
3365 <listitem><para>
|
|
3366 <emphasis role="bold">abitrate</emphasis>:
|
|
3367 224 pro VCD; do 384 pro SVCD; do 1536 pro DVD, ale obvykle se hodnoty
|
|
3368 pohybují od 192 kbps pro stereo do 384 kbps pro 5.1 kanálový zvuk.
|
|
3369 </para></listitem>
|
|
3370
|
|
3371 <listitem><para>
|
|
3372 <emphasis role="bold">vcodec</emphasis>:
|
|
3373 <option>mpeg1video</option> pro VCD;
|
|
3374 <option>mpeg2video</option> pro SVCD;
|
|
3375 <option>mpeg2video</option> je obvykle použitý pro DVD, ale můžete použít také
|
|
3376 <option>mpeg1video</option> pro CIF rozlišení.
|
|
3377 </para></listitem>
|
|
3378
|
|
3379 <listitem><para>
|
|
3380 <emphasis role="bold">keyint</emphasis>:
|
|
3381 Použitý pro nastavení velikosti GOP.
|
|
3382 18 pro 30fps materiál, nebo 15 pro 25/24 fps materiál.
|
|
3383 Zdá se, že komerční producenti preferují interval mezi klíčovými snímky 12.
|
|
3384 Je možné použít vyšší hodnotu a stále být kompatibilní s většinou
|
|
3385 přehrávačů.
|
|
3386 <option>keyint</option> na 25 by neměla nikdy způsobit potíže.
|
|
3387 </para></listitem>
|
|
3388
|
|
3389 <listitem><para>
|
|
3390 <emphasis role="bold">vrc_buf_size</emphasis>:
|
|
3391 327 pro VCD, 917 pro SVCD a 1835 pro DVD.
|
|
3392 </para></listitem>
|
|
3393
|
|
3394 <listitem><para>
|
|
3395 <emphasis role="bold">vrc_minrate</emphasis>:
|
|
3396 1152, pro VCD. Může být vynecháno pro SVCD a DVD.
|
|
3397 </para></listitem>
|
|
3398
|
|
3399 <listitem><para>
|
|
3400 <emphasis role="bold">vrc_maxrate</emphasis>:
|
|
3401 1152 pro VCD; 2500 pro SVCD; 9800 pro DVD.
|
|
3402 Pro SVCD a DVD, můžete použít nižší hodnoty v závislosti na vašich
|
|
3403 osobních preferencích a potřebách.
|
|
3404 </para></listitem>
|
|
3405
|
|
3406 <listitem><para>
|
|
3407 <emphasis role="bold">vbitrate</emphasis>:
|
|
3408 1152 pro VCD;
|
|
3409 do 2500 pro SVCD;
|
|
3410 do 9800 pro DVD.
|
|
3411 Pro dva poslední formáty by mělo být vbitrate nastaveno podle vlastního
|
|
3412 uvážení.
|
|
3413 Například pokud trváte na umístění asi 20 hodin na DVD, mohli byste použít
|
|
3414 vbitrate=400.
|
|
3415 Výsledná kvalita bude nejspíš hrozná.
|
|
3416 Pokud se pokoušíte dosáhnout maximální možné kvality na DVD, použijte
|
|
3417 vbitrate=9800, ale pak se vám nevejde ani celá hodina záznamu na jednovrstvé
|
|
3418 DVD.
|
|
3419 </para></listitem>
|
|
3420 </itemizedlist>
|
|
3421 </sect3>
|
|
3422
|
|
3423 <sect3 id="menc-feat-vcd-dvd-lavc-examples">
|
|
3424 <title>Příklady</title>
|
|
3425 <para>
|
|
3426 Toto je typická minimální sada <option>-lavcopts</option> pro
|
|
3427 enkódování videa:
|
|
3428 </para>
|
|
3429 <para>
|
|
3430 VCD:
|
|
3431 <screen>
|
|
3432 -lavcopts vcodec=mpeg1video:vrc_buf_size=327:vrc_minrate=1152:\
|
|
3433 vrc_maxrate=1152:vbitrate=1152:keyint=15:acodec=mp2
|
|
3434 </screen>
|
|
3435 </para>
|
|
3436
|
|
3437 <para>
|
|
3438 SVCD:
|
|
3439 <screen>
|
|
3440 -lavcopts vcodec=mpeg2video:vrc_buf_size=917:vrc_maxrate=2500:vbitrate=1800:\
|
|
3441 keyint=15:acodec=mp2
|
|
3442 </screen>
|
|
3443 </para>
|
|
3444
|
|
3445 <para>
|
|
3446 DVD:
|
|
3447 <screen>
|
|
3448 -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:\
|
|
3449 keyint=15:acodec=ac3
|
|
3450 </screen>
|
|
3451 </para>
|
|
3452
|
|
3453 </sect3>
|
|
3454
|
|
3455 <sect3 id="menc-feat-vcd-dvd-lavc-advanced">
|
|
3456 <title>Pokročilé volby</title>
|
|
3457 <para>
|
|
3458 Pro vyšší kvalitu enkódování můžete také přidat kvalitu zlepšující volby
|
|
3459 do lavcopts, jako je <option>trell</option>,
|
|
3460 <option>mbd=2</option> a další.
|
|
3461 Poznamenejme, že <option>qpel</option> a <option>v4mv</option>, které jsou
|
|
3462 často dobré pro MPEG-4, nejsou použitelné s MPEG-1 nebo MPEG-2.
|
|
3463 Pokud se snažíte vytvořit DVD s velmi vasokou kvalitou, může být vhodné
|
|
3464 přidat <option>dc=10</option> do lavcopts.
|
|
3465 Takto to můžete pomoci omezit oběvování bloků ve stálobarevných plochách.
|
|
3466 Podtrženo sečteno, zde máte příklad nastavení lavcopts pro DVD s vyšší
|
|
3467 kvalitou:
|
|
3468 </para>
|
|
3469
|
|
3470 <para>
|
|
3471 <screen>
|
|
3472 -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=8000:\
|
|
3473 keyint=15:trell:mbd=2:precmp=2:subcmp=2:cmp=2:dia=-10:predia=-10:cbp:mv0:\
|
|
3474 vqmin=1:lmin=1:dc=10
|
|
3475 </screen>
|
|
3476 </para>
|
|
3477
|
|
3478 </sect3>
|
|
3479 </sect2>
|
|
3480
|
|
3481 <sect2 id="menc-feat-vcd-dvd-audio">
|
|
3482 <title>Enkódování zvuku</title>
|
|
3483 <para>
|
|
3484 VCD a SVCD podporují zvuk MPEG-1 layer II. Použít můžete
|
|
3485 <systemitem class="library">toolame</systemitem>,
|
|
3486 <systemitem class="library">twolame</systemitem>,
|
|
3487 nebo MP2 enkodér z <systemitem class="library">libavcodec</systemitem>u.
|
|
3488 MP2 libavcodecu je dalek toho, aby byl stejně dobrý jako druhé dvě knihovny,
|
|
3489 avšak měl by být vždy po ruce.
|
|
3490 VCD podporuje pouze zvuk s konstantním datovým tokem (CBR), zatímco SVCD
|
|
3491 podporuje také proměnný datový tok (VBR).
|
|
3492 Používejte VBR opatrně, jelikož některé mizerné stolní přehrávače jej
|
|
3493 nemusí dobře podporovat.
|
|
3494 </para>
|
|
3495
|
|
3496 <para>
|
|
3497 Pro DVD zvuk se používá AC3 kodek z
|
|
3498 <systemitem class="library">libavcodec</systemitem>.
|
|
3499 </para>
|
|
3500
|
|
3501 <sect3 id="menc-feat-vcd-dvd-audio-toolame">
|
|
3502 <title>toolame</title>
|
|
3503 <para>
|
|
3504 Pro VCD a SVCD:
|
|
3505 <screen>
|
|
3506 -oac toolame -toolameopts br=224
|
|
3507 </screen>
|
|
3508 </para>
|
|
3509 </sect3>
|
|
3510
|
|
3511 <sect3 id="menc-feat-vcd-dvd-audio-twolame">
|
|
3512 <title>twolame</title>
|
|
3513 <para>
|
|
3514 Pro VCD a SVCD:
|
|
3515 <screen>
|
|
3516 -oac twolame -twolameopts br=224
|
|
3517 </screen>
|
|
3518 </para>
|
|
3519 </sect3>
|
|
3520
|
|
3521 <sect3 id="menc-feat-vcd-dvd-audio-lavc">
|
|
3522 <title>libavcodec</title>
|
|
3523 <para>
|
|
3524 Pro DVD s 2 kanálovým zvukem:
|
|
3525 <screen>
|
|
3526 -oac lavc -lavcopts acodec=ac3:abitrate=192
|
|
3527 </screen>
|
|
3528 </para>
|
|
3529 <para>
|
|
3530 Pro DVD s 5.1 kanálovým zvukem:
|
|
3531 <screen>
|
|
3532 -channels 6 -oac lavc -lavcopts acodec=ac3:abitrate=384
|
|
3533 </screen>
|
|
3534 </para>
|
|
3535 <para>
|
|
3536 Pro VCD a SVCD:
|
|
3537 <screen>
|
|
3538 -oac lavc -lavcopts acodec=mp2:abitrate=224
|
|
3539 </screen>
|
|
3540 </para>
|
|
3541 </sect3>
|
|
3542
|
|
3543 </sect2>
|
|
3544
|
|
3545 <sect2 id="menc-feat-vcd-dvd-all">
|
|
3546 <title>Spojení všeho dohromady</title>
|
|
3547 <para>
|
|
3548 Tato sekce obsahuje kompletní příkazy pro vytvoření VCD/SVCD/DVD
|
|
3549 kompatibilních videí.
|
|
3550 </para>
|
|
3551
|
|
3552 <sect3 id="menc-feat-vcd-dvd-all-pal-dvd">
|
|
3553 <title>PAL DVD</title>
|
|
3554 <para>
|
|
3555 <screen>
|
|
3556 mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd -vf scale=720:576,\
|
|
3557 harddup -srate 48000 -af lavcresample=48000 -lavcopts vcodec=mpeg2video:\
|
|
3558 vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=15:acodec=ac3:\
|
|
3559 abitrate=192:aspect=16/9 -ofps 25 \
|
|
3560 -o <replaceable>film.mpg</replaceable> <replaceable>film.avi</replaceable>
|
|
3561 </screen>
|
|
3562 </para>
|
|
3563 </sect3>
|
|
3564
|
|
3565 <sect3 id="menc-feat-vcd-dvd-all-ntsc-dvd">
|
|
3566 <title>NTSC DVD</title>
|
|
3567 <para>
|
|
3568 <screen>
|
|
3569 mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd -vf scale=720:480,\
|
|
3570 harddup -srate 48000 -af lavcresample=48000 -lavcopts vcodec=mpeg2video:\
|
|
3571 vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=18:acodec=ac3:\
|
|
3572 abitrate=192:aspect=16/9 -ofps 30000/1001 \
|
|
3573 -o <replaceable>film.mpg</replaceable> <replaceable>film.avi</replaceable>
|
|
3574 </screen>
|
|
3575 </para>
|
|
3576 </sect3>
|
|
3577
|
|
3578 <sect3 id="menc-feat-vcd-dvd-all-pal-ac3-copy">
|
|
3579 <title>PAL AVI obsahující AC3 zvuk do DVD</title>
|
|
3580 <para>
|
|
3581 Pokud již má zdroj AC3 zvuk, použijte -oac copy místo reenkódování.
|
|
3582 <screen>
|
|
3583 mencoder -oac copy -ovc lavc -of mpeg -mpegopts format=dvd -vf scale=720:576,\
|
|
3584 harddup -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:\
|
|
3585 vbitrate=5000:keyint=15:aspect=16/9 -ofps 25 \
|
|
3586 -o <replaceable>film.mpg</replaceable> <replaceable>film.avi</replaceable>
|
|
3587 </screen>
|
|
3588 </para>
|
|
3589 </sect3>
|
|
3590
|
|
3591 <sect3 id="menc-feat-vcd-dvd-all-ntsc-ac3-copy">
|
|
3592 <title>NTSC AVI obsahující AC3 zvuk do DVD</title>
|
|
3593 <para>
|
|
3594 Pokud již má zdroj AC3 zvuk a video je NTSC @ 23.976 fps:
|
|
3595 <screen>
|
|
3596 mencoder -oac copy -ovc lavc -of mpeg -mpegopts format=dvd -vf scale=720:480,\
|
|
3597 harddup -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:\
|
|
3598 vbitrate=5000:keyint=15:aspect=16/9 -ofps 24000/1001 \
|
|
3599 -o <replaceable>film.mpg</replaceable> <replaceable>film.avi</replaceable>
|
|
3600 </screen>
|
|
3601 </para>
|
|
3602 </sect3>
|
|
3603
|
|
3604 <sect3 id="menc-feat-vcd-dvd-all-pal-svcd">
|
|
3605 <title>PAL SVCD</title>
|
|
3606 <para>
|
|
3607 <screen>
|
|
3608 mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xsvcd -vf \
|
|
3609 scale=480:576,harddup -srate 44100 -af lavcresample=44100 -lavcopts \
|
|
3610 vcodec=mpeg2video:mbd=2:keyint=15:vrc_buf_size=917:vrc_minrate=600:\
|
|
3611 vbitrate=2500:vrc_maxrate=2500:acodec=mp2:abitrate=224 -ofps 25 \
|
|
3612 -o <replaceable>film.mpg</replaceable> <replaceable>film.avi</replaceable>
|
|
3613 </screen>
|
|
3614 </para>
|
|
3615 </sect3>
|
|
3616
|
|
3617 <sect3 id="menc-feat-vcd-dvd-all-ntsc-svcd">
|
|
3618 <title>NTSC SVCD</title>
|
|
3619 <para>
|
|
3620 <screen>
|
|
3621 mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xsvcd -vf \
|
|
3622 scale=480:480,harddup -srate 44100 -af lavcresample=44100 -lavcopts \
|
|
3623 vcodec=mpeg2video:mbd=2:keyint=18:vrc_buf_size=917:vrc_minrate=600:\
|
|
3624 vbitrate=2500:vrc_maxrate=2500:acodec=mp2:abitrate=224 -ofps 30000/1001 \
|
|
3625 -o <replaceable>film.mpg</replaceable> <replaceable>film.avi</replaceable>
|
|
3626 </screen>
|
|
3627 </para>
|
|
3628 </sect3>
|
|
3629
|
|
3630 <sect3 id="menc-feat-vcd-dvd-all-pal-vcd">
|
|
3631 <title>PAL VCD</title>
|
|
3632 <para>
|
|
3633 <screen>
|
|
3634 mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xvcd -vf \
|
|
3635 scale=352:288,harddup -srate 44100 -af lavcresample=44100 -lavcopts \
|
|
3636 vcodec=mpeg1video:keyint=15:vrc_buf_size=327:vrc_minrate=1152:vbitrate=1152:\
|
|
3637 vrc_maxrate=1152:acodec=mp2:abitrate=224 -ofps 25 \
|
|
3638 -o <replaceable>film.mpg</replaceable> <replaceable>film.avi</replaceable>
|
|
3639 </screen>
|
|
3640 </para>
|
|
3641 </sect3>
|
|
3642
|
|
3643 <sect3 id="menc-feat-vcd-dvd-all-ntsc-vcd">
|
|
3644 <title>NTSC VCD</title>
|
|
3645 <para>
|
|
3646 <screen>
|
|
3647 mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xvcd -vf \
|
|
3648 scale=352:240,harddup -srate 44100 -af lavcresample=44100 -lavcopts \
|
|
3649 vcodec=mpeg1video:keyint=18:vrc_buf_size=327:vrc_minrate=1152:vbitrate=1152:\
|
|
3650 vrc_maxrate=1152:acodec=mp2:abitrate=224 -ofps 30000/1001 \
|
|
3651 -o <replaceable>film.mpg</replaceable> <replaceable>film.avi</replaceable>
|
|
3652 </screen>
|
|
3653 </para>
|
|
3654 </sect3>
|
|
3655
|
|
3656 </sect2>
|
|
3657
|
|
3658 </sect1>
|
|
3659
|
|
3660 </chapter>
|