problems with capturing video with 1.1.1493

problems with capturing video with 1.1.1493

hi,

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 "VideoCapture.java" file ? 

thanks 

 

 

14 posts / novo 0
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.

Hello,

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.

Thanks!

Neal

hi , 

here is the link to the tutorial 

https://software.intel.com/en-us/articles/intel-inde-media-pack-for-andr...

how should i instansiate the factory :
 private IAndroidMediaObjectFactory factory;

and the progress listener 
private IProgressListener progressListene

thanks 

 

Hi!

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/com.intel.inde.mp.samples.unity E/libEGL﹕ eglMakeCurrent:671 error 300b (EGL_BAD_NATIVE_WINDOW)
06-23 15:14:54.484    3975-3993/com.intel.inde.mp.samples.unity W/dalvikvm﹕ threadid=12: thread exiting with uncaught exception (group=0x4184d7c0)
06-23 15:14:54.496    3975-3993/com.intel.inde.mp.samples.unity 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.intel.inde.mp.android.InputSurface.makeCurrent(InputSurface.java:153)
            at com.intel.inde.mp.android.Surface.makeCurrent(Surface.java:52)
            at com.intel.inde.mp.android.GameCapturerSource.beginCaptureFrame(GameCapturerSource.java:56)
            at com.intel.inde.mp.GLCapture.beginCaptureFrame(GLCapture.java:88)
            at com.intel.inde.mp.samples.unity.VideoCapture.beginCaptureFrame(VideoCapture.java:144)
            at com.intel.inde.mp.samples.unity.Capturing.captureFrame(Capturing.java:47)
            at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
            at com.unity3d.player.UnityPlayer.a(Unknown Source)
            at com.unity3d.player.UnityPlayer$a.run(Unknown Source)

any idea what might be causing this ? 

thanks 
yonatan 
 

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.

strange
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: 
https://www.youtube.com/watch?v=T9pytlEV6yE&feature=youtu.be

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

 

regards
yon 
 

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  ? 

thanks 
yon

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 

thanks 

 

Deixar um comentário

Faça login para adicionar um comentário. Não é membro? Inscreva-se hoje mesmo!