Open Midhun9638 opened 5 years ago
I'm setting MediaFormat.KEY_I_FRAME_INTERVAL value as 1 (below given code) but it's not generating Key frame every second but it is generating every 66 second. I'm using Libstreaming library. can anyone please help why is not working ?
mMediaCodec = MediaCodec.createByCodecName(debugger.getEncoderName()); MediaFormat mediaFormat =MediaFormat.createVideoFormat("video/avc", 640,480); mediaFormat.setInteger(MediaFormat.KEY_BIT_RATE, 1000000); mediaFormat.setInteger(MediaFormat.KEY_FRAME_RATE, 15); mediaFormat.setInteger(MediaFormat.KEY_COLOR_FORMAT, debugger.getEncoderColorFormat()); mediaFormat.setInteger(MediaFormat.KEY_I_FRAME_INTERVAL, 1); //here mMediaCodec.configure(mediaFormat, null, null, MediaCodec.CONFIGURE_FLAG_ENCODE); mMediaCodec.start();
@fyhertz can you please help?
I'm setting MediaFormat.KEY_I_FRAME_INTERVAL value as 1 (below given code) but it's not generating Key frame every second but it is generating every 66 second. I'm using Libstreaming library. can anyone please help why is not working ?
mMediaCodec = MediaCodec.createByCodecName(debugger.getEncoderName()); MediaFormat mediaFormat =MediaFormat.createVideoFormat("video/avc", 640,480); mediaFormat.setInteger(MediaFormat.KEY_BIT_RATE, 1000000); mediaFormat.setInteger(MediaFormat.KEY_FRAME_RATE, 15); mediaFormat.setInteger(MediaFormat.KEY_COLOR_FORMAT, debugger.getEncoderColorFormat()); mediaFormat.setInteger(MediaFormat.KEY_I_FRAME_INTERVAL, 1); //here mMediaCodec.configure(mediaFormat, null, null, MediaCodec.CONFIGURE_FLAG_ENCODE); mMediaCodec.start();