Disabled.
‘variance (1)’
Variance AQ (complexity mask).
‘autovariance (2)’
Auto-variance AQ (experimental).
aq-strength (aq-strength)
Set AQ strength, reduce blocking and blurring in flat and textured areas.
psy
Use psychovisual optimizations when set to 1. When set to 0, it has the same effect as x264’s --no-psy option.
psy-rd (psy-rd)
Set strength of psychovisual optimization, in psy-rd:psy-trellis format.
rc-lookahead (rc-lookahead)
Set number of frames to look ahead for frametype and ratecontrol.
weightb
Enable weighted prediction for B-frames when set to 1. When set to 0, it has the same effect as x264’s --no-weightb option.
weightp (weightp)
Set weighted prediction method for P-frames. Possible values:
‘none (0)’
Disabled
‘simple (1)’
Enable only weighted refs
‘smart (2)’
Enable both weighted refs and duplicates
ssim (ssim)
Enable calculation and printing SSIM stats after the encoding.
intra-refresh (intra-refresh)
Enable the use of Periodic 定期的Intra Refresh instead of IDR frames when set to 1.
avcintra-class (class)
Configure the encoder to generate AVC-Intra. Valid values are 50,100 and 200
bluray-compat (bluray-compat)
Configure the encoder to be compatible with the bluray standard. It is a shorthand for setting "bluray-compat=1 force-cfr=1".
b-bias (b-bias)
Set the influence on how often B-frames are used.
b-pyramid (b-pyramid)
Set method for keeping of some B-frames as references. Possible values:
‘none (none)’
Disabled.
‘strict (strict)’
Strictly hierarchical pyramid.
‘normal (normal)’
Non-strict (not Blu-ray compatible).
mixed-refs
Enable the use of one reference per partition, as opposed to one reference per macroblock when set to 1. When set to 0, it has the same effect as x264’s --no-mixed-refs option.
8x8dct
Enable adaptive spatial transform (high profile 8x8 transform) when set to 1. When set to 0, it has the same effect as x264’s --no-8x8dct option.
fast-pskip
Enable early SKIP detection on P-frames when set to 1. When set to 0, it has the same effect as x264’s --no-fast-pskip option.
aud (aud)
Enable use of access unit delimiters when set to 1.
mbtree
Enable use macroblock tree ratecontrol when set to 1. When set to 0, it has the same effect as x264’s --no-mbtree option.
deblock (deblock)
Set loop filter parameters, in alpha:beta form.
cplxblur (cplxblur)
Set fluctuations reduction in QP (before curve compression).
partitions (partitions)
Set partitions to consider as a comma-separated list of. Possible values in the list:
‘p8x8’
8x8 P-frame partition.
‘p4x4’
4x4 P-frame partition.
‘b8x8’
4x4 B-frame partition.
‘i8x8’
8x8 I-frame partition.
‘i4x4’
4x4 I-frame partition. (Enabling ‘p4x4’ requires ‘p8x8’ to be enabled. Enabling ‘i8x8’ requires adaptive spatial transform (8x8dct option) to be enabled.)
‘none (none)’
Do not consider any partitions.
‘all (all)’
Consider every partition.
direct-pred (direct)
Set direct MV prediction mode. Possible values:
‘none (none)’
Disable MV prediction.
‘spatial (spatial)’
Enable spatial predicting.
‘temporal (temporal)’
Enable temporal predicting.
‘auto (auto)’
Automatically decided.
slice-max-size (slice-max-size)
Set the limit of the size of each slice in bytes. If not specified but RTP payload size (ps) is specified, that is used.
stats (stats)
Set the file name for multi-pass stats.
nal-hrd (nal-hrd)
Set signal HRD information (requires vbv-bufsize to be set). Possible values:
‘none (none)’
Disable HRD information signaling.
‘vbr (vbr)’
Variable bit rate.
‘cbr (cbr)’
Constant bit rate (not allowed in MP4 container).
x264opts (N.A.)
Set any x264 option, see x264 --fullhelp for a list.
Argument is a list of key=value couples separated by ":". In filter and psy-rd options that use ":" as a separator themselves, use "," instead. They accept it as well since long ago but this is kept undocumented for some reason.
For example to specify libx264 encoding options with ffmpeg:
ffmpeg -i foo.mpg -vcodec libx264 -x264opts keyint=123:min-keyint=20 -an out.mkv
a53cc boolean
Import closed captions (which must be ATSC compatible format) into output. Only the mpeg2 and h264 decoders provide these. Default is 1 (on).
x264-params (N.A.)
Override the x264 configuration using a :-separated list of key=value parameters.
This option is functionally the same as the x264opts, but is duplicated for compatibility with the Libav fork.
For example to specify libx264 encoding options with ffmpeg:
ffmpeg -i INPUT -c:v libx264 -x264-params level=30:bframes=0:weightp=0:\ cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:\ no-fast-pskip=1:subq=6:8x8dct=0:trellis=0 OUTPUT
Encoding ffpresets for common usages are provided so they can be used with the general presets system (e.g. passing the pre option).
CBR设置
为输出设置CBR,有三个参数必须设置为同一个值。
bitrate(-b option), minimal rate(-minrate), maximal rate(-maxrate)。maximal rate需要设置-bufsize选项。例如设置CBR为0.5Mbit/s。
ffmpeg -i in.avi -b 0.5M -minrate 0.5M -maxrate 0.5M -bufsize 1M output.mkv
- qscale的取值可以是0.01-255但实际使用超过50就很糟糕了
- -qscale 使用固定量化因子来量化视频这个是在vbr模式的,前面有提到,越小质量越好,不要超过50,相关的参数还有-qmin --qmax用来设定最大最小可使用的量化值
- -qdiff 指定固定量化器因子允许的最大偏差
qblur 指定量化器模糊系数,可用范围是0.0-1.0越大使得码率在时间上分配的越平均
上面文档中括号后面对应的是x264的选项
FFmpeg option |
x264 option |
-g <frames> |
--keyint |
-b <bits per second> |
--bitrate |
-bufsize <bits> |
--vbv-bufsize |
-maxrate <bits> |
--vbv-maxrate |
-pass <1,2,3> |
--pass |
-crf <float> |
--crf |
-cqp <int> |
--qp |
-bf <int> |
--bframes |
-coder <0,1> |
--no-cabac |
-bframebias <int> |
--b-bias |
-keyint_min <int> |
--min-keyint |
-sc_threshold <int> |
--scenecut |
-deblockalpha <int>-deblockbeta <int> |
--deblock |
-qmin <int> |
--qpmin |
-qmax <int> |
--qpmax |
-qdiff <int> |
--qpstep |
-qcomp <float> |
--qcomp |
-qblur <float> |
--qblur |
-complexityblur <float> |
--cplxblur |
-refs <int> |
--ref |
-directpred <int> |
--direct |
-me_method <epzs,hex,umh,full> |
--me |
-me_range <int> |
--merange |
-subq <int> |
--subme |
-bidir_refine <0,1> |
--bime |
-trellis <0,1,2> |
--trellis |
-nr <int> |
--nr |
-level <int> |
--level |
-bt <bits> |
--ratetol = -bt / -b |
-rc_init_occupancy <bits> |
--vbv-init = -rc_init_occupancy / -bufsize |
-i_qfactor <float> |
--ipratio = 1 / -i_qfactor |
-b_qfactor <float> |
--pbratio |
-chromaoffset <int> |
--chroma-qp-offset |
-rc_eq <string> |
--rc_eq |
-threads <int> |
--threads |
-cmp <-chroma/+chroma> |
--no-chroma-me |
-partitions |
--partitions |
+parti8×8 |
i8×8 |
+parti4×4 |
i4×4 |
+partp8×8 |
p8×8 |
+partp4×4 |
p4×4 |
+partb8×8 |
b8×8 |
-flags |
|
-loop/+loop |
--no-deblock/–deblock |
-psnr/+psnr |
--no-psnr/nothing |
-flags2 |
|
+bpyramid |
--b-pyramid |
+wpred |
--weightb |
+brdo |
--b-rdo 我这里的ffmpeg已经不能用这个了 |
+mixed_refs |
--mixed-refs |
+dct8×8 |
--8×8dct |
-fastpskip/+fastpskip |
--no-fast-pskip |
+aud |
--aud |
- android ndk编译x264开源(用于android的ffmpeg中进行软编码)
http://blog.csdn.net/u012917616/article/details/40921833 不废话,直接上.sh脚本: export NDK=/home/xxx/my_softw ...
- FFmpeg与libx264 x264接口对应关系源代码分析
源代码位于“libavcodec/libx264.c”中.正是有了这部分代码,使得FFmpeg可以调用libx264编码H.264视频. 从图中可以看出,libx264对应的AVCodec结构体ff ...
- WebRTC VideoEngine超详细教程(三)——集成X264编码和ffmpeg解码
转自:http://blog.csdn.net/nonmarking/article/details/47958395 本系列目前共三篇文章,后续还会更新 WebRTC VideoEngine超详细教 ...
- ffmpeg,X264编码结果I帧QP比P帧还大
enc_ctx->profile =FF_PROFILE_H264_MAIN ; enc_ctx->time_base.den = 24; enc_ctx->time_base.nu ...
- FFmpeg与libx264 x264接口源代码简单分析
源代码位于“libavcodec/libx264.c”中.正是有了这部分代码,使得FFmpeg可以调用libx264编码H.264视频. 从图中可以看出,libx264对应的AVCodec结构体ff ...
- ffmpeg 中添加264支持
转自:http://blog.sina.com.cn/s/blog_513f4e8401011yuq.html ffmpeg 中带有264的解码,没有编码,需要添加x264: 参考百度上的“windo ...
- x264 编码器选项分析 (x264 Codec Strong and Weak Points) 1
文章文件夹: x264 编码器选项分析 (x264 Codec Strong and Weak Points) 1 x264 编码器选项分析 (x264 Codec Strong and Weak P ...
- x264 编码器选项分析 (x264 Codec Strong and Weak Points) 2
文章目录: x264 编码器选项分析 (x264 Codec Strong and Weak Points) 1 x264 编码器选项分析 (x264 Codec Strong and Weak Po ...
- FFmpeg中overlay滤镜用法-水印及画中画
本文为作者原创,转载请注明出处:https://www.cnblogs.com/leisure_chn/p/10434209.html 1. overlay技术简介 overlay技术又称视频叠加技术 ...
随机推荐
- 敏捷开发中的sprint是什么意思_百度知道
敏捷开发中的sprint是什么意思_百度知道 敏捷开发中的sprint是什么意思 未成年RB21 | 浏览 4208 次 推荐于2016-02-27 15:19:02 最佳 ...
- Ubuntu 14 下,命令行终端显示短路径
Ubuntu的终端命令行默认是长路径,即把路径深度全部显示出来,操作起来不是很方便,下面介绍命令行显示短路径的操作: $ vi ~/.bashrc 找到PS1= 的行,将\w(小写)改成\W(大写 ...
- 论文中的state-of-the-art
最近看了几篇计算机顶会和SCI,摘要里经常出现这个词,我以为是什么算法,查阅的知是“当前最高水平”,我记得老师说不能有这种模糊词语,需要表明提高了多少,看来论文都很水,即便是IEEE,SCI.
- 网络采集软件核心技术剖析系列(4)---使用C#语言如何将html网页转换成pdf(html2pdf)
一 本系列随笔概览及产生的背景 本系列开篇受到大家的热烈欢迎,这对博主是莫大的鼓励,此为本系列第四篇,希望大家继续支持,为我继续写作提供动力. 自己开发的豆约翰博客备份专家软件工具问世3年多以来,深受 ...
- Mysql -- Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’解决方法
启动mysql 报错: ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/m ...
- JAVA常见算法题(二十七)
题目:给定一个存放整数的数组,请写一个算法,把偶数移动到该数组的右边,奇数放在该数组的左边,请考虑时间和空间的最优算法. package com.forezp.util; /** * 题目:给定一个存 ...
- javascript快速入门20--Cookie
Cookie 基础知识 我们已经知道,在 document 对象中有一个 cookie 属性.但是 Cookie 又是什么?“某些 Web 站点在您的硬盘上用很小的文本文件存储了一些信息,这些文件就称 ...
- JavaScriptCore全面解析 (上篇)
收录待用,修改转载已取得腾讯云授权 作者 | 殷源 编辑 | 迷鹿 殷源,专注移动客户端开发,微软Imagine Cup中国区特等奖获得者,现就职于腾讯. JavaScript越来越多地出现在我们客户 ...
- Python标准库 (pickle包,cPickle包)
在之前对Python对象的介绍中 (面向对象的基本概念,面向对象的进一步拓展),我提到过Python“一切皆对象”的哲学,在Python中,无论是变量还是函数,都是一个对象.当Python运行时,对象 ...
- 阿里云ECS linux通过iptables 配置SNAT代理网关,实现局域网上网
场景说明: 本文将介绍如何通过为VPC中Linux系统的ECS实例配置SNAT,实现无公网ECS通过有EIP的服务器代理访问公网. 步骤: 1.使用SSH的方法登陆一个已经绑定EIP外网的ECS实例. ...