problems with capturing video with 1.1.1493

problems with capturing video with 1.1.1493


I think the code provided in the tutorial is not up to date for version 1.1.1493 of inde.

i have added those 2 new valirables 

    private IAndroidMediaObjectFactory factory;

    private IProgressListener progressListener;

and also 

       capturer = new GLCapture(factory, progressListener);

and the code compiles , 
but those two variables (Factory , progressListener) , are not being instantiated , and since there is now documentation of the code, 
i cant seem to find the right way to instansiate them . and the game crashes when i try to record 

Can anyone send me an updated "" file ? 




14 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.


Sorry that you are running into this problem.

Can you provide me with some more information about what tutorial you are using? I want to be sure that we're looking at the same version.



hi , 

here is the link to the tutorial

how should i instansiate the factory :
 private IAndroidMediaObjectFactory factory;

and the progress listener 
private IProgressListener progressListene




You can instantiate IProgressListener like in sample provided in this article

private IProgressListener progressListener = new IProgressListener() {


Media factory could be instantinated like this 

new AndroidMediaObjectFactory(context);

where context is your Android app context.

hi dmitry , thanks for the quick reply 

i did exactly what you suggested , and i keep getting this exception when i click on the "start recording" button .

06-23 15:14:54.484    3975-3993/ E/libEGL﹕ eglMakeCurrent:671 error 300b (EGL_BAD_NATIVE_WINDOW)
06-23 15:14:54.484    3975-3993/ W/dalvikvm﹕ threadid=12: thread exiting with uncaught exception (group=0x4184d7c0)
06-23 15:14:54.496    3975-3993/ E/AndroidRuntime﹕ FATAL EXCEPTION: UnityMain
    java.lang.Error: FATAL EXCEPTION [UnityMain]
    Unity version     : 4.3.0f4
    Device model      : samsung GT-I9000
    Device fingerprint: samsung/GT-I9000/GT-I9000:2.3.5/GINGERBREAD/XXJVT:user/release-keys
    Caused by: java.lang.RuntimeException: eglMakeCurrent failed
            at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
            at com.unity3d.player.UnityPlayer.a(Unknown Source)
            at com.unity3d.player.UnityPlayer$ Source)

any idea what might be causing this ? 


From your log i see you are trying to launch app on gingerbread device, and this is the reason of crash. MediaPack require Android 4.3 and higher.

i've installed a new rom with jellybean 4.3
just for this tutorial 

but the fingerprint in the log states thats its gingerbread  ...

what do you think i should do ? 

hi Dmitry Rizshkov 

thanks for your help , 

i tried it on another device , and it worked .
although , i have encountered another issue with the recording . 

the terrain is missing from the video. 
i only see the 3d characters 
here is the video:

do i need to put the capture.cs script on all the game objects i want to capture ? 



Hi Yon,

Looks great!

You need to put script on entire scene, not on objects. Think about capturer like about another virtual display. On the video you will see what you are rendered on it. 

hi dimitry 

Can you explain what you mean by "entire scene" ? 
In unity , you can't add a script to a scene , only to game objects . 

so should i place the "capture.cs" script in every game object i want to capture  ? 


you can attach this script to your main camera object

hi , dimitry 

that's what i did,  
but it still doesn't get the terrain in the video . 


how many camera objects do you have in your code? Not sure, but looks like at least 3 - actors (objects), terrain and the main camera. Could you please check what you did applied capture script on the main camera?

hi dimitri , 

first of all , thanks your support . 

second , 
yes , you are right . 
a camera object , a dragon object and a terrain . 
the dragon is under the camera object.

"Capture" script and "CaptureGUI" script are under main camera 



Leave a Comment

Please sign in to add a comment. Not a member? Join today