tags:

views:

361

answers:

1

Hi,

Is there any api on android which generates a Thumbnail image from an inputstream which is a video file?

Thank you.

A: 

I would be using MediaMetadataRetriever class. For more info, take a look at the source code:

Java reference

  • frameworks\base\media\java\android\media\MediaMetadataRetriever.java

native reference:

  • frameworks\base\include\media\mediametadataretriever.h
MannyNS
MediaMetadataRetriever is part of the framework/base classes, which are "Core Android app framework libraries", and not part of the public APIs. As with iPhone SDK, this may result in problems, if Google changes the internal implementation in future releases.Still, video thumbnail generation seems to be non-trivial in Android: http://stackoverflow.com/questions/1334694/android-is-it-possible-to-display-video-thumbnails
Dimitar Dimitrov