Mercurial > mplayer.hg
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> mencoder -dvd 2 -o title2.avi -ovc lavc -lavcopts vcodec=mjpeg</CODE></P> | 228 <CODE> 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 <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 <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 <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 <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> <CODE>mencoder [options] [input file] [options] ...</P> | 281 <P> <CODE>mencoder [options] [input file] [options] ...</P> |
| 234 | 282 |
| 235 | 283 |
| 316 <B>mp3lame</B> - encode to MP3 (using Lame)<BR> | 364 <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 <B>on</B> - turns on multifile support<BR> | |
| 373 <B>w</B>=<value> - width of the output file<BR> | |
| 374 <B>h</B>=<value> - height of the output file<BR> | |
| 375 <B>fps</B>=<value> - fps of the output file<BR> | |
| 376 <B>type</B>=<value> - 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 <CODE>-divx4opts br=1800:deinterlace:key=250</CODE><BR> | 385 <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 <B>help</B> - get help<BR> | 387 <B>help</B> - get help<BR> |
| 327 <B>br</B>=XXX - specify bitrate in kbit <4-16000> or bit <16001-24000000><BR> | 388 <B>br</B>=<value> - specify bitrate in kbit <4-16000> or bit <16001-24000000><BR> |
| 328 <B>q</B>=XXXX - quality (1-fastest, 5-best - default 5)<BR> | 389 <B>q</B>=<value> - quality (1-fastest, 5-best - default 5)<BR> |
| 329 <B>key</B>=XXXX - keyframe interval<BR> | 390 <B>key</B>=<value> - 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 <CODE>-lavcopts vcodec=msmpeg4:vbitrate=1800:vhq:keyint=250</CODE><BR> | 398 <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 <B>help</B> - get help<BR> | 400 <B>help</B> - get help<BR> |
| 340 <B>vcodec</B>=XXX - select videocodec (for the full list, see the libavcodec section above)<BR> | 401 <B>vcodec</B>=<value> - select videocodec (for the full list, see the libavcodec section above)<BR> |
| 341 <B>vbitrate</B>=XXX - specify bitrate in kbit <4-16000> or bit <16001-24000000><BR> | 402 <B>vbitrate</B>=<value> - specify bitrate in kbit <4-16000> or bit <16001-24000000><BR> |
| 342 <B>vhq</B> - high quality<BR> | 403 <B>vhq</B> - high quality<BR> |
| 343 <B>keyint</B>=XXX - keyframe interval<BR> | 404 <B>keyint</B>=<value> - 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 <CODE>-lameopts q=3</CODE><BR> | 412 <CODE>-lameopts q=3</CODE><BR> |
| 352 <CODE>-lameopts br=192:cbr</CODE><BR> | 413 <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 <B>help</B> - get help<BR> | 415 <B>help</B> - get help<BR> |
| 355 <B>cbr</B> - select <B>CBR</B> MP3 (default is <B>VBR</B>)<BR> | 416 <B>cbr</B> - select <B>CBR</B> MP3 (default is <B>VBR</B>)<BR> |
| 356 <B>br</B>=XXX - specify bitrate in kbit <0-1024> (this is for <B>CBR</B> only!)<BR> | 417 <B>br</B>=<value> - specify bitrate in kbit <0-1024> (this is for <B>CBR</B> only!)<BR> |
| 357 <B>q</B>=XXXX - quality (0-highest, 9-fastest - default 0) (this is for <B>VBR</B> only!)<BR> | 418 <B>q</B>=<value> - 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> |
