难道媒体codeC在支持Android的音频连接codeC? [英] Does MediaCodec in Android support audio encodec?

查看:138
本文介绍了难道媒体codeC在支持Android的音频连接codeC?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想建立一个视频系统。我通过preVIEW得到相机数据,然后我给的数据媒体codeC,让它做视频编码工作。现在我专注于音频部分。我不知道要使用的音频caperture和音频编码的API。

I am trying to build a video system. I get the data from Camera through Preview, then I give the data to Mediacodec and let it do the video encoding job. Now I am focus on the audio part. I am not sure which API to use for the audio caperture and audio encoding.

我已经做了一些搜索。但似乎大部分的演示使用MediaRecord。因为我已经取代媒体$ C $立方厘米MediaRecord,我想我需要找到一些新的方式做音频部分。如何capeture音频?媒体codeC可以做到音频codeC?

I've done some search. But it seems that most of the demos use MediaRecord. Since I've replaced the MediaRecord with MediaCodec, I think I need to find some new way to do the audio part. How to capeture the audio? Can MediaCodec do audio codec?

感谢您!

推荐答案

是的。该 MediaMuxerTest 演示了使用两个媒体codeC 连接codeR实例(一个用于音频,一个用于视频)和 MediaMuxer 来克隆一个电影文件。

Yes. The MediaMuxerTest demonstrates using two MediaCodec encoder instances (one for audio, one for video) and MediaMuxer to "clone" a movie file.

注意音频/ MP4A-LATM MIME类型用于音频。

Note the audio/mp4a-latm MIME type is used for audio.

这篇关于难道媒体codeC在支持Android的音频连接codeC?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