mediacodec延时_如何减少MediaCodec H264编码器延迟

I'm trying to encode h264 into stream in real-time low latency with Android6.0's MediaCodec.

There are about 6 frames latency from encoder which I wanna know how to reduce

part codes are:

while (true) {

encoder->dequeueOutputBuffer(&bufIndex);

}

the encoder is feed by Surface of screen in 320x480 60 fps, and it outputs stream data by dequeueOutputBuffer().

There are about 6 frames feed to encoder whose data are not return immedately by dequeueOutputBuffer().

In other words, when the N-th frame are feeded, the encoder output data of the (N-6)th frame.

Question 1 - How to reduce frames buffered in encoder? Is it possible to output the N-th frame just after N-th frame is feed to encoder?

PS: Question 1 is the same to this question.(no good solution yet).

When surface graphic content sudden

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值