Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

iVidCapPro iOS Video Capture Now Available

Discussion in 'Assets and Asset Store' started by Malveka, Sep 14, 2013.

  1. Malveka

    Malveka

    Joined:
    Nov 6, 2009
    Posts:
    191
    $iVidCapPRO_ico (arm).png

    iVidCapPro is now a hosted open source project on Github. Go here for access:

    iVidCapPro Repository

    ==========

    iVidCapPro is an iOS plugin that enables you to capture video and audio from your Unity iOS application.

    iVidCapPro is great for recording video trailers, demos and in-app footage for your Unity-based game or app. It’s fast, flexible and easy to use. It runs wholly on the device and does not require a network connection.

    Here are some of the features of iVidCapPro:

    [table="width: 600, class: outer_border"]
    [tr]
    [td]Record real time footage[/td]
    [td]Great for demos, trailers, and replays[/td]
    [/tr]
    [tr]
    [td]Record at any resolution[/td]
    [td]Record your app in 720p or even 1080p. Need 512×512 for a special project? You got it.[/td]
    [/tr]
    [tr]
    [td]Record at fixed framerate[/td]
    [td]If you don’t need real time rendering, but want a really high quality recording, you can pick your target framerate. 30fps? 60fps? Your choice.[/td]
    [/tr]
    [tr]
    [td]Record from multiple cameras simultaneously[/td]
    [td]Have a separate camera for the GUI and the game character and want to record them simultaneously for a demo? You can do that.[/td]
    [/tr]
    [tr]
    [td]Camera based recording[/td]
    [td]It's not just full screen capture. Any Unity camera can act as a video camera.[/td]
    [/tr]
    [tr]
    [td]Record from rendertexture[/td]
    [td]If you have your own secret recipe for cooking up a video source, iVidCapPro gets out of your way. Just point it at a rendertexture and it’ll make a video out of it. No cameras required.[/td]
    [/tr]
    [tr]
    [td]Record scene audio[/td]
    [td]Choose an audio listener and capture it. The audio capture component has its own gain control, so you can get the video volume just right without disturbing your in-app mix.[/td]
    [/tr]
    [tr]
    [td]Record a voice over[/td]
    [td]Maybe you’re making a demo of your app or game and want to add commentary. Just tell iVidCapPro to record from the mic in addition to the scene. Use the device’s built-in mic or a headset mic.[/td]
    [/tr]
    [tr]
    [td]Supply prerecorded audio[/td]
    [td]Have prerecorded audio that you want to add to the video? iVidCapPro lets you choose up to two audio files to mix with the finished video.[/td]
    [/tr]
    [tr]
    [td]Adjust video quality settings[/td]
    [td]Configure the bitrate and keyframe interval to get the balance you need between video file size and quality.[/td]
    [/tr]
    [tr]
    [td]Adjust video gamma[/td]
    [td]Need to tweak the video brightness to get the right look? It’s here.[/td]
    [/tr]
    [tr]
    [td]Full destination control[/td]
    [td]Have the finished video copied to the device Photo Album. Or store it in your app’s Documents folder. Control of the video is in your hands and those of your customer. No servers. No accounts. Use of the videos from your app can be totally unlimited or fully restricted. You decide.[/td]
    [/tr]
    [/table]

    FAQ

    How much does it cost?
    It's free.​

    Why is it free?
    iVidCapPro will not be officially supported by the author. You can get the details about this on the eOe web site here. In brief, the demands of a full-time job and other projects make it impossible for me to provide maintenance support for this plugin. So I am offering the plugin itself and all its source code to the community. I hope it will be useful to some of you. Take it. Go forth. Do good. :)

    Can I use it in my commercial products?
    Yes.​

    Can I repackage it and sell it on the Unity asset store?
    No.​

    Is iVidCapPro the same as iVidCap on the asset store?
    No. iVidCapPro is the spiritual successor to iVidCap but is a new code base. iVidCapPro is faster and has more features. iVidCap is deprecated.​
     
    Last edited: Sep 25, 2017
    t_w likes this.
  2. contempt

    contempt

    Joined:
    Jul 31, 2012
    Posts:
    88
    I just want to say, thank you, what a wonderful resource you've provided for the Unity community.
     
  3. IllogicalGames

    IllogicalGames

    Joined:
    Apr 16, 2013
    Posts:
    167
    wonderful! thanks for sharing.
     
  4. Malveka

    Malveka

    Joined:
    Nov 6, 2009
    Posts:
    191
    @contempt
    @IllogicalGames

    You're welcome! I hope you find it useful. :)
     
  5. MHD Salka

    MHD Salka

    Joined:
    Mar 19, 2013
    Posts:
    72
    Awesome man! this is a national treasure....thanks for sharing
     
  6. MHD Salka

    MHD Salka

    Joined:
    Mar 19, 2013
    Posts:
    72
    One question though....can you capture audio without video and save it as a wave or mp3 file?
     
  7. Malveka

    Malveka

    Joined:
    Nov 6, 2009
    Posts:
    191
    Thanks for the vote of confidence. :)

    Not out-of-the-box, no. However the initial audio recording (pre-mixing with the video) is handled via a C# script that is included with the project, so it would be very straightforward to invoke it directly for your own purposes. In this case the audio will be saved as a .wav file.
     
    Last edited: Oct 13, 2013
  8. Deleted User

    Deleted User

    Guest

    Thank you!
    Really interesting!
     
  9. Malveka

    Malveka

    Joined:
    Nov 6, 2009
    Posts:
    191
    Version 1.1 of iVidCapPro is now available here.

    Version 1.1 changes:
    • Performance improved 30-40%
    • In-Editor warning message for incorrect rendertexture recording configuration

    Thanks for the continued interest in iVidCapPro. If you use iVidCapPro in your app, we’d love to hear about it!
     
  10. bobmoff

    bobmoff

    Joined:
    Sep 23, 2014
    Posts:
    44
    Tried it but the video is just black. Do the plugin only work with Unity Pro ? Does it also require Unity iOS Pro ?

    If true, what is the reason for this dependency ?
     
  11. bobmoff

    bobmoff

    Joined:
    Sep 23, 2014
    Posts:
    44
    I just realised that the plugin uses RenderTexture, and that is why it cannot be done using Unity Free.
     
  12. Malveka

    Malveka

    Joined:
    Nov 6, 2009
    Posts:
    191
    Exactly right. 8^)
     
  13. blamejane

    blamejane

    Joined:
    Jul 8, 2013
    Posts:
    233
    I'm excited about this free plugin, thanks for sharing. I'm trying to get it working, but a crash is occurring at startup. I can't figure out what the problem as Xcode just stops. something to do with m_iVidCapPro_SampleManager_Start.

    I'm using an iPhone 6+ as the test device. No audio. I have the iVidCapPro script attached to my only camera. Also created an empty game object and dropped the sample manager onto it. Assigned the camera to both slots for vr_controller AND main camera. Does this seem correct? Just trying to shed some light on this. When I run outside of Xcode, the app still runs and I can see the vid capture demo UI. When I click record, I don't see anything happening. Then I click stop and copy to album, but I never see anything in the albums. Should I be seeing any indication that recording is taking place?

    Thanks for the great support!
     
  14. Malveka

    Malveka

    Joined:
    Nov 6, 2009
    Posts:
    191
    Hi. You're welcome. Let's see if we can get it working with your project. 8^)

    Your setup doesn't sound quite right. Try this instead:

    1. Create an empty game object called "Video Recorder". Add the iVidCapPro and the iVidCapProEdit components to it.
    2. Add the iVidCapProVideo component to your camera.
    3. Select the VideoRecorder object from step (1) and set the "VideoCameras" property. Add one entry to the list. Set the entry to reference the camera that contains the iVidCapProVideo component.
    4. Create another empty game object called "Sample Vid GUI". Add the iVidCapPro_SampleManager object to it.
      1. Set the "Vr Controller" and "Ve Controller" properties to the Video Recorder object.
      2. Set the "Main Camera" property to your camera.
      3. Leave the Main Listener, Secondary Camera, Secondary Listener, Custom Render Texture set to None.
      4. Set the Game Skin to the included iVidCapPro_SampleGUISkin.
      5. Check "Show Debug".
    This setup is more complicated than is necessary because the SampleManager does a bunch of extra stuff. It really needs to be reworked to be more streamlined and use the new uGUI support.

    Video will not be recorded when you run in the editor. It is only recorded on the device. If you are running with debug enabled, however, you will see messages printed in the editor that will let you know that the plugin is working.

    You can find more information about the plugin in the blog posts and subsequent comments here: www.eccentric-orbits.com

    Hope this helps!

    Cheers,
    James
     
  15. blamejane

    blamejane

    Joined:
    Jul 8, 2013
    Posts:
    233
    Thank you so much for the great support. I created an new project from scratch along with a plane and sphere, in order to follow your steps; which were very clear (so thanks for providing them). I was certainly way off with how I had it setup LOL. Anyway, when I tested the script I got the following error in Xcode:


    2015-04-03 07:57:16.022 VideoCaptureTest[771:190072] ivcp_BeginRecordingSession called: name=SampleVideo width=1920 height=1080 rate=30 textureID=361396340 audio=0 rateLock=0 bitsPerSecond=5000000 keyFrameInterval=30 gamma=-1.000000 commObjectName=videoRecorder showDebug=1

    2015-04-03 07:57:16.023 VideoCaptureTest[771:190072] setVideoName finalVideoName=SampleVideo.mov

    Assertion failed: (_surface->api != apiMetal), function -[DisplayConnection surfaceGLES], file /Users/scottmorrison/Desktop/Dev/apps/BroncoBuilder/unity/videoCaptureTest/VideoCaptureTest/Classes/Unity/DisplayManager.mm, line 46.

    I managed to get it working however, by changing the Graphic API to OpenGLES3 in the player settings. Info found here: http://blogs.unity3d.com/2015/02/19...ndering-support-and-update-of-il2cpp-for-ios/

    It worked great, thank you VERY VERY much!!
     
  16. blamejane

    blamejane

    Joined:
    Jul 8, 2013
    Posts:
    233
    One quick question, does the video capture not record any unity UI, wether the old GUI or new UI? Guess I was thinking the limitation was for the old unity GUI. My video capture worked great, except none of the UI buttons were captured. Thanks.
     
  17. Peter Hou

    Peter Hou

    Joined:
    Oct 12, 2010
    Posts:
    66
    Hi,

    Thanks for sharing this plugin :) I got version 1.6 working in my project without any problems after forcing the graphics api to OpenGL ES 2.0 instead of Automatic (Metal).

    Does anyone know if something similar exists for Android?
     
  18. hizral

    hizral

    Joined:
    Apr 27, 2010
    Posts:
    568
    Hello,

    Have a few question here, I learning to used your iVidCapPro plugin, and manage to build it to my ipad device. When I press recording it show me on the GUI that it is recording, and when i pressed stop recording, a notification pop up and told me that the video is being save and i can look it in gallery,

    The problem here, i cannot find my recorded video, try to search for the name "samplevideo.mov" still cannot find the file..

    What did I do wrong here.

    Thank you.
     
  19. Malveka

    Malveka

    Joined:
    Nov 6, 2009
    Posts:
    191
    Hi Hizral,

    It's possible you have a version of the code in which the Sample Manager has the video action for endRecordingSession set to Copy_To_Documents. Please make sure the code on or about line 598 in file iVidCapPro_SampleManager.cs looks like this:

    Code (CSharp):
    1. videoAction = iVidCapPro.VideoDisposition.Save_Video_To_Album;
    2.         //videoAction = iVidCapPro.VideoDisposition.Save_Video_To_Documents;
    If the second line is uncommented it would explain why your video does not show up in the device Photos app.

    Hope this helps.

    Cheers,
    James
     
  20. hizral

    hizral

    Joined:
    Apr 27, 2010
    Posts:
    568
    Thank you..manage to save the video to my library now..

    But I'm trying to record my own voice..and I change the code on line 387

    Code (CSharp):
    1. // Has audio recording from the scene been requested from the GUI?
    2.         iVidCapPro.CaptureAudio audioSetting = iVidCapPro.CaptureAudio.No_Audio;
    3.         if (arCap != null && (audioSourceState == AudioSource.Scene || audioSourceState == AudioSource.All))
    4.         {
    5.             //audioSetting = iVidCapPro.CaptureAudio.Audio;
    6.             audioSetting = iVidCapPro.CaptureAudio.Audio_Plus_Mic; //this is line 387
    7.         }
    it did record my voice, but it play my voice at the same time when I'm in recording mode....is it suppose to do that?

    and I would like to know, does this plugin can playback what has been recorded earlier from inside the app? for example I have recorded some footage, I can replay it back again from the app with out saving the footage to my library.

    Thank you.
     
  21. hizral

    hizral

    Joined:
    Apr 27, 2010
    Posts:
    568
  22. Malveka

    Malveka

    Joined:
    Nov 6, 2009
    Posts:
    191
    Hi Hizral,

    One possibility is to use this property on the iVidCapProAudio component (from the docs):

    bool iVidCapProAudio.muteSceneAudio

    Set this property to true to mute the playback of scene audio on the device while recording scene audio to the video. This is especially useful when using the mic to record a voiceover. By using this feature you can get a clean vocal recording without having the scene audio feeding into the mic.

    If, however, you need to hear the scene audio while recording your voice over, the best bet is to use a headset with a microphone.

    Cheers,
    James
     
  23. tuanzi88

    tuanzi88

    Joined:
    Sep 10, 2015
    Posts:
    19
    Hi,

    This plugin is perfect working with my device, but not with simulator. An error pops up when running in simulator:

    dyld: Symbol not found: _ivcp_BeginRecordingSession

    My environment is:
    Xcode 7.3.1 + Unity 5.4.3f1 (also tried Unity 5.3.2f1)

    Steps to compile is:
    1) In Unity3D set Target SDK to "Simulator SDK" and build out Xcode project.
    2) In Xcode build project with Simulator set to iPhone6, and run it with Simulator popping up.
    3) Then error comes. (if manually click the app, no content is loaded)

    Currently Apple has rejected the app review with reason: "Upon launch no content is loaded." I suspect it is because they are using simulator to do review. But there is no solution so far to fix this after trying changing the settings, upgrade unity version.

    Is there anybody encounter the same issue? Or let me know what it is wrong with simulator. I will be very appreciated.

    Cheers,
    Tuani88
     
  24. tuanzi88

    tuanzi88

    Joined:
    Sep 10, 2015
    Posts:
    19
    Btw, Here is the full error message in Xcode:

    dyld: Symbol not found: _ivcp_BeginRecordingSession

    Referenced from: /Users/yikangsun/Library/Developer/CoreSimulator/Devices/0472566E-4C73-4808-AFB9-A1038C5DB11B/data/Containers/Bundle/Application/FC4DAE60-B8F4-436D-BFF4-C6A49A659443/anitalker.app/anitalker

    Expected in: flat namespace

    in /Users/yikangsun/Library/Developer/CoreSimulator/Devices/0472566E-4C73-4808-AFB9-A1038C5DB11B/data/Containers/Bundle/Application/FC4DAE60-B8F4-436D-BFF4-C6A49A659443/anitalker.app/anitalker
     
  25. Malveka

    Malveka

    Joined:
    Nov 6, 2009
    Posts:
    191
    Hi Tuani88,

    I've never tried building for the simulator so I've not encountered this issue. It sounds as though there is a difference in how the device version is being linked vs. the simulator version. If you haven't already done so, you may wish to check the framework linking options between the two. Is it possible that when the simulator version is linked it is not including the libiVidCapPro.a lib for some reason?

    Here is a link to a Stack Overflow question that may have some relevant information: http://stackoverflow.com/questions/6344560/dyld-symbol-not-found-error-how-to-resolve-this-issue

    Cheers,
    James
     
  26. tuanzi88

    tuanzi88

    Joined:
    Sep 10, 2015
    Posts:
    19
    Hi James,

    Thanks for your quick reply. The link is useful. I checked and libiVidCapPro.a file exist in linking option (see below). Following the link to changing flag to "Optional"; removing and adding library; creating a symlink; and importing the plugin into an empty project; didn't solve problem.

    Screen Shot 2016-05-15 at 12.00.13 AM.png


    I notice it looks for the libiVidCapPro.a at a path, which doesn't exist. Copy the library there doesn't solve problem too.

    Expected in: flat namespace

    in /Users/yikangsun/Library/Developer/CoreSimulator/Devices/0472566E-4C73-4808-AFB9-A1038C5DB11B/data/Containers/Bundle/Application/FC4DAE60-B8F4-436D-BFF4-C6A49A659443/anitalker.app/anitalker

    Do you know where in Xcode set the path? Maybe can change from that place. Oops, I know it is out of the question of this plugin already. :)

    Thanks & Cheers,
    Yikang
     
    Last edited: May 15, 2016
  27. tuanzi88

    tuanzi88

    Joined:
    Sep 10, 2015
    Posts:
    19
    Hi James,

    Lucky Apple Store reviewed again, and claimed the problem cannot be reproduced. They didn't give details, but I guess this time they tested it in device but not simulator. I still haven't found the solution for the link issue in simulator. But anyway, it is not urgent any more. Thank you!

    Cheers,
    Yikang
     
  28. stepan-stulov

    stepan-stulov

    Joined:
    Nov 26, 2013
    Posts:
    28
    Hi.

    Thanks for the plugin. Fantastic work. I also like that this plugin works within Unity's audio environment (sources, listeners, etc.) which is consistent.

    Unfortunately for me though, other plugins that play movie onto a texture on mobile completely bypass Unity's audio environment (you can disable all audio listeners and there are no audio sources) and still hear the movie sound. And that sound is expectedly not captured by iVidCapPro. Would the author know any easy fixes to "jumping out" of Unity and also capture natively played sound within the app? The only solution I can come up with now is simply play a silent video and play an audio clip within Unity's audio system in parallel. I'm yet to test the whole synching headache.

    Thanks in advance!
     
  29. BillyMFT

    BillyMFT

    Joined:
    Mar 14, 2013
    Posts:
    178
    I noticed a performance drop when I switched my project to OpenGL instead of Metal to get this plugin working. Are there any other workarounds for the "Assertion failed: (_surface->api != apiMetal)" error blamejane posted above?

    awesome plugin btw. Really nice work.

    Thanks
     
  30. BillyMFT

    BillyMFT

    Joined:
    Mar 14, 2013
    Posts:
    178
    So there is no way to get this working with the Metal Graphics API?
     
  31. NickBalanda

    NickBalanda

    Joined:
    Apr 30, 2015
    Posts:
    6
    Hey Guys awesome plugin!

    Does someone know if there is an easy way to share the recording within the game, using the plugin?
    That would be a nice feature.

    Cheers!
     
  32. ina

    ina

    Joined:
    Nov 15, 2010
    Posts:
    1,058
    has anyone been able to get this to work on iOS 11 (beta)
     
  33. Malveka

    Malveka

    Joined:
    Nov 6, 2009
    Posts:
    191
    Due to popular demand I am considering making iVidCapPro an open source project. If this interests you, please see my blog post here: http://wp.me/p2IHNT-aV
     
  34. robinanttal

    robinanttal

    Joined:
    May 5, 2017
    Posts:
    2
    I just want it to work with unity personnel also.
     
  35. Malveka

    Malveka

    Joined:
    Nov 6, 2009
    Posts:
    191
    The reason iVidCapPro originally only worked with Unity Pro was because it used rendertextures. I believe those are now available in all versions of Unity, so iVidCapPro should no longer be limited to Pro only. I haven't tested this personally.
     
  36. brendanluu

    brendanluu

    Joined:
    Jan 5, 2017
    Posts:
    7
    Please help make this ios11 compatible
     
  37. Malveka

    Malveka

    Joined:
    Nov 6, 2009
    Posts:
    191
  38. DevSpur

    DevSpur

    Joined:
    Jul 19, 2014
    Posts:
    20
    Hi Everyone
    Im using this plugin and it works great all that I need is to save the video to the streaming assets folder, is there a way if there is can anyone help
    thanks
    Devon
     
    Malveka likes this.
  39. Malveka

    Malveka

    Joined:
    Nov 6, 2009
    Posts:
    191
    Hi Devon,

    This will require a bit of extra effort, but not too much. When you call EndRecordingSession(), specify the VideoDisposition to Save_Video_To_Documents. This will save the video file to the app's "Documents" folder using the name you specified when you called BeginRecordingSession(), with an extension of .mov (pretty sure it's .mov; if that doesn't exist, try .mp4). When your delegate for handling the SessionComplete event (result of previous call to RegisterSessionCompleteDelegate that you presumably made) is called, you will need to copy/move the video file from
    the Documents folder to wherever you want it. You can do this in C# on the Unity side. To see how to access the Documents folder from C#, have a look at the the method GetDocumentsPath() in iVidCapPro.cs.

    Hope this helps!

    Cheers,
    James
     
  40. gnp89

    gnp89

    Joined:
    Jun 25, 2012
    Posts:
    36
    Used this plugin in 2017 and it worked like a charm. It's 2022 and I'm struggling to find a solution that works as good as this one, five years later and with better hardware.
    Wish this project was continued! Maybe it's still compatible with newer Unity versions, but I just can't risk using a repo that hasn't been updated in so long :(