20651
|
1 <?xml version="1.0" encoding="utf-8"?>
|
23997
|
2 <!-- synced with r23983 -->
|
15254
|
3 <chapter id="mencoder">
|
20651
|
4 <title>A <application>MEncoder</application> használatának alapjai</title>
|
15254
|
5
|
|
6 <para>
|
20651
|
7 A <application>MEncoder</application> összes használható kapcsolójához és
|
|
8 a példákhoz kérlek nézd meg a man oldalt. Mindennapi példákért és a számos
|
|
9 kódolási paraméter bővebb leírásáért olvasd el a
|
|
10 <ulink url="../../tech/encoding-tips.txt">kódolási tippeket</ulink>, amiket
|
|
11 számos levelezési lista szálból gyűjtöttünk össze az MPlayer-users-ről.
|
15254
|
12 Kereshetsz az
|
22309
|
13 <ulink url="http://lists.mplayerhq.hu/pipermail/mencoder-users/">archívumban</ulink>,
|
|
14 vagy a nagyon régi dolgok után
|
|
15 <ulink url="http://lists.mplayerhq.hu/pipermail/mplayer-users/">itt</ulink>,
|
20651
|
16 a rengeteg beszélgetés között, melyek a <application>MEncoder</application>rel
|
|
17 történő kódolást több szempontból vizsgálják és kiemelik a problémákat vele
|
15254
|
18 kapcsolatban.
|
|
19 </para>
|
|
20
|
21543
|
21
|
|
22 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
|
23
|
|
24
|
16764
|
25 <sect1 id="menc-feat-selecting-codec">
|
20651
|
26 <title>Codec és konténer formátum kiválasztása</title>
|
16764
|
27
|
|
28 <para>
|
21543
|
29 A kódoláshoz az audió és videó codec-ek a <option>-oac</option> és
|
|
30 <option>-ovc</option> opciókkal adható meg.
|
|
31 Gépeld be ezt a példát:
|
|
32 <screen>mencoder -ovc help</screen>
|
|
33 a gépeden lévő <application>MEncoder</application> által támogatott
|
|
34 videó codec-ek kilistázásához.
|
|
35 A következő választások érhetőek el:
|
16764
|
36 </para>
|
21543
|
37
|
16764
|
38 <para>
|
20651
|
39 Audió codec-ek:
|
16764
|
40 <informaltable frame="all">
|
|
41 <tgroup cols="2">
|
|
42 <thead>
|
20651
|
43 <row><entry>Audió codec neve</entry><entry>Leírás</entry></row>
|
16764
|
44 </thead>
|
|
45 <tbody>
|
21826
|
46 <row>
|
|
47 <entry>mp3lame</entry>
|
|
48 <entry>kódol VBR, ABR vagy CBR MP3-at LAME-mel</entry>
|
|
49 </row>
|
|
50 <row>
|
|
51 <entry>lavc</entry>
|
|
52 <entry>a <link linkend="menc-feat-enc-libavcodec-audio-codecs"><systemitem class="library">libavcodec</systemitem> egyik audió codec-jét használja</link></entry>
|
|
53 </row>
|
|
54 <row>
|
|
55 <entry>faac</entry>
|
|
56 <entry>FAAC AAC audió kódoló</entry>
|
|
57 </row>
|
|
58 <row>
|
|
59 <entry>toolame</entry>
|
|
60 <entry>MPEG Audio Layer 2 kódoló</entry>
|
|
61 </row>
|
|
62 <row>
|
|
63 <entry>twolame</entry>
|
|
64 <entry>tooLAME alapú MPEG Audio Layer 2 kódoló</entry>
|
|
65 </row>
|
|
66 <row>
|
|
67 <entry>pcm</entry>
|
|
68 <entry>tömörítetlen PCM audió</entry>
|
|
69 </row>
|
|
70 <row>
|
|
71 <entry>copy</entry>
|
|
72 <entry>nem kódol újra, csak másolja a tömörített kockákat</entry>
|
|
73 </row>
|
16764
|
74 </tbody>
|
|
75 </tgroup>
|
|
76 </informaltable>
|
|
77 </para>
|
|
78
|
|
79 <para>
|
20651
|
80 Videó codec-ek:
|
16764
|
81 <informaltable frame="all">
|
|
82 <tgroup cols="2">
|
|
83 <thead>
|
20651
|
84 <row><entry>Videó codec neve</entry><entry>Leírás</entry></row>
|
16764
|
85 </thead>
|
|
86 <tbody>
|
21826
|
87 <row>
|
|
88 <entry>lavc</entry>
|
|
89 <entry>a <link linkend="menc-feat-enc-libavcodec-video-codecs"><systemitem class="library">libavcodec</systemitem> egyik videó codec-jét használja</link></entry>
|
|
90 </row>
|
|
91 <row>
|
|
92 <entry>xvid</entry>
|
|
93 <entry>Xvid, MPEG-4 Advanced Simple Profile (ASP) codec</entry>
|
|
94 </row>
|
|
95 <row>
|
|
96 <entry>x264</entry>
|
|
97 <entry>x264, MPEG-4 Advanced Video Coding (AVC), AKA H.264 codec</entry>
|
|
98 </row>
|
|
99 <row>
|
|
100 <entry>nuv</entry>
|
|
101 <entry>nuppel video, néhány realtime alkalmazás használja</entry>
|
|
102 </row>
|
|
103 <row>
|
|
104 <entry>raw</entry>
|
|
105 <entry>tömörítetlen videó képkockák</entry>
|
|
106 </row>
|
|
107 <row>
|
|
108 <entry>copy</entry>
|
|
109 <entry>nem kódol újra, csak másolja a tömörített kockákat</entry>
|
|
110 </row>
|
|
111 <row>
|
|
112 <entry>frameno</entry>
|
|
113 <entry>a 3-lépéses kódolásban használatos (nem javasolt)</entry>
|
|
114 </row>
|
16764
|
115 </tbody>
|
|
116 </tgroup>
|
|
117 </informaltable>
|
|
118 </para>
|
21543
|
119
|
16764
|
120 <para>
|
21543
|
121 A kimeneti konténer formátumokat a <option>-of</option> kapcsolóval
|
|
122 választhatod ki.
|
|
123 Írd be:
|
|
124 <screen>mencoder -of help</screen>
|
|
125 a gépeden lévő <application>MEncoder</application> által támogatott konténerek
|
|
126 kilistázásához.
|
|
127 A következő választások érhetőek el:
|
16764
|
128 </para>
|
21543
|
129
|
16764
|
130 <para>
|
20651
|
131 Konténer formátumok:
|
16764
|
132 <informaltable frame="all">
|
|
133 <tgroup cols="2">
|
|
134 <thead>
|
20651
|
135 <row><entry>Konténer formátum neve</entry><entry>Leírás</entry></row>
|
16764
|
136 </thead>
|
|
137 <tbody>
|
21826
|
138 <row>
|
|
139 <entry>lavf</entry>
|
|
140 <entry>a <systemitem class="library">libavformat</systemitem> által
|
|
141 támogatott valamelyik konténer</entry>
|
|
142 </row>
|
|
143 <row>
|
|
144 <entry>avi</entry>
|
|
145 <entry>Audio-Video Interleaved</entry>
|
|
146 </row>
|
|
147 <row>
|
|
148 <entry>mpeg</entry>
|
|
149 <entry>MPEG-1 és MPEG-2 PS</entry>
|
|
150 </row>
|
|
151 <row>
|
|
152 <entry>rawvideo</entry>
|
|
153 <entry>nyers videó folyam (nincs keverés - csak egy videó folyam)</entry>
|
|
154 </row>
|
|
155 <row>
|
|
156 <entry>rawaudio</entry>
|
|
157 <entry>nyers audió folyam (nincs keverés - csak egy audió folyam)</entry>
|
|
158 </row>
|
16764
|
159 </tbody>
|
|
160 </tgroup>
|
|
161 </informaltable>
|
21826
|
162 Az AVI konténer a <application>MEncoder</application> natív
|
|
163 konténer formátuma, ami azt jelenti, hogy ezt kezeli a legjobban
|
|
164 és hogy a <application>MEncoder</application> ehhez lett tervezve.
|
|
165 Amint fentebb megemlítettük, más konténer formátumok is
|
|
166 használhatóak, de problémákba ütközhetsz a használatuk során.
|
16764
|
167 </para>
|
|
168
|
|
169 <para>
|
20651
|
170 <systemitem class="library">libavformat</systemitem> konténerek:
|
16764
|
171 </para>
|
21543
|
172
|
16764
|
173 <para>
|
21543
|
174 Ha a <systemitem class="library">libavformat</systemitem>-ot választottad
|
|
175 a kimeneti fájl keveréséhez (a <option>-of lavf</option> használatával),
|
|
176 a megfelelő konténer formátum a kimeneti fájl kiterjesztése alapján kerül
|
|
177 megállapításra.
|
21826
|
178 Egy meghatározott konténer formátumot a
|
|
179 <systemitem class="library">libavformat</systemitem>
|
|
180 <option>format</option> kapcsolójával írhatsz elő.
|
16764
|
181
|
|
182 <informaltable frame="all">
|
|
183 <tgroup cols="2">
|
21543
|
184 <thead><row>
|
|
185 <entry><systemitem class="library">libavformat</systemitem> konténer neve</entry>
|
|
186 <entry>Leírás</entry>
|
|
187 </row></thead>
|
16764
|
188 <tbody>
|
21826
|
189 <row>
|
|
190 <entry>mpg</entry>
|
|
191 <entry>MPEG-1 és MPEG-2 PS</entry>
|
|
192 </row>
|
|
193 <row>
|
|
194 <entry>asf</entry>
|
|
195 <entry>Advanced Streaming Format</entry>
|
|
196 </row>
|
|
197 <row>
|
|
198 <entry>avi</entry>
|
|
199 <entry>Audio-Video Interleaved</entry>
|
|
200 </row>
|
|
201 <row>
|
|
202 <entry>wav</entry>
|
|
203 <entry>Waveform Audio</entry>
|
|
204 </row>
|
|
205 <row>
|
|
206 <entry>swf</entry>
|
|
207 <entry>Macromedia Flash</entry>
|
|
208 </row>
|
|
209 <row>
|
|
210 <entry>flv</entry>
|
|
211 <entry>Macromedia Flash video</entry>
|
|
212 </row>
|
|
213 <row>
|
|
214 <entry>rm</entry>
|
|
215 <entry>RealMedia</entry>
|
|
216 </row>
|
|
217 <row>
|
|
218 <entry>au</entry>
|
|
219 <entry>SUN AU</entry>
|
|
220 </row>
|
|
221 <row>
|
|
222 <entry>nut</entry>
|
|
223 <entry>NUT nyílt konténer (kísérleti és még nem a specifikációnak megfelelő)</entry>
|
|
224 </row>
|
|
225 <row>
|
|
226 <entry>mov</entry>
|
|
227 <entry>QuickTime</entry>
|
|
228 </row>
|
|
229 <row>
|
|
230 <entry>mp4</entry>
|
|
231 <entry>MPEG-4 formátum</entry>
|
|
232 </row>
|
|
233 <row>
|
|
234 <entry>dv</entry>
|
|
235 <entry>Sony Digital Video konténer</entry>
|
|
236 </row>
|
16764
|
237 </tbody>
|
|
238 </tgroup>
|
|
239 </informaltable>
|
21543
|
240 Amint láthatod, a <systemitem class="library">libavformat</systemitem>
|
|
241 elég sok konténer formátumba engedélyezi a keverést a
|
|
242 <application>MEncoder</application>-nek.
|
|
243 Sajnos mivel a <application>MEncoder</application> nem úgy lett tervezve
|
|
244 a kezdetektől, hogy az AVI-tól különböző konténer formátumokat is támogassa,
|
|
245 izgulhatsz a kimeneti fájl miatt.
|
|
246 Kérjük ellenőrizd, hogy az audió/videó szinkron rendben van-e és hogy a
|
|
247 fájl lejátszható-e más lejátszókkal is az
|
|
248 <application>MPlayer</application>-en kívül.
|
16764
|
249 </para>
|
|
250
|
23371
|
251 <example id="encode_to_macromedia_flash_format">
|
21826
|
252 <title>kódolás Macromedia Flash formátumba</title>
|
16764
|
253 <para>
|
21543
|
254 Egy Macromedia Flash videó létrehozása, mely lejátszható web böngészőben
|
|
255 a Macromedia Flash plugin-nel:
|
16764
|
256 <screen>
|
21423
|
257 mencoder <replaceable>bemenet.avi</replaceable> -o <replaceable>kimenet.flv</replaceable> -of lavf \
|
|
258 -oac mp3lame -lameopts abr:br=56 -srate 22050 -ovc lavc \
|
|
259 -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3
|
16764
|
260 </screen>
|
|
261 </para>
|
21826
|
262 </example>
|
16764
|
263
|
|
264 </sect1>
|
|
265
|
|
266
|
21543
|
267 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
|
268
|
|
269
|
16764
|
270 <sect1 id="menc-feat-selecting-input">
|
20651
|
271 <title>Bemeneti fájl vagy eszköz kiválasztása</title>
|
16764
|
272
|
|
273 <para>
|
21543
|
274 A <application>MEncoder</application> tud kódolni fájlokból vagy akár
|
|
275 direkt DVD vagy VCD lemezekről is.
|
|
276 A fájlból való kódoláshoz egyszerűen csak add meg a fájl nevét a parancssorban,
|
|
277 vagy a <option>dvd://</option><replaceable>részszám</replaceable> vagy
|
|
278 <option>vcd://</option><replaceable>sávszám</replaceable> eszközt a
|
|
279 DVD részről vagy VCD sávról történő kódoláshoz.
|
|
280 Ha egy DVD-t már átmásoltál a merevlemezedre (használhatod pl. a
|
|
281 <application>dvdbackup</application> ezsközt, mely a legtöbb rendszeren megvan),
|
|
282 és a másolatot akarod elkódolni, akkor is használnod kell a
|
|
283 <option>dvd://</option> szintaxist, a <option>-dvd-device</option>-szal együtt,
|
|
284 amit a lemásolt DVD gyökérkönyvtárának elérési útja követ.
|
16764
|
285
|
21543
|
286 A <option>-dvd-device</option> és <option>-cdrom-device</option>
|
|
287 kapcsolókkal felülbírálhatóak a direkt lemezolvasásnál használt eszközök
|
|
288 elérési útjái is, ha az alapértelmezett
|
|
289 <filename>/dev/dvd</filename> és <filename>/dev/cdrom</filename> nem
|
|
290 működnek a rendszereden.
|
16764
|
291 </para>
|
21543
|
292
|
16764
|
293 <para>
|
21543
|
294 Ha DVD-ről kódolsz, gyakran kívánatos, hogy a kódolni kívánt fejezetet vagy
|
|
295 fejezetek tartományát is megadd.
|
|
296 Ehhez használhatod a <option>-chapter</option> kapcsolót.
|
|
297 Például a <option>-chapter</option> <replaceable>1-4</replaceable>
|
|
298 csak az 1-4 fejezeteket fogja elkódolni a DVD-ről.
|
|
299 Ez különösen hasznos, ha egy 1400 MB-os kódolást csinálsz két CD-re, mivel
|
|
300 meggyőződhetsz róla, hogy a vágás pontosan fejezet határnál lesz és nem
|
|
301 egy jelenet közepén.
|
16764
|
302 </para>
|
21543
|
303
|
16764
|
304 <para>
|
21543
|
305 Ha van támogatott TV felvevő kártyád, tudsz kódolni a TV-in eszközről is.
|
|
306 Használd a <option>tv://</option><replaceable>csatornaszám</replaceable> eszközt
|
|
307 fájlnévként és a <option>-tv</option> kapcoslót a mentési beállítások
|
|
308 megadásához.
|
|
309 A DVB hasonlóképpen működik.
|
16764
|
310 </para>
|
|
311 </sect1>
|
|
312
|
|
313
|
21543
|
314 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
|
315
|
|
316
|
15254
|
317 <sect1 id="menc-feat-mpeg4">
|
21826
|
318 <title>Két menetes MPEG-4 ("DivX") kódolás</title>
|
15254
|
319
|
|
320 <para>
|
21826
|
321 A név abból a tényből ered, hogy ez a módszer a fájlt
|
|
322 <emphasis>kétszer</emphasis> kódolja át. Az első kódolás (szinkronizációs
|
|
323 lépés) létrehoz pár ideiglenes, néhány megabájtos fájlt
|
|
324 (<filename>*.log</filename>), ezeket ne töröld le még (az AVI-t
|
|
325 letörölheted vagy egyszerűen létre sem hozod, a videó
|
|
326 <filename>/dev/null</filename> -ba irányításával). A második lépésben,
|
|
327 a két menetes kimenet fájl lesz létrehozva, az ideiglenes fájlok
|
|
328 bitrátájának felhasználásával. Az eredmény fájlnak sokkal jobb lesz a
|
|
329 képminősége. Ha most hallasz erről először, nézz meg pár a neten
|
|
330 elérhető leírást.
|
15254
|
331 </para>
|
|
332
|
20114
|
333 <example id="copy_audio_track">
|
20651
|
334 <title>audió sáv másolása</title>
|
15254
|
335 <para>
|
21826
|
336 Egy DVD második sávjának két menetes kódolása MPEG-4 ("DivX") AVI-ba az
|
20651
|
337 audió sáv másolásával.
|
15254
|
338 <screen>
|
17694
|
339 mencoder dvd://2 -ovc lavc -lavcopts vcodec=mpeg4:vpass=1 -oac copy -o /dev/null
|
21423
|
340 mencoder dvd://2 -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell:vpass=2 \
|
|
341 -oac copy -o <replaceable>kimenet.avi</replaceable>
|
15254
|
342 </screen>
|
|
343 </para>
|
|
344 </example>
|
|
345
|
20114
|
346 <example id="encode_audio_track">
|
20651
|
347 <title>audió sáv kódolása</title>
|
15254
|
348 <para>
|
21826
|
349 Egy DVD második sávjának két menetes kódolása MPEG-4 ("DivX") AVI-ba az
|
20651
|
350 audió sáv MP3-ba alakításával.
|
|
351 Vigyázz ezzela módszerrel, mivel bizonyos esetekben audió/videó
|
|
352 deszinkronizációhoz vezethet.
|
15254
|
353 <screen>
|
21423
|
354 mencoder dvd://2 -ovc lavc -lavcopts vcodec=mpeg4:vpass=1 \
|
|
355 -oac mp3lame -lameopts vbr=3 -o /dev/null
|
|
356 mencoder dvd://2 -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell:vpass=2 \
|
|
357 -oac mp3lame -lameopts vbr=3 -o <replaceable>kimenet.avi</replaceable>
|
15254
|
358 </screen>
|
|
359 </para>
|
|
360 </example>
|
|
361 </sect1>
|
|
362
|
19288
|
363
|
21543
|
364 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
|
365
|
|
366
|
19288
|
367 <sect1 id="menc-feat-handheld-psp">
|
20651
|
368 <title>Kódolás Sony PSP videó formátumba</title>
|
19288
|
369
|
|
370 <para>
|
21543
|
371 A <application>MEncoder</application> támogatja a Sony PSP videó formátumába
|
|
372 történő kódolást, de a PSP szoftverének változatától függően különböző
|
|
373 korlátok vannak.
|
|
374 Nyugodt lehetsz, ha a következő korlátokat figyelembe veszed:
|
19288
|
375 <itemizedlist>
|
|
376 <listitem><para>
|
20651
|
377 <emphasis role="bold">Bitráta</emphasis>: nem lépheti át az 1500kbps-t,
|
|
378 bár az utóbbi verziók elég jól támogatnak bármilyen bitrátát, feltéve, hogy
|
|
379 a fejlécben nem túl nagy érték van megadva.
|
19288
|
380 </para></listitem>
|
|
381 <listitem><para>
|
20651
|
382 <emphasis role="bold">Méretek</emphasis>: a PSP videó szélességének és
|
|
383 magasságának 16-tal oszthatónak kell lennie és az eredmény szélesség * magasság
|
|
384 értékének <= 64000 kell lennie.
|
|
385 Bizonyos körülmények között lehetséges a nagyobb felbontás PSP-vel történő
|
|
386 lejátszása is.
|
19288
|
387 </para></listitem>
|
|
388 <listitem><para>
|
20651
|
389 <emphasis role="bold">Audió</emphasis>: a mintavételezési frekvenciának 24kHz-nek
|
|
390 kell lennie az MPEG-4 videóknál és 48kHz-nek a H.264-nél.
|
19288
|
391 </para></listitem>
|
|
392 </itemizedlist>
|
|
393 </para>
|
|
394
|
20114
|
395 <example id="encode_for_psp">
|
20651
|
396 <title>kódolás PSP-be</title>
|
19288
|
397 <para>
|
|
398 <screen>
|
21423
|
399 mencoder -ofps 30000/1001 -af resample=24000 -vf harddup -of lavf \
|
23997
|
400 -oac lavc -ovc lavc -lavcopts aglobal=1:vglobal=1:vcodec=mpeg4:acodec=aac \
|
|
401 -lavfopts format=psp \
|
|
402 <replaceable>bemenet.video</replaceable> -o <replaceable>kimenet.psp</replaceable>
|
19288
|
403 </screen>
|
23997
|
404 Figyelj rá, hogy beállíthatod a videó címét a
|
|
405 <option>-info name=<replaceable>FilmCime</replaceable></option> kapcsolóval.
|
19288
|
406 </para>
|
|
407 </example>
|
|
408 </sect1>
|
|
409
|
|
410
|
21543
|
411 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
|
412
|
|
413
|
15254
|
414 <sect1 id="menc-feat-mpeg">
|
20651
|
415 <title>Kódolás MPEG formátumba</title>
|
21826
|
416
|
15254
|
417 <para>
|
21826
|
418 A <application>MEncoder</application> tud készíteni MPEG (MPEG-PS)
|
|
419 formátumú kimeneti fájlokat.
|
|
420 Általában, ha MPEG-1 vagy MPEG-2 videót használsz, az azért van, mert
|
|
421 egy korlátozott formátumhoz kódolsz, mint pl. az SVCD, a VCD vagy a DVD.
|
20651
|
422 Ezen formátumok speciális igényei a
|
|
423 <link linkend="menc-feat-vcd-dvd">VCD és DVD készítési leírásban</link>
|
|
424 megtalálhatóak.
|
15254
|
425 </para>
|
|
426
|
|
427 <para>
|
20651
|
428 A <application>MEncoder</application> kimeneti fájl formátumának megváltoztatásához
|
|
429 használd a <option>-of mpeg</option> kapcsolót.
|
15254
|
430 </para>
|
|
431
|
16764
|
432 <informalexample>
|
15254
|
433 <para>
|
20651
|
434 Példa:
|
15254
|
435 <screen>
|
21423
|
436 mencoder <replaceable>bemenet.avi</replaceable> -of mpeg -ovc lavc -lavcopts vcodec=mpeg1video \
|
|
437 -oac copy <replaceable>egyéb_kapcsolók</replaceable> -o <replaceable>kimenet.mpg</replaceable>
|
15254
|
438 </screen>
|
21826
|
439 Egy MPEG-1-es fájl létrehozása, mely alkalmas minimális multimédia
|
|
440 támogatással rendelkező rendszereken, például alapértelmezett Windows
|
|
441 telepítéseken történő lejátszásra is:
|
16764
|
442 <screen>
|
21423
|
443 mencoder <replaceable>bemenet.avi</replaceable> -of mpeg -mpegopts format=mpeg1:tsaf:muxrate=2000 \
|
|
444 -o <replaceable>kimenet.mpg</replaceable> -oac lavc -lavcoptc acodec=mp2:abitrate=224 -ovc lavc \
|
|
445 -lavcopts vcodec=mpeg1video:vbitrate=1152:keyint=15:mbd=2:aspect=4/3
|
|
446 </screen>
|
|
447 Ugyan ez a <systemitem class="library">libavformat</systemitem> MPEG muxer-ének használatával:
|
|
448 <screen>
|
23997
|
449 mencoder <replaceable>input.avi</replaceable> -o <replaceable>VCD.mpg</replaceable> -ofps 25 -vf scale=352:288,harddup -of lavf \
|
|
450 -lavfopts format=mpg -oac lavc -lavcopts acodec=mp2:abitrate=224 -ovc lavc \
|
21423
|
451 -lavcopts vcodec=mpeg1video:vrc_buf_size=327:keyint=15:vrc_maxrate=1152:vbitrate=1152:vmax_b_frames=0
|
16764
|
452 </screen>
|
15254
|
453 </para>
|
16764
|
454 </informalexample>
|
|
455
|
20651
|
456 <note><title>Tanács:</title>
|
18102
|
457 <para>
|
21543
|
458 Ha valamilyen okból kifolyólag a videó minőség a második lépésben nem
|
|
459 kielégítő, ajánlott újrafuttatnod a videó kódolásod egy másik cél
|
|
460 bitrátával, feltéve, hogy elmentetted az előző lépés statisztikát
|
|
461 tartalmazó fájlját.
|
|
462 Ez azért lehetséges, mert a statisztika fájl elsődleges célja minden
|
|
463 egyes képkocka komplexitásának feljegyzése, ami nem függ erőteljesen
|
|
464 a bitrátától. Azonban vedd figyelembe, hogy akkor kapod a legjobb
|
|
465 minőséget, ha a lépések cél bitrátája nem különbözik nagy mértékben.
|
18102
|
466 </para>
|
|
467 </note>
|
21543
|
468 </sect1>
|
18102
|
469
|
21543
|
470
|
|
471 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
|
472
|
15254
|
473
|
|
474 <sect1 id="menc-feat-rescale">
|
20651
|
475 <title>Filmek átméretezése</title>
|
15254
|
476
|
|
477 <para>
|
21826
|
478 Gyakran szükséged lehet a videó képméretének átméretezésére. Ennek több
|
|
479 oka lehet: fájl méretének csökkentése, hálózati sávszélesség, stb. A
|
|
480 legtöbb ember akkor is végez átméretezést, amikor DVD-ket vagy SVCD-ket
|
|
481 konvertál DivX AVI-ba. Ha át szeretnél méretezni, olvasd el a
|
|
482 <link linkend="aspect">képméret arányok megtartásáról</link> szóló részt.
|
15254
|
483 </para>
|
|
484
|
|
485 <para>
|
20651
|
486 A méretezési eljárást a <literal>scale</literal> videó szűrő végzi:
|
|
487 <option>-vf scale=<replaceable>szélesség</replaceable>:<replaceable>magasság</replaceable></option>.
|
|
488 A minősége beállítható a <option>-sws</option> kapcsolóval.
|
|
489 Ha ez nincs megadva, akkor a <application>MEncoder</application> a 2: bicubic-et használja.
|
15254
|
490 </para>
|
|
491
|
|
492 <para>
|
20651
|
493 Használat:
|
15254
|
494 <screen>
|
21423
|
495 mencoder <replaceable>bemenet.mpg</replaceable> -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell \
|
|
496 -vf scale=640:480 -o <replaceable>kimenet.avi</replaceable>
|
15254
|
497 </screen>
|
|
498 </para>
|
|
499 </sect1>
|
|
500
|
|
501
|
21543
|
502 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
|
503
|
|
504
|
15254
|
505 <sect1 id="menc-feat-streamcopy">
|
20651
|
506 <title>Stream másolás</title>
|
15254
|
507
|
|
508 <para>
|
20651
|
509 <application>MEncoder</application> kétféleképpen tudja kezelni a folyamokat:
|
|
510 <emphasis role="bold">kódolni</emphasis> vagy <emphasis role="bold">másolni</emphasis>
|
|
511 tudja őket. Ez a rész a <emphasis role="bold">másolásról</emphasis> szól.
|
15254
|
512 </para>
|
|
513
|
|
514 <itemizedlist>
|
|
515 <listitem><para>
|
20651
|
516 <emphasis role="bold">Videó stream</emphasis> (<option>-ovc copy</option> kapcsoló):
|
|
517 szép dolgokat lehet vele csinálni :) Például FLI vagy VIVO vagy
|
|
518 MPEG-1 videót tenni (nem konvertálni!) AVI fájlba! Természetesen csak az
|
|
519 <application>MPlayer</application> tudja lejátszani az ilyen fájlokat :) Ennek
|
|
520 valószínűleg gyakorlati haszna nincs. Ésszerűbben: a videó stream másolása
|
|
521 hasznos lehet például ha csak az audió stream-et kell kódolni (például
|
|
522 tömörítetlen PCM-et MP3-ba).
|
21543
|
523 </para></listitem>
|
15254
|
524 <listitem><para>
|
20651
|
525 <emphasis role="bold">Audió stream</emphasis> (<option>-oac copy</option> kapcsoló):
|
|
526 őszintén szólva... Bele lehet mixelni egy külső audió fájlt (MP3, WAV) a
|
|
527 kimeneti stream-be. Használd a
|
|
528 <option>-audiofile <replaceable>fájlnév</replaceable></option> kapcsolót
|
15254
|
529 ehhez.
|
21543
|
530 </para></listitem>
|
15254
|
531 </itemizedlist>
|
16281
|
532
|
|
533 <para>
|
21826
|
534 A <option>-oac copy</option> használatával végrehajtott egyik konténer
|
|
535 formátumból másikba történő másoláshoz szükséges lehet a
|
|
536 <option>-fafmttag</option> kapcsoló, hogy megmaradjon az eredeti fájl
|
|
537 audió formátum tag-je.
|
21543
|
538 Például ha egy NSV fájl AAC audióval AVI konténerbe alakítasz át, az
|
21826
|
539 audió formátum tag hibás lesz és meg kell változtatni. Az audió formátum
|
|
540 tag-ek listáját megtalálod a <filename>codecs.conf</filename> fájlban.
|
16281
|
541 </para>
|
|
542
|
|
543 <para>
|
20651
|
544 Példa:
|
16281
|
545 <screen>
|
21423
|
546 mencoder <replaceable>bemenet.nsv</replaceable> -oac copy -fafmttag 0x706D \
|
|
547 -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell -o <replaceable>kimenet.avi</replaceable>
|
16281
|
548 </screen>
|
|
549 </para>
|
21543
|
550 </sect1>
|
16281
|
551
|
21543
|
552
|
|
553 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
15254
|
554
|
|
555
|
|
556 <sect1 id="menc-feat-enc-images">
|
21543
|
557 <title>Kódolás több bemeneti képfájlból (JPEG, PNG, TGA, stb.)</title>
|
15254
|
558
|
|
559 <para>
|
21826
|
560 A <application>MEncoder</application> képes egy vagy több JPEG, PNG, TGA
|
|
561 vagy más képfájlból film létrehozására. Egy egyszerű framecopy-val MJPEG
|
|
562 (Motion JPEG), MPNG (Motion PNG) vagy MTGA (Motion TGA) fájlokat tud létrehozni.
|
15254
|
563 </para>
|
|
564
|
|
565 <orderedlist>
|
20651
|
566 <title>A folyamat leírása:</title>
|
15254
|
567 <listitem><para>
|
21826
|
568 A <application>MEncoder</application> <emphasis>dekódolja</emphasis> a
|
|
569 bemeneti képe(ke)t a <systemitem class="library">libjpeg</systemitem>-gel
|
|
570 (ha PNG-ket dekódol, akkor a <systemitem class="library">libpng</systemitem>-vel).
|
21543
|
571 </para></listitem>
|
15254
|
572 <listitem><para>
|
21826
|
573 Ezután a <application>MEncoder</application> a dekódolt képeket a
|
|
574 kiválasztott videó tömörítőnek adja át (DivX4, Xvid, FFmpeg msmpeg4, stb.).
|
21543
|
575 </para></listitem>
|
15254
|
576 </orderedlist>
|
|
577
|
|
578 <formalpara>
|
20651
|
579 <title>Példák</title>
|
15254
|
580 <para>
|
20651
|
581 A <option>-mf</option> kapcsoló magyarázata a man oldalon található.
|
15254
|
582
|
|
583 <informalexample>
|
|
584 <para>
|
20651
|
585 Egy MPEG-4-es fájl létrehozása az aktuális könyvtárból található összes
|
|
586 JPEG fájlból:
|
15254
|
587 <screen>
|
21423
|
588 mencoder mf://*.jpg -mf w=800:h=600:fps=25:type=jpg -ovc lavc \
|
|
589 -lavcopts vcodec=mpeg4:mbd=2:trell -oac copy -o <replaceable>kimenet.avi</replaceable>
|
15254
|
590 </screen>
|
|
591 </para>
|
|
592 </informalexample>
|
|
593
|
|
594 <informalexample>
|
|
595 <para>
|
20651
|
596 Egy MPEG-4 fájl létrehozása néhány JPEG fájlból az aktuális könyvtárban:
|
15254
|
597 <screen>
|
21423
|
598 mencoder mf://<replaceable>frame001.jpg,frame002.jpg</replaceable> -mf w=800:h=600:fps=25:type=jpg \
|
|
599 -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell -oac copy -o <replaceable>kimenet.avi</replaceable>
|
17694
|
600 </screen>
|
|
601 </para>
|
|
602 </informalexample>
|
|
603
|
|
604 <informalexample>
|
|
605 <para>
|
21826
|
606 Egy MPEG-4 fájl létrehozása JPEG fájlok explicit listájából (az aktuális könyvtárban
|
|
607 lévő lista.txt tartalmazza a forrásként felhasználandó fájlokat, soronként egyet):
|
17694
|
608 <screen>
|
|
609 mencoder mf://<replaceable>@lista.txt</replaceable> -mf w=800:h=600:fps=25:type=jpg \
|
21423
|
610 -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell -oac copy -o <replaceable>kimenet.avi</replaceable>
|
15254
|
611 </screen>
|
|
612 </para>
|
|
613 </informalexample>
|
|
614
|
21826
|
615 Különböző típusú képeket is használhatsz, függetlenül a használt módszertől
|
|
616 — egyedi fájlnevek, helyettesítő karakterek vagy fájl lista — feltéve
|
|
617 természetesen, hogy a képméretek azonosak.
|
|
618 Így például a cím kép lehet egy PNG fájl, majd a bemutató
|
|
619 készülhet JPEG fényképekből.
|
|
620
|
15254
|
621 <informalexample>
|
|
622 <para>
|
21826
|
623 Egy Motion JPEG (MJPEG) fájl készítése az aktuális könyvtár összes
|
|
624 JPEG fájlából:
|
15254
|
625 <screen>
|
17694
|
626 mencoder mf://*.jpg -mf w=800:h=600:fps=25:type=jpg -ovc copy -oac copy -o <replaceable>kimenet.avi</replaceable>
|
15254
|
627 </screen>
|
|
628 </para>
|
|
629 </informalexample>
|
|
630
|
|
631 <informalexample>
|
|
632 <para>
|
20651
|
633 Egy tömörítetlen fájl létrehozása az aktuális könyvtár összes PNG fájlából:
|
15254
|
634 <screen>
|
17694
|
635 mencoder mf://*.png -mf w=800:h=600:fps=25:type=png -ovc raw -oac copy -o <replaceable>kimenet.avi</replaceable>
|
15254
|
636 </screen>
|
|
637 </para>
|
|
638 </informalexample>
|
|
639
|
|
640 <note><para>
|
21826
|
641 A szélességnek 4 egész többszörösének kell lennie, ez a RAW RGB AVI
|
|
642 formátum megszorítása.
|
15254
|
643 </para></note>
|
|
644
|
|
645 <informalexample>
|
|
646 <para>
|
21826
|
647 Egy Motion PNG (MPNG) fájl létrehozása az aktuális könyvtár PNG
|
|
648 fájlaiból:
|
15254
|
649 <screen>
|
21543
|
650 mencoder mf://*.png -mf w=800:h=600:fps=25:type=png -ovc copy -oac copy -o <replaceable>kimenet.avi</replaceable><!--
|
15254
|
651 --></screen>
|
|
652 </para>
|
|
653 </informalexample>
|
|
654
|
|
655 <informalexample>
|
|
656 <para>
|
21826
|
657 Egy Motion TGA (MTGA) fájl létrehozása az aktuális könyvtár összes
|
|
658 TGA fájlából:
|
15254
|
659 <screen>
|
17694
|
660 mencoder mf://*.tga -mf w=800:h=600:fps=25:type=tga -ovc copy -oac copy -o <replaceable>kimenet.avi</replaceable><!--
|
15254
|
661 --></screen>
|
|
662 </para>
|
|
663 </informalexample>
|
|
664 </para>
|
|
665 </formalpara>
|
|
666 </sect1>
|
|
667
|
|
668
|
21543
|
669 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
|
670
|
|
671
|
15254
|
672 <sect1 id="menc-feat-extractsub">
|
20651
|
673 <title>DVD felirat elmentése VOBsub fájlba</title>
|
15254
|
674
|
|
675 <para>
|
20651
|
676 A <application>MEncoder</application> képes a feliratok kiszedésére
|
|
677 a DVD-kből és elmentésére VOBsub formátumú fájlokba. Ezek két fájlból
|
|
678 állnak, <filename>.idx</filename> és <filename>.sub</filename> kiterjesztéssel,
|
|
679 és általában egy <filename>.rar</filename> archívba vannak becsomagolva.
|
|
680 Az <application>MPlayer</application> le tudja ezeket játszani a
|
|
681 <option>-vobsub</option> és a <option>-vobsubid</option> kapcsolókkal.
|
15254
|
682 </para>
|
|
683
|
|
684 <para>
|
20651
|
685 Meg kell adnod a kimeneti fájlok fájlnevét (az <filename>.idx</filename> vagy
|
|
686 <filename>.sub</filename> kiterjesztés nélkül) a
|
|
687 <option>-vobsubout</option> kapcsolóval és az ezen felirathoz tartozó
|
|
688 indexet a kimeneti fájlokban a <option>-vobsuboutindex</option>-szel.
|
15254
|
689 </para>
|
|
690
|
|
691 <para>
|
20651
|
692 Ha a bemenet nem DVD, akkor a <option>-ifo</option> kapcsolót kell
|
|
693 használnod ahhoz, hogy megadd, hogy <filename>.ifo</filename> fájl
|
|
694 szükséges a kimeneti <filename>.idx</filename> elkészítéséhez.
|
15254
|
695 </para>
|
|
696
|
|
697 <para>
|
20651
|
698 Ha a bemenet nem DVD és nincs <filename>.ifo</filename> fájlod,
|
|
699 a <option>-vobsubid</option> kapcsolót kell használnod, hogy megadd,
|
|
700 milyen nyelv id-t kell beletenni az <filename>.idx</filename> fájlba.
|
15254
|
701 </para>
|
|
702
|
|
703 <para>
|
20651
|
704 Mindkét esetben az éppen futó felirat hozzáíródik a <filename>.idx</filename>
|
|
705 és <filename>.sub</filename> fájlokhoz, amennyiben azok már léteznek. Így
|
|
706 ezeket le kell törölnöd, mielőtt nekiállnál.
|
15254
|
707 </para>
|
|
708
|
20114
|
709 <example id="copying_two_subtitles_from_a_dvd_while_doing_two_pass_encoding">
|
20651
|
710 <title>Két felirat másolása egy DVD-ről két menetes kódolás közben</title>
|
15254
|
711 <screen>
|
21423
|
712 rm <replaceable>subtitles.idx</replaceable> <replaceable>subtitles.sub</replaceable>
|
|
713 mencoder dvd://1 -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vpass=1 \
|
|
714 -vobsubout <replaceable>subtitles</replaceable> -vobsuboutindex 0 -sid 2
|
|
715 mencoder dvd://1 -oac copy -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell:vpass=2 \
|
|
716 -vobsubout <replaceable>subtitles</replaceable> -vobsuboutindex 1 -sid 5<!--
|
15254
|
717 --></screen>
|
|
718 </example>
|
|
719
|
20114
|
720 <example id="copying_a_french_subtitle_from_an_mpeg_file">
|
20651
|
721 <title>Francia felirat másolása egy MPEG fájlból</title>
|
15254
|
722 <screen>
|
21423
|
723 rm <replaceable>subtitles.idx</replaceable> <replaceable>subtitles.sub</replaceable>
|
|
724 mencoder <replaceable>movie.mpg</replaceable> -ifo <replaceable>movie.ifo</replaceable> -vobsubout <replaceable>subtitles</replaceable> -vobsuboutindex 0 \
|
|
725 -vobsuboutid fr -sid 1 -nosound -ovc copy
|
15528
|
726 </screen>
|
15254
|
727 </example>
|
21543
|
728 </sect1>
|
15254
|
729
|
21543
|
730
|
|
731 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
|
732
|
15254
|
733
|
|
734 <sect1 id="aspect">
|
20651
|
735 <title>Képarány megtartása</title>
|
21826
|
736
|
15254
|
737 <para>
|
20651
|
738 A DVD-s és az SVCD-s (pl. MPEG-1/2) fájlokban van egy képméret arány érték, ami
|
|
739 leírja, hogy a lejátszónak hogyan kell méreteznie a videó stream-et, így az
|
|
740 embereknek nem lesz tojás fejük (pl.: 480x480 + 4:3 = 640x480). Ennek ellenére AVI-ba
|
|
741 (DivX) történő kódoláskor figyelembe kell venned, hogy az AVI fejléc nem tárolja ezt
|
|
742 az értéket. A film átméretezése undorító és időigényes, kell, hogy legyen egy jobb
|
|
743 megoldás!
|
15254
|
744 </para>
|
|
745
|
|
746 <para>Van is.</para>
|
|
747
|
|
748 <para>
|
20651
|
749 Az MPEG-4-nek van egy egyedülálló sajátossága: a videó stream tartalmazhatja
|
|
750 a szükséges képarányt. Igen, úgy mint az MPEG-1/2 (DVD, SVCD) és a H.263 fájlok.
|
|
751 Sajnos azonban kevés videó lejtászó van az <application>MPlayer</application>en
|
|
752 kívül, ami támogatná ezt az attribútumot.
|
15254
|
753 </para>
|
|
754
|
|
755 <para>
|
20651
|
756 Ez a tulajdonság csak a
|
15254
|
757 <link linkend="ffmpeg"><systemitem class="library">libavcodec</systemitem></link>
|
20651
|
758 <systemitem>mpeg4</systemitem> codec-jével használható. Tartsd észben: habár
|
|
759 az <application>MPlayer</application> hibátlanul lejátsza a létrehozott
|
|
760 fájlt, a többi lejátszó lehet, hogy rossz képarányt fog használni.
|
15254
|
761 </para>
|
|
762
|
|
763 <para>
|
20651
|
764 Ajánlott levágni a fekete sávokat a film képe felett és alatt.
|
|
765 Lásd a man oldalt a <systemitem>cropdetect</systemitem> és a
|
|
766 <systemitem>crop</systemitem> szűrők használatához.
|
15254
|
767 </para>
|
|
768
|
|
769 <para>
|
20651
|
770 Használat
|
21423
|
771 <screen>mencoder <replaceable>sample-svcd.mpg</replaceable> -vf crop=714:548:0:14 -oac copy -ovc lavc \
|
|
772 -lavcopts vcodec=mpeg4:mbd=2:trell:autoaspect -o <replaceable>kimenet.avi</replaceable></screen>
|
15254
|
773 </para>
|
|
774 </sect1>
|
|
775
|
|
776 </chapter>
|