0

Simple AVI videos seem to play fine in videoView, as well as I can get thumbnails from them by

        Bitmap bMap = ThumbnailUtils.createVideoThumbnail(s, MediaStore.Video.Thumbnails.MICRO_KIND);
        ivPic.setImageBitmap(bMap);

Yet DivX avi videos won't play and won't give me a thumbnail.

Any ideas how to fix that?

Thanks!

UPDATE: I found this vitamio library and nevertheless I had put its JAR file into my app, when I'm trying to play the divx file, it pops a dialog, offering to download some plugin... is there a way round it?

Roger Travis
  • 8,402
  • 18
  • 67
  • 94

2 Answers2

2

Android doesn't support DivX videos. See this link for an overview of supported media formats: http://developer.android.com/guide/appendix/media-formats.html

Edit: This is an answer to the original question, which was about playing DivX in a VideoView and didn't include anything about "Vitamio".

Community
  • 1
  • 1
Michell Bak
  • 13,182
  • 11
  • 64
  • 121
0

If you want to use Vitamio library for displaying video etc, then first of all download Vitamio Library from here Free download Vitamio Library. then include both "ZI" and "InitActivtiy" (which is inside the Vitamio lib) Library in your current project (right click project-->include library-->), then write this line of code

 if (!io.vov.vitamio.LibsChecker.checkVitamioLibs(this))
        return;

after Oncreate Method() like in my project.

 @Override
protected void onCreate(Bundle savedInstanceState) 
 {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    if (!io.vov.vitamio.LibsChecker.checkVitamioLibs(this)) //it will check the include library of Vitamio
        return;

after that put this line of code in Androidmanifest.xml file

  <!-- (((((( Vitamio Library including in manifest file )))))) -->
   <activity android:name="io.vov.vitamio.activity.InitActivity" 
       android:configChanges="orientation|screenSize|smallestScreenSize|keyboard|keyboardHidden"
       android:launchMode="singleTop"
        android:theme="@android:style/Theme.NoTitleBar"
        android:windowSoftInputMode="stateAlwaysHidden"/>     

Now its a time to display your video using VideoView etc.

Pir Fahim Shah
  • 10,505
  • 1
  • 82
  • 81