Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MediaCodec: MediaFormat KEY_I_FRAME_INTERVAL not working for H264codec #291

Open
Midhun9638 opened this issue Jul 18, 2019 · 1 comment
Open

Comments

@Midhun9638
Copy link

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();

@Midhun9638
Copy link
Author

@fyhertz can you please help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant