Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要了解有关我在 android 上使用 MediaCodec 解码的一些视频的以下信息: - 对于音频:采样率和通道数;- 对于视频:帧速率。我通常解码h264+aac,但解决方案应该可以扩展到其他格式。如何做到这一点?
这可以不使用 来完成MediaCodec,但可以使用MediaFormat以下实例:
MediaCodec
MediaFormat
format.getInteger(MediaFormat.KEY_SAMPLE_RATE); format.getInteger(MediaFormat.KEY_CHANNEL_COUNT);
(请参阅文档中的其他键)