0

i have ported ffmpeg-x264 for android but the issue is encoder takes more time to encode a frame .It takes above 100ms to encode and cpu rises to 85% in some devices like LG and samsung.i am using the following avcodeccontext settings

c->bit_rate = 256000;
c->width = width;
c->height = height;
c->gop_size = 2;//75;
c->pix_fmt = PIX_FMT_YUV420P;
c->codec_type=AVMEDIA_TYPE_VIDEO;
c->codec_id=CODEC_ID_H264;
c->cqp=36;

is there any other settings that makes the ffmpeg-encoding faster and utilizing less cpu percentage

4

2 回答 2

0

我建议您在 x264-devel (http://mailman.videolan.org/listinfo/x264-devel) 上询问。他们正在为 ARM 开发 asm 版本,包括对 NEON 的支持。我认为他们需要这方面的帮助(他们需要集成一些 Google 代码输入帮助)。我确信 Jason Garrett-Glaser 已经在 ARM 设备上进行了分析,并且知道最佳设置以及最有可能获得性能优势的地方。

于 2012-03-03T16:52:04.820 回答
0

如果您的计算机速度不够快,您可以以牺牲压缩比为代价来加快压缩速度。您可以使用“-me zero”加速运动估计,使用“-intra”完全禁用运动估计(您只有 I 帧,这意味着它与 JPEG 压缩差不多)。

http://ffmpeg.org/ffmpeg.html#Tips

于 2012-03-02T11:15:04.187 回答