MEncoder的基础用法--由多个图片文件转换到视频文件

 

官方站点:

http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-enc-images.html

中文描述:

http://www.mplayerhq.hu/DOCS/HTML/zh_CN/mencoder.html

 


Encoding from multiple input image files (JPEG, PNG, TGA, etc.)

MEncoder is capable of creating movies from one or more JPEG, PNG, TGA, or other image 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:mbd=2:trell -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:mbd=2:trell -oac copy -o output.avi

 

 

Creating an MPEG-4 file from explicit list of JPEG files (list.txt in current directory contains the list of files to use as source, one per line):

mencoder mf://@list.txt -mf w=800:h=600:fps=25:type=jpg /
    -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell -oac copy -o output.avi

 

You can mix different types of images, regardless of the method you use t — individual filenames, wildcard or file with list — provided of course they have the same dimensions. So you can e.g. take title frame from PNG file, and then put a slideshow of your JPEG photos.

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://*.png -mf w=800:h=600:fps=25:type=png -ovc raw -oac copy -o output.avi

 

 

Note

Width must be integer multiple of 4, it is 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

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值