使用ffmpeg进行.264编码的相关文章比较少,google了一下,特总结如下: qscale的取值可以是0.01-255但实际使用超过50就很糟糕了ffmpeg的cbr模式可以把码率控制的不错,但是vbr无法限制最高码率(虽然有max的设置,但是程序没有实现)x264标准的封装是x264+aac in flv或者x264+aac in MP4 接下来说明下ffmpeg命令行的语法规则(本块内容来自2009-03-02官方文档):语法规则结构: ffmpeg [[infile [Read more...]

通过 ffmpeg 无损剪切/拼接视频

剪切/拼接视频文件是一种常见需求。在线视频网站现在往往将一个视频文件分割成 n 段,以减少流量消耗。使用 DownloadHelper/DownThemAll 这类工具下载下来的往往就是分割后的文件。能实现剪切/拼接视频文件的工具多种多样,但往往都需要进行视频重编码(transcoding),这就不可避免的带来了视频质量上的损耗,更不用提那长的令人发指的转换时间了… 其实借助 ffmpeg 我们就可以在不进行视频重编码的情况下完成此类任务: 剪切: ffmpeg -i input.mp4 [Read more...]

Seeking with FFmpeg

Cutting small sections To extract only a small segment in the middle of a movie, it can be used in combination with -t which specifies the duration, like -ss 60 -t 10 to capture from second 60 to 70. Or you can use [Read more...]

How to concatenate (join, merge) media files

Concat demuxer The concat demuxer was added to FFmpeg 1.1. You can read about it in the documentation. Instructions Create a file mylist.txt with all the files you want to have concatenated in the following form (lines starting with [Read more...]

FFMPEG fields drop and dup

"I was wondering about the meaning of drop and dup at the output of ffmpeg? What is their meaning?" "Drop" means it has dropped a frame during encoding. "Dup" means it has duplicated a frame during [Read more...]