I'm trying to build an android app which generates media file statistics e.g. bitrate for audio & bitrate, frame rate, codec information etc for video.
I have been able to create playlist based on the files available on external storage on mobile device and play them using MediaPlayer apis.
But I haven't found any api so far which lets you extract the above mentioned information开发者_开发问答 from the media files.
I checked AudioTrack class but it doesn't serves the purpose.
It will be absolutely great if some one can share some insights on this.
There isn't currently an API for this.
You can probably find an open source package that has media metadata query functionality (I'd imagine ffmpeg can do this). These open source libraries are usually written in C, but can potentially be ported to the NDK (Native Development Kit). Another thing to remember is that bitrate, framerate, and other encoding parameters are generally codec-specific, and some codecs have licensing fees.
精彩评论