7.6. Encoding from multiple input image files (JPEG, PNG, TGA, SGI)
Пред. | Глава 7. Encoding with MEncoder | След.

## 7.6. Encoding from multiple input image files (JPEG, PNG, TGA, SGI)

MEncoder is capable of creating movies from one or more JPEG, PNG or TGA files. With simple framecopy it can create MJPEG (Motion JPEG), MPNG (Motion PNG) or MTGA (Motion TGA) files.

Explanation of the process:

1. MEncoder decodes the input image(s) with `libjpeg` (when decoding PNGs, it will use `libpng`).

2. MEncoder then feeds the decoded image to the chosen video compressor (DivX4, XviD, FFmpeg msmpeg4, etc.).

Examples. The explanation of the `-mf` option is in the man page.

Creating an MPEG-4 file from all the JPEG files in the current directory:

    mencoder mf://*.jpg -mf w=800:h=600:fps=25:type=jpg -ovc lavc -lavcopts vcodec=mpeg4 -oac copy -o output.avi

Creating an MPEG-4 file from some JPEG files in the current directory:

    mencoder mf://frame001.jpg,frame002.jpg -mf w=800:h=600:fps=25:type=jpg -ovc lavc -lavcopts vcodec=mpeg4 -oac copy -o output.avi

Creating a Motion JPEG (MJPEG) file from all the JPEG files in the current directory:

    mencoder mf://*.jpg -mf w=800:h=600:fps=25:type=jpg -ovc copy -oac copy -o output.avi

Creating an uncompressed file from all the PNG files in the current directory:

    mencoder mf:// -mf w=800:h=600:fps=25:type=png -ovc raw -oac copy -o output.avi

### Замечание

Width must be integer multiple of 4, it's a limitation of the RAW RGB AVI format.

Creating a Motion PNG (MPNG) file from all the PNG files in the current directory:

    mencoder mf://*.png -mf w=800:h=600:fps=25:type=png -ovc copy -oac copy -o output.avi

Creating a Motion TGA (MTGA) file from all the TGA files in the current directory:

    mencoder mf://*.tga -mf w=800:h=600:fps=25:type=tga -ovc copy -oac copy -o output.avi

Пред. | Уровень выше | След.
7.5. Encoding with the libavcodec codec family | Начало | 7.7. Extracting DVD subtitles to VOBsub file