MEncoder的基础用法--由多个图片文件转换到视频文件
2010-04-22 22:45
337 查看
官方站点:
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:
MEncoder decodes the input image(s) with
libjpeg(when decoding PNGs, it will use
libpng).
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 [code]output.avi
[/code]
Creating an MPEG-4 file from some JPEG files in the current directory:
mencoder mf://[code]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
[/code]
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://[code]@list.txt-mf w=800:h=600:fps=25:type=jpg /
-ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell -oac copy -o
output.avi
[/code]
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 [code]output.avi
[/code]
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 [code]output.avi
[/code]
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 [code]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 [code]output.avi
相关文章推荐
- 视频文件转换为flv的完整解决方案(ffmpeg、mencoder)
- 视频文件转换为flv的完整解决方案(ffmpeg、mencoder)
- MEncoder的基础用法—6.8. 从多个输入图像文件进行编码(JPEG, PNG, TGA等)
- 基于java的图片文件格式转换和线性缩放-Java基础-Java-编程开发
- MEncoder的基础用法—6.2. 选择输入文件或设备
- MEncoder的基础用法——6.9. 将DVD子标题提取到VOBsub文件
- [转]截取视频文件第一桢的图片和转换视频格式文件为flv(支持文件格式:asf,avi,mpg,flv,3gp,mov,wmv)
- ASP.NET上传视频文件同时转换为flv并且抓取第一帧生面图片源码分析
- 视频文件转换为flv的完整解决方案(ffmpeg、mencoder)
- [转]截取视频文件第一桢的图片和转换视频格式文件为flv(支持文件格式:asf,avi,mpg,flv,3gp,mov,wmv)
- MEncoder的基础用法—6.10. 保持视频画面比例
- 网络视频文件处理:格式转换Flv、截取图片
- mencoder把图片和音频文件合成视频
- ASP.NET上传视频文件同时转换为flv并且抓取第一帧生成图片
- MEncoder的基础用法—6.4. 编码为Sony PSP视频格式
- 截取视频文件第一桢的图片和转换视频格式文件为flv(支持文件格式:asf,avi,mpg,flv,3gp,mov,wmv)
- 截取视频文件第一桢的图片和转换视频格式文件为flv(支持文件格式:asf,avi,mpg,flv,3gp,mov,wmv)
- html5基础标签(html5视频标签 html5新标签用法)
- 应用ffmpeg进行视频文件格式转换
- Confluence 为图片,视频,音频和文档文件使用自动完成