- Home /
Unity Camera Capture for Android to video file
For our app we use iVidCapPro on iOS. Our android app is currently lacking video capture support. I've looked around and I saw the Intel INDE thing, but I couldn't find any set up instructions let alone a download link for the files.
I've searched around for an Android plugin but I can't find one. I'm looking to capture Unity's camera and not the device's camera. I'm open to writing my own solution as long as it isn't too complicated (especially writing my own h.264 encoder).
Any ideas? Thanks for any help.
I've heard of Everplay, but we're not looking for a game oriented network. We would also like to save directly to the gallery.
I've thought about it. The only issue is the app isn't exactly a game and we'd like to have it just save directly to the camera roll without an extra UI.
According to the support page, they're no longer allowing new users to download the application. https://software.intel.com/en-us/intel-inde-support
And the $$anonymous$$edia for $$anonymous$$obile bundle doesn't appear to be available as a standalone either. https://software.intel.com/en-us/media-for-mobile-support
Have you found a reliable solution just yet?
In case anyone else stumbles across this thread, the Intel $$anonymous$$edia For $$anonymous$$obile ($$anonymous$$4$$anonymous$$) has been re-released and is now on available on GitHub:
https://github.com/INDExOS/media-for-mobile
Use Android Studio to build. There is an example application included which shows how to natively record video in Android and the following guide should help with integrating with Unity:
You will have to update the import references from com.intel.inde.mp to org.m4m.domain
e.g. change
import com.intel.inde.mp.android.VideoFormatAndroid;
to:
import org.m4m.android.VideoFormatAndroid;
You can overlay a native Android surfaceView ontop of the Unity view - note, I have found that Unity 5.3.x has performance issues with overlaid native views (with the device's camera enabled). Unity 5.2.4f1 performs better.
Does this $$anonymous$$4$$anonymous$$ Intel re-release, supports AR$$anonymous$$ Chipsets? Do you thing this pack, implemented in Unity then deployed to Android, will work for the majority of devices?
As some one stated earlier, I'm using iVidCapPro for iOS and works perfectly, but for Android... there is no current solution... until this... but since there is little to no information around it, Im dubious whether spending the time required to implement it or just plain wait.
I've tested the re-release on Samsung S6, LG $$anonymous$$8, Nexus 7 and HTC One A9 - all were fine, though I implemented it as a native Android view overlaid over the Unity view rather than capturing from within a Unity camera.
Hi UnityDev291, Sorry to bring this question up again but I think your post is the closest I've got into using media mobile. Right now, I'm not sure what to do next. I have 1. Downloaded $$anonymous$$edia for mobile at github. This is my very first time using Android Studio so apologies in advanced if anything I write sounds dumb. 2. I 'think' I've already build the project successfully in Android Studio. There a few errors but I just had to update the SD$$anonymous$$s and download the build tools. Here's what I can see in the project view: ![alt text][1] [1]: /storage/temp/82219-gradle01.jpg
Now I'm not sure where I should go next. Looking at your second link(the one from intel), it says to copy the android file and domain file but I can 't seem to find them. Did I miss a step. Would appreciate your help. Thank you.
Hi Hakimo, Did you find a solution ? I am in the same case as you, I don't know how to get android-.jar and domain-.jar as mentionned on the second link.
EDIT : Well, I found 2 download links to get the 2 jar files : https://mega.nz/#!UZsCCLxY!lgRRkSw-6CJ$$anonymous$$Zu0BZ$$anonymous$$zoD_R6knWLbud7LYttTu5SbFk https://mega.nz/#!INEE3I$$anonymous$$$$anonymous$$!azgo9NrNjU-nxLPpUk04XAb0Gb96Buyffhi$$anonymous$$wiSOsYY android-1.2.2415.jar and domain-1.2.2415.jar
Now I'm trying to build the java files into Capturing.jar by using ant, following the tuto on the the 2nd link but I got a lot of errors from the java files given by the tuto : "package android.os does not exist" etc...
EDIT 2 : Ok I solved the errors and finally get the Capturing.jar file. Going to follow the tutorial until the end and give a feedback here. If you have any errors when you launch the cmd "ant build-jar clean-post-jar", try to change the settings in your build.xml :
<property name="sdk.dir" value="C:\<PATH_TO_YOUR_ANDROID_SD$$anonymous$$>\Android\sdk"/>
check the target specified in the line below is the same as the version of the android sdk you have installed (you can check this in the "platforms" folder under your Android\sdk folder.
<property name="target" value="android-23"/>
Check the path of the classes.jar in the Unity\Editor folder :
<property name="unity.androidplayer.jarfile" value="C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Variations\il2cpp\Development\Classes\classes.jar"/>
EDIT 3 : Okay it works. In the last Unity script from the tutorial (CaptureGUI.cs), you need to change "capture.inProgress" by "capture.isRunning". However it captures the sound too and I don't know how to capture only the images.
So finally you don't have to open Android Studio at all, just download the android et domain jar files and follow the tuto as I did. I hope that helped you.
Were you able to find a solution to that problem ? Right now, Im looking for an android plugin to record the ingame screen to use that same video inside the game.
Answer by Max-Bot · Feb 01, 2018 at 10:40 PM
FFmpeg Unity Bind allows to record video files and edit them as well.
Answer by TheFloatingSheep · Jan 30, 2016 at 08:01 PM
I found this. http://renderheads.com/product/av-pro-movie-capture/
Answer by MoonHeadJohn · Nov 18, 2016 at 03:23 PM
Providing you're targeting Android 5.0 and above, you could create a plugin and use the screen capturing and sharing facilities: https://developer.android.com/about/versions/android-5.0.html
See "Screen capturing and sharing" to read further into the api.
Back when I first looked into it, there were a number of tutorials online on how to initialise it, but all of it was specifically native code with very few articles going into how you should use this feature with Unity. It's definitely possible but you'll have to do a load of background reading to properly understand it.
Your answer
Follow this Question
Related Questions
Capture the Screen, and Audio being Played in a Unity3D based iOS Game 0 Answers
How to record video from the screen on android and save it to gallery? 1 Answer
Record the entire level and save that video in Desktop/Gallery of PC/Android [In-Game] 2 Answers
Unity Video ads closing when player leaves app. 0 Answers
Can Hanheld.PlayFullScreenMovie run concurrently with other process? 0 Answers