broken ffmpeg default settings detected" and "use an encoding preset (vpre)"
2012-06-20 16:04
323 查看
在编码H264码流时,遇到这样的错误:
broken ffmpeg default settings detected
use an encoding preset (vpre)
后来网上百度了原因,才知道,在x264 source file encoder/encoder.c 中:
所以当score >= 5,the function to open the codec will fail.
We must at least set 4 param of the AVCodecContext before open it.
/*default settings for x264*/
ctx->me_range = 16;
ctx->max_qdiff = 4;
ctx->qmin = 10;
ctx->qmax = 51;
ctx->qcompress = 0.6;
这个才能编译通过。
broken ffmpeg default settings detected
use an encoding preset (vpre)
后来网上百度了原因,才知道,在x264 source file encoder/encoder.c 中:
/* Detect default ffmpeg settings and terminate with an error. */ { int score = 0; score += h->param.analyse.i_me_range == 0; score += h->param.rc.i_qp_step == 3; score += h->param.i_keyint_max == 12; score += h->param.rc.i_qp_min == 2; score += h->param.rc.i_qp_max == 31; score += h->param.rc.f_qcompress == 0.5; score += fabs(h->param.rc.f_ip_factor - 1.25) < 0.01; score += fabs(h->param.rc.f_pb_factor - 1.25) < 0.01; score += h->param.analyse.inter == 0 && h->param.analyse.i_subpel_refine == 8; if( score >= 5 ) { x264_log( h, X264_LOG_ERROR, "broken ffmpeg default settings detected\n" ); x264_log( h, X264_LOG_ERROR, "use an encoding preset (vpre)\n" ); return -1; } }
所以当score >= 5,the function to open the codec will fail.
We must at least set 4 param of the AVCodecContext before open it.
/*default settings for x264*/
ctx->me_range = 16;
ctx->max_qdiff = 4;
ctx->qmin = 10;
ctx->qmax = 51;
ctx->qcompress = 0.6;
这个才能编译通过。
相关文章推荐
- Buttons in button bars should be borderless; use style="?android:attr/buttonBarButtonStyle" (and ?an
- ffmpeg libx264 编码 "use an encoding preset (e.g. -vpre medium)" 错误解决
- Buttons in button bars should be borderless; use style="?android:attr/buttonBarButtonStyle" (and ?an
- Why do I get warnings "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"?
- FFmpeg avcodec_open2不成功broken ffmpeg default settings detected跟H264的设置有关
- 打开Windows7的“Documents and Settings"文件夹
- LINK : warning LNK4098: defaultlib "LIBC" conflicts with use of other libs; use /NODEFAULTLIB:library
- 'c:/documents and settings/****/default-1-2-0-0.ses' could not be loaded
- 官方论坛的帖子 How about use "armeabi-v7a" as default ABI on Android for template? ABI 是啥?
- error C2275: "xxx"illegal use of this type as an expression
- How can I set the background of UITableView (the tableview style is "Grouped") to use an image?
- 为何无法打开administrator目录?提示“无法访问c:/documents and settings/administrator,拒绝访问"解决办法
- Why use Servlets & JSPs: an introduction(Head First Servlets and JSP)
- warning LNK4098: defaultlib "MSVCRT" conflicts with use of other libs; use /NODEFAULTLIB:library
- I did an SDK update last night and it moved adb.exe. In its place it left a file called "adb_has_mov
- LINK : warning LNK4098: defaultlib "LIBC" conflicts with use of other libs; use /NODEFAULTLIB:librar
- button's UseSubmitBehavior="true" and RichText control (TelerikEditor or DevExpress Editor)
- Warning LNK4098 : defaultlib "library" conflicts with use of other libs; use /NODEFAULTLIB:library
- defaultlib "library" conflicts with use of other libs; use /NODEFAULTLIB:library
- Please check that values for params "default.fs.name" and "hive.metastore.warehouse.dir" do not conf