comparison DOCS/encoding.html @ 4919:40b48a0a780e

documented Multifile JPEG/PNG input (-mf)
author gabucino
date Sun, 03 Mar 2002 10:54:03 +0000
parents 9b2b09d3ff8b
children 6cb9d9a1716d
comparison
equal deleted inserted replaced
4918:8e6ccd3e5325 4919:40b48a0a780e
226 226
227 <P>An example, with MJPEG compression :<BR> 227 <P>An example, with MJPEG compression :<BR>
228 <CODE>&nbsp;&nbsp;&nbsp;&nbsp;mencoder -dvd 2 -o title2.avi -ovc lavc -lavcopts vcodec=mjpeg</CODE></P> 228 <CODE>&nbsp;&nbsp;&nbsp;&nbsp;mencoder -dvd 2 -o title2.avi -ovc lavc -lavcopts vcodec=mjpeg</CODE></P>
229 229
230 230
231 <P><B><A NAME=2.4.3.6>2.4.3.6. Encoding from multiple input image files (JPEGs or PNGs)</B></P>
232
233 <P><B>MEncoder</B> is capable of creating movies from one or more JPEG or PNG
234 files. With simple framecopy it can create MJPEG (Motion JPEG) or MPNG
235 (Motion PNG) files.</P>
236
237 <P><B><I>Explanation of the process</I></B></P>
238
239 <P><B>MEncoder</B> <I>decodes</I> the input image(s) with an available MJPEG
240 video codec (when decoding PNGs, it will use the internal PNG decoder). By
241 default it uses <CODE>ffmjpeg</CODE>, so you have to compile with libavcodec
242 support (which is recommended anyways). Its disadvantage is that it can't
243 handle some JPEG types (green image will be encoded for these). Use some
244 external utility to convert those images into edible format.<BR> You can
245 freely choose any other MJPEG decoder, like <CODE>mcmjpg32.dll</CODE>
246 (MainConcept Motion JPEG) if installed, and after checking
247 <CODE>codecs.conf</CODE> and checking the <CODE>videocodec</CODE> line which
248 refers to this file, you'll learn you have to use the <CODE>-vc mjpeg</CODE>
249 option for it.
250 </P>
251
252 <P><B>MEncoder</B> then feeds the decoded image to the chosen video compressor
253 (DivX4, Xvid, ffmpeg msmpeg4, etc...). Watch for the PNG decoder, as
254 currently it can output only to RGB formats, thus can't be used with codecs
255 that require YUV as input, like DivX4 or ffmpeg's msmpeg4.</P>
256
257 <P><B><I>Examples</I></B></P>
258
259 <P>The explanation of the <CODE>-mf</CODE> option can be found below in the
260 global <A HREF=#2.4.5>Options</A> section and in the manpage.</P>
261
262 <P><I>Creating a DivX4 file from all the JPEG files in the current dir :</I><BR>
263 &nbsp;&nbsp;<CODE>mencoder \*.jpg -mf on:w=800:h=600:fps=25 -ovc divx4 -o
264 output.avi</CODE></P>
265
266 <P><I>Creating a Motion JPEG (MJPEG) file from all the JPEG files in the current dir :</I><BR>
267 &nbsp;&nbsp;<CODE>mencoder \*.jpg -mf on:w=800:h=600:fps=25 -ovc copy
268 -o output.avi</CODE></P>
269
270 <P><I>Creating an uncompressed file from all the PNG files in the current dir :</I><BR>
271 &nbsp;&nbsp;<CODE>mencoder \*.png -mf on:w=800:h=600:fps=25:type=png -ovc raw -o
272 output.avi</CODE></P>
273
274 <P><I>Creating a Motion PNG (MPNG) file from all the PNG files in the current dir :</I><BR>
275 &nbsp;&nbsp;<CODE>mencoder \*.png -mf on:w=800:h=600:fps=25:type=png -ovc copy
276 -o output.avi</CODE></P>
277
278
231 <P><B><A NAME=2.4.4>2.4.4. Syntax</B></P> 279 <P><B><A NAME=2.4.4>2.4.4. Syntax</B></P>
232 280
233 <P>&nbsp;&nbsp;<CODE>mencoder [options] [input file] [options] ...</P> 281 <P>&nbsp;&nbsp;<CODE>mencoder [options] [input file] [options] ...</P>
234 282
235 283
316 &nbsp;&nbsp;<B>mp3lame</B> - encode to MP3 (using Lame)<BR> 364 &nbsp;&nbsp;<B>mp3lame</B> - encode to MP3 (using Lame)<BR>
317 </TD> 365 </TD>
318 </TR> 366 </TR>
319 <TR> 367 <TR>
320 <TD><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2> 368 <TD><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2>
369 <I>-mf</I> multifile options</TD>
370 <TD><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2>
371 Used when encoding from multiple JPEG files. Its sub-options are:<BR>
372 &nbsp;&nbsp;<B>on</B> - turns on multifile support<BR>
373 &nbsp;&nbsp;<B>w</B>=&lt;value&gt; - width of the output file<BR>
374 &nbsp;&nbsp;<B>h</B>=&lt;value&gt; - height of the output file<BR>
375 &nbsp;&nbsp;<B>fps</B>=&lt;value&gt; - fps of the output file<BR>
376 &nbsp;&nbsp;<B>type</B>=&lt;value&gt; - type of input files (available types : <CODE>jpeg</CODE>, <CODE>png</CODE>)<BR>
377 </TD>
378 </TR>
379
380 <TR>
381 <TD><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2>
321 <I>-divx4opts</I></TD> 382 <I>-divx4opts</I></TD>
322 <TD><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2> 383 <TD><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2>
323 If encoding to DivX4, you can specify its parameters here, like:<BR> 384 If encoding to DivX4, you can specify its parameters here, like:<BR>
324 &nbsp;&nbsp;<CODE>-divx4opts br=1800:deinterlace:key=250</CODE><BR> 385 &nbsp;&nbsp;<CODE>-divx4opts br=1800:deinterlace:key=250</CODE><BR>
325 Common options: <B>(for full list, check the manpage!)</B><BR> 386 Common options: <B>(for full list, check the manpage!)</B><BR>
326 &nbsp;&nbsp;<B>help</B> - get help<BR> 387 &nbsp;&nbsp;<B>help</B> - get help<BR>
327 &nbsp;&nbsp;<B>br</B>=XXX - specify bitrate in kbit &lt;4-16000&gt; or bit &lt;16001-24000000&gt;<BR> 388 &nbsp;&nbsp;<B>br</B>=&lt;value&gt; - specify bitrate in kbit &lt;4-16000&gt; or bit &lt;16001-24000000&gt;<BR>
328 &nbsp;&nbsp;<B>q</B>=XXXX - quality (1-fastest, 5-best - default 5)<BR> 389 &nbsp;&nbsp;<B>q</B>=&lt;value&gt; - quality (1-fastest, 5-best - default 5)<BR>
329 &nbsp;&nbsp;<B>key</B>=XXXX - keyframe interval<BR> 390 &nbsp;&nbsp;<B>key</B>=&lt;value&gt; - keyframe interval<BR>
330 </TD> 391 </TD>
331 </TR> 392 </TR>
332 <TR> 393 <TR>
333 <TD><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2> 394 <TD><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2>
334 <I>-lavcopts</I></TD> 395 <I>-lavcopts</I></TD>
335 <TD><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2> 396 <TD><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2>
336 If encoding with libavcodec, you can specify its parameters here, like:<BR> 397 If encoding with libavcodec, you can specify its parameters here, like:<BR>
337 &nbsp;&nbsp;<CODE>-lavcopts vcodec=msmpeg4:vbitrate=1800:vhq:keyint=250</CODE><BR> 398 &nbsp;&nbsp;<CODE>-lavcopts vcodec=msmpeg4:vbitrate=1800:vhq:keyint=250</CODE><BR>
338 Common options: <B>(for full list, check the manpage!)</B><BR> 399 Common options: <B>(for full list, check the manpage!)</B><BR>
339 &nbsp;&nbsp;<B>help</B> - get help<BR> 400 &nbsp;&nbsp;<B>help</B> - get help<BR>
340 &nbsp;&nbsp;<B>vcodec</B>=XXX - select videocodec (for the full list, see the libavcodec section above)<BR> 401 &nbsp;&nbsp;<B>vcodec</B>=&lt;value&gt; - select videocodec (for the full list, see the libavcodec section above)<BR>
341 &nbsp;&nbsp;<B>vbitrate</B>=XXX - specify bitrate in kbit &lt;4-16000&gt; or bit &lt;16001-24000000&gt;<BR> 402 &nbsp;&nbsp;<B>vbitrate</B>=&lt;value&gt; - specify bitrate in kbit &lt;4-16000&gt; or bit &lt;16001-24000000&gt;<BR>
342 &nbsp;&nbsp;<B>vhq</B> - high quality<BR> 403 &nbsp;&nbsp;<B>vhq</B> - high quality<BR>
343 &nbsp;&nbsp;<B>keyint</B>=XXX - keyframe interval<BR> 404 &nbsp;&nbsp;<B>keyint</B>=&lt;value&gt; - keyframe interval<BR>
344 </TD> 405 </TD>
345 </TR> 406 </TR>
346 <TR> 407 <TR>
347 <TD><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2> 408 <TD><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2>
348 <I>-lameopts</I></TD> 409 <I>-lameopts</I></TD>
351 &nbsp;&nbsp;<CODE>-lameopts q=3</CODE><BR> 412 &nbsp;&nbsp;<CODE>-lameopts q=3</CODE><BR>
352 &nbsp;&nbsp;<CODE>-lameopts br=192:cbr</CODE><BR> 413 &nbsp;&nbsp;<CODE>-lameopts br=192:cbr</CODE><BR>
353 Common options: <B>(for full list, check the manpage!)</B><BR> 414 Common options: <B>(for full list, check the manpage!)</B><BR>
354 &nbsp;&nbsp;<B>help</B> - get help<BR> 415 &nbsp;&nbsp;<B>help</B> - get help<BR>
355 &nbsp;&nbsp;<B>cbr</B> - select <B>CBR</B> MP3 (default is <B>VBR</B>)<BR> 416 &nbsp;&nbsp;<B>cbr</B> - select <B>CBR</B> MP3 (default is <B>VBR</B>)<BR>
356 &nbsp;&nbsp;<B>br</B>=XXX - specify bitrate in kbit &lt;0-1024&gt; (this is for <B>CBR</B> only!)<BR> 417 &nbsp;&nbsp;<B>br</B>=&lt;value&gt; - specify bitrate in kbit &lt;0-1024&gt; (this is for <B>CBR</B> only!)<BR>
357 &nbsp;&nbsp;<B>q</B>=XXXX - quality (0-highest, 9-fastest - default 0) (this is for <B>VBR</B> only!)<BR> 418 &nbsp;&nbsp;<B>q</B>=&lt;value&gt; - quality (0-highest, 9-fastest - default 0) (this is for <B>VBR</B> only!)<BR>
358 </TD> 419 </TD>
359 </TR> 420 </TR>
360 </TABLE> 421 </TABLE>
361 422
362 <P><B><A NAME=2.4.6>2.4.6. Examples</B></P> 423 <P><B><A NAME=2.4.6>2.4.6. Examples</B></P>