Intel® INDE Media for Mobile Tutorials - Running Samples for Android*

This tutorial describes how to run Intel® INDE Media for Mobile sample application for Android* on a device right from Eclipse* IDE.

Before getting started, download and install Intel® INDE Media for Mobile by visiting http://intel.com/software/inde. For additional assistance visit the Intel INDE forum.

1. Make sure you have ADB driver for your Device installed and USB debugging is turned on on the Device.

2. In Eclipse IDE add DDMS perspective to manage the Device and add Console and LogCat views in your Java perspective. These will help you monitor the status of running application.

3. Select SamplesMainActivity project, go to Run menu and select Run. Here’s an example of a regular log in Console view:

4. Here’s what you’ll see on the Device:

5. Samples are essentially a single Android application with several screens (mapped to activities in the source code). When run the application shows a menu of samples. Most samples have very intuitive interface and are easy to run.

6. Let’s look at the Transcode Video sample as an example.

  • Touch “folder” button and select a video file to transcode
  • Touch Transcode
  • Select required frame size and bitrate
  • Touch Start
  • Then either touch Stop or wait until the whole file is transcoded
  • Touch OK on the message “Transcoding finished”
  • Touch Play button to playback the transcoded video.

7. However, the streaming samples (Camera streaming, Game streaming and Media File streaming) are somewhat more complicated so here are some hints to run them:

  • Pre work: set up your own streaming server using Wowza* Streaming Engine software. 
  • Run any of the streaming samples.
  • Configure the following parameters: Host, Port, Application Name and Stream Name. Stream name must be in the following format: “mp4:yourStreamName”:

  • Make sure your network allows connection to the specified port.
  • Touch Start.
  • Watch the video using “Play Video Stream” sample from the Media for Mobile installed to another device, using players supplied with Wowza Streaming Engine or some other 3rd party player..

8. Here are the steps required to run the “Content Recognition” sample using Audible Magic* library:

  • Download the Big Buck Bunny movie from http://www.bigbuckbunny.org/ (direct link here), rename it to “bunny.mp4” and put it to “Movies” folder on your Android* device.
  • Open “Recognition” menu and click on “Content Recognition” item. The app should display “Listening for audio” message on the screen:

  • Play the Big Buck Bunny movie on some external device (e.g. on laptop using some media player) and place your Android device close to that external device to let it hear the audio.
  • Once the content is recognized, sample application will start video playback from the recognized position:

  • Please note that the “Content Recognition” sample application requires Internet connection to check Audible Magic license.
  • To use another content you need to download Audible Magic SDK (http://developers.audiblemagic.com/). There is a tool what lets to index any media content into audible magic database.
For more complete information about compiler optimizations, see our Optimization Notice.

4 comments

Top
Intel I.'s picture

Hi,

I was able to build the project as steps described in https://software.intel.com/en-us/articles/intel-inde-media-pack-for-android-tutorials-building-samples

When I try to run sample I get following error

08-11 15:56:09.892: E/AndroidRuntime(4104): FATAL EXCEPTION: main
08-11 15:56:09.892: E/AndroidRuntime(4104): Process: com.intel.inde.mp.samples, PID: 4104
08-11 15:56:09.892: E/AndroidRuntime(4104): java.lang.NoClassDefFoundError: com.intel.inde.mp.samples.RecognitionActivity
08-11 15:56:09.892: E/AndroidRuntime(4104):  at com.intel.inde.mp.samples.ExpandableSamplesListAdapter$SampleItem.<clinit>(ExpandableSamplesListAdapter.java:122)
08-11 15:56:09.892: E/AndroidRuntime(4104):  at com.intel.inde.mp.samples.ExpandableSamplesListAdapter$SampleGroup.<clinit>(ExpandableSamplesListAdapter.java:136)
08-11 15:56:09.892: E/AndroidRuntime(4104):  at com.intel.inde.mp.samples.ExpandableSamplesListAdapter.<init>(ExpandableSamplesListAdapter.java:23)
08-11 15:56:09.892: E/AndroidRuntime(4104):  at com.intel.inde.mp.samples.SamplesMainActivity.onCreate(SamplesMainActivity.java:31)
08-11 15:56:09.892: E/AndroidRuntime(4104):  at android.app.Activity.performCreate(Activity.java:5231)
08-11 15:56:09.892: E/AndroidRuntime(4104):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
08-11 15:56:09.892: E/AndroidRuntime(4104):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2199)
08-11 15:56:09.892: E/AndroidRuntime(4104):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2285)
08-11 15:56:09.892: E/AndroidRuntime(4104):  at android.app.ActivityThread.access$800(ActivityThread.java:138)
08-11 15:56:09.892: E/AndroidRuntime(4104):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1236)
08-11 15:56:09.892: E/AndroidRuntime(4104):  at android.os.Handler.dispatchMessage(Handler.java:102)
08-11 15:56:09.892: E/AndroidRuntime(4104):  at android.os.Looper.loop(Looper.java:149)
08-11 15:56:09.892: E/AndroidRuntime(4104):  at android.app.ActivityThread.main(ActivityThread.java:5061)
08-11 15:56:09.892: E/AndroidRuntime(4104):  at java.lang.reflect.Method.invokeNative(Native Method)
08-11 15:56:09.892: E/AndroidRuntime(4104):  at java.lang.reflect.Method.invoke(Method.java:515)
08-11 15:56:09.892: E/AndroidRuntime(4104):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)
08-11 15:56:09.892: E/AndroidRuntime(4104):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:610)
08-11 15:56:09.892: E/AndroidRuntime(4104):  at dalvik.system.NativeStart.main(Native Method)
08-11 15:58:38.142: D/dalvikvm(4253): Extra Options: not specified
08-11 15:58:38.182: I/dalvikvm(4253): Failed resolving Lcom/intel/inde/mp/samples/RecognitionActivity; interface 110 'Lcom/intel/inde/mp/IRecognitionPlugin$RecognitionEvent;'
08-11 15:58:38.182: W/dalvikvm(4253): Link of class 'Lcom/intel/inde/mp/samples/RecognitionActivity;' failed
08-11 15:58:38.182: E/dalvikvm(4253): Could not find class 'com.intel.inde.mp.samples.RecognitionActivity', referenced from method com.intel.inde.mp.samples.ExpandableSamplesListAdapter$SampleItem.<clinit>
08-11 15:58:38.182: W/dalvikvm(4253): VFY: unable to resolve const-class 238 (Lcom/intel/inde/mp/samples/RecognitionActivity;) in Lcom/intel/inde/mp/samples/ExpandableSamplesListAdapter$SampleItem;
08-11 15:58:38.182: D/dalvikvm(4253): VFY: replacing opcode 0x1c at 0x00f1
08-11 15:58:38.182: W/dalvikvm(4253): Exception Ljava/lang/NoClassDefFoundError; thrown while initializing Lcom/intel/inde/mp/samples/ExpandableSamplesListAdapter$SampleItem;
08-11 15:58:38.182: W/dalvikvm(4253): Exception Ljava/lang/NoClassDefFoundError; thrown while initializing Lcom/intel/inde/mp/samples/ExpandableSamplesListAdapter$SampleGroup;
08-11 15:58:38.182: D/AndroidRuntime(4253): Shutting down VM
08-11 15:58:38.182: W/dalvikvm(4253): threadid=1: thread exiting with uncaught exception (group=0x43710160)

