| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 论坛
 上传资源
上传编程相关的资源,源源不断赚取资源分,以备将来下载之需
kkjjww
文件大小:3.72 MB
文件类型:rar
发布时间:2013-03-21 09:42:49
需资源分:2
下载次数:67
Tag:FFmpeg
::资源简介::
前30帧转换成一个Animated Gif
ffmpeg -i test.asf -vframes 30 -y -f gif a.gif
ffmpeg支持多种文件格式和多种音频、视频编码器,可参考ffmepg格式详解,(附:常见视频文件格式详解)
[编辑]
视频文件截图
截取一张352x240尺寸大小的,格式为jpg的图片
ffmpeg -i test.asf -y -f image2 -t 0.001 -s 352x240 a.jpg
把视频的前30帧转换成一个Animated Gif
ffmpeg -i test.asf -vframes 30 -y -f gif a.gif
截取指定时间的缩微图
ffmpeg -i test.avi -y -f image2 -ss 8 -t 0.001 -s 350x240 test.jpg
-ss后跟的时间单位为秒
转换文件为3GP格式
ffmpeg -y -i test.mpeg -bitexact -vcodec h263 -b 128 -r 15 -s 176x144
 -acodec aac -ac 2 -ar 22500 -ab 24 -f 3gp test.3gp

ffmpeg -y -i test.wmv -ac 1 -acodec libamr_nb -ar 8000 -ab 12200 -s 176x144 -b 128 -r 15 test.3gp
[编辑]
视频格式转换
如何使用 ffmpeg 编码得到高质量的视频
ffmpeg.exe -i "D:\Video\Fearless\Fearless.avi" -target film-dvd -s 720x352
 -padtop 64 -padbottom 64 -maxrate 7350000 -b 3700000 -sc_threshold 1000000000
 -trellis -cgop -g 12 -bf 2 -qblur 0.3 -qcomp 0.7 -me full -dc 10 -mbd 2
 -aspect 16:9 -pass 2 -passlogfile "D:\Video\ffmpegencode" -an -f mpeg2video "D:\Fearless.m2v"
转换指定格式文件到FLV格式
ffmpeg.exe -i test.mp3 -ab 56 -ar 22050 -b 500 -r 15 -s 320x240 f:\test.flv
ffmpeg.exe -i test.wmv -ab 56 -ar 22050 -b 500 -r 15 -s 320x240 f:\test.flv
转码解密的VOB
ffmpeg -i snatch_1.vob -f avi -vcodec mpeg4 -b 800 -g 300 -bf 2 -acodec mp3 -ab 128 snatch.avi
上面的命令行将vob的文件转化成avi文件,mpeg4的视频和mp3的音频。注意命令中使用了B帧,所以mpeg4流是divx5兼容的。GOP大小是300意味着29.97帧频下每10秒就有INTRA帧。该映射在音频语言的DVD转码时候尤其有用。
同时编码到几种格式并且在输入流和输出流之间建立映射
ffmpeg -i /tmp/a.wav -ab 64 /tmp/a.mp2 -ab 128 /tmp/b.mp2 -map 0:0 -map 0:0
上面的命令行转换一个64Kbits 的a.wav到128kbits的a.mp2 ‘-map file:index’在输出流的顺序上定义了哪一路输入流是用于每一个输出流的。
转换文件为3GP格式
ffmpeg -i test.avi -y -b 20 -s sqcif -r 10 -acodec amr_wb -ab 23.85 -ac 1 -ar 16000 test.3gp
注:如果要转换为3GP格式,则ffmpeg在编译时必须加上–enable-amr_nb –enable-amr_wb,详细内容可参考:转换视频为3GPP格式
转换文件为MP4格式(支持iPhone/iTouch)
ffmpeg  -y  -i input.wmv  -f mp4 -async 1-s 480x320  -acodec libfaac -vcodec libxvid  -qscale 7 -dts_delta_threshold 1 output.mp4
ffmpeg  -y  -i source_video.avi input -acodec libfaac -ab 128000 -vcodec mpeg4 -b 1200000 -mbd 2 -flags +4mv+trell -aic 2 -cmp 2 -subcmp 2 -s 320x180 -title X final_video.mp4
将一段音频与一段视频混合
ffmpeg -i son.wav -i video_origine.avi video_finale.mpg
将一段视频转换为DVD格式
ffmpeg -i source_video.avi -target pal-dvd -ps 2000000000 -aspect 16:9 finale_video.mpeg
注:target pal-dvd : Output format ps 2000000000 maximum size for the output file, in bits (here, 2 Gb) aspect 16:9 : Widescreen
转换一段视频为DivX格式
ffmpeg -i video_origine.avi -s 320x240 -vcodec msmpeg4v2 video_finale.avi
Turn X images to a video sequence
ffmpeg -f image2 -i image%d.jpg video.mpg
注:This command will transform all the images from the current directory (named image1.jpg, image2.jpg, etc...) to a video file named video.mpg.
Turn a video to X images
ffmpeg -i video.mpg image%d.jpg
注:This command will generate the files named image1.jpg, image2.jpg, ...
The following image formats are also availables : PGM, PPM, PAM, PGMYUV, JPEG, GIF, PNG, TIFF, SGI.
::下载地址::

BCCN本地下载 
开通VIP
可免资源分下载所有资源
::下载本资源的人也下载了::
::作者其它资源::
 
>> 评论
 
热门Tag:
 
编程中国 版权所有,并保留所有权利。 在线客服
微信扫码咨询

Powered by BCCN 1.020, Processed in 0.383673 second(s)
Copyright©2010-2024, BCCN.NET, All Rights Reserved

在线客服
微信扫码咨询