Although RecognitionActivity is present it is saying could not find class,

So any Idea what's happening here?

Thanks,

Li Zhang (Intel)'s picture

I have resolved it, and the reason is that I forgot to put the native libraries in the <INSTALL_PATH>/libs/x86 into the sample project or installed directories in Android system.

 

 

Li Zhang (Intel)'s picture

Hi,

 

I failed to test the “Content Recognition”, logcat information as following, can you give me any clues?  And also I want to know that if the Audible Magic* library is free to use for anyone? thanks!

 

E/AndroidRuntime(11946): Process: com.intel.inde.mp.samples, PID: 11946
E/AndroidRuntime(11946): java.lang.UnsatisfiedLinkError: Couldn't load curl from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.intel.inde.mp.samples-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.intel.inde.mp.samples-2, /vendor/lib, /system/lib, /system/lib/arm]]]: findLibrary returned null
E/AndroidRuntime(11946):     at java.lang.Runtime.loadLibrary(Runtime.java:358)
E/AndroidRuntime(11946):     at java.lang.System.loadLibrary(System.java:526)
E/AndroidRuntime(11946):     at com.intel.inde.mp.android.AudibleMagicPlugin.initAudini(AudibleMagicPlugin.java:176)
E/AndroidRuntime(11946):     at com.intel.inde.mp.android.AudibleMagicPlugin.<init>(AudibleMagicPlugin.java:118)
E/AndroidRuntime(11946):     at com.intel.inde.mp.samples.RecognitionActivity.initRecognition(RecognitionActivity.java:264)
E/AndroidRuntime(11946):     at com.intel.inde.mp.samples.RecognitionActivity.init(RecognitionActivity.java:203)
E/AndroidRuntime(11946):     at com.intel.inde.mp.samples.RecognitionActivity.onCreate(RecognitionActivity.java:85)
E/AndroidRuntime(11946):     at android.app.Activity.performCreate(Activity.java:5231)
E/AndroidRuntime(11946):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
E/AndroidRuntime(11946):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2199)
E/AndroidRuntime(11946):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2285)
E/AndroidRuntime(11946):     at android.app.ActivityThread.access$800(ActivityThread.java:138)
E/AndroidRuntime(11946):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1236)
E/AndroidRuntime(11946):     at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(11946):     at android.os.Looper.loop(Looper.java:149)
E/AndroidRuntime(11946):     at android.app.ActivityThread.main(ActivityThread.java:5061)
E/AndroidRuntime(11946):     at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(11946):     at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime(11946):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)
E/AndroidRuntime(11946):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:610)
E/AndroidRuntime(11946):     at dalvik.system.NativeStart.main(Native Method)

Add a Comment

Have a technical question? Visit our forums. Have site or software product issues? Contact support.