Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

AVPro Live Camera

Discussion in 'Assets and Asset Store' started by AndrewRH, May 24, 2012.

  1. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,648
    We haven't, but there's no reason we can think of why it shouldn't work. They're nice looking cards! As usual you can use the downloadable demo on our website to test with your hardware.
     
  2. Filip Van Bouwel

    Filip Van Bouwel

    Joined:
    May 11, 2011
    Posts:
    5
    Just started using this plugin for a project. Looks pretty sweet so far. One thing that's very strange though, is that my inspector settings for the 'AVProLiveCamera' script are always disregarded and reset when I play my app. Eg : when I change the _deviceSelection from Default to Name and I press play and do a Debug log of that variable, it'll be reset to Default. I made it into a property and put a debug log in the setter, but nothing shows up in my logs that changes it back from Name to Default. Very strange.

    It has something to do with the custom inspector though; I've put the custom inspector in comments and suddenly I didn't have the problem anymore.

    Any idea what may cause this?
     
  3. Filip Van Bouwel

    Filip Van Bouwel

    Joined:
    May 11, 2011
    Posts:
    5
    And found the problem. The _camera object wasn't marked as dirty when changes were made. Adding the following code to the end of the OnInspectorGUI() method in AVProLiveCameraEditor.cs works.

    if (GUI.changed)
    {
    EditorUtility.SetDirty(_camera);
    }
     
  4. EarMaster

    EarMaster

    Joined:
    Mar 7, 2013
    Posts:
    29
    I bought a Decklink Mini Recorder and it works fine with AVPro Live Camera.
     
  5. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,648
    Thanks for letting us know, glad to hear it :D
     
  6. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,648
    Thanks for the fix Filip! I'll include that in the next release.
     
  7. kuailaiwanli

    kuailaiwanli

    Joined:
    Apr 22, 2013
    Posts:
    32
    I found a problem.
    when i use CameraExplorerDemo demo. It runs ok.
    I new a c# script,rename it "Test", I copy all the scripts in "AVProLiveCameraCameraExplorerDemo",then paste them in "Test".
    I drag "Test" to camera,remove "AVProLiveCameraCameraExplorerDemo",Click run button.
    console tell me there's something wrong:

    [AVProLiveCamera] Trying to use component before it has started or after it has been destroyed.
    UnityEngine.Debug:LogError(Object)
    AVProLiveCameraManager:get_Instance() (at Assets/AVProLiveCamera/Scripts/Wrapper/AVProLiveCameraManager.cs:56)
    Test:EnumerateDevices() (at Assets/Scripts/Test.cs:18)
    Test:Start() (at Assets/Scripts/Test.cs:12)

    NullReferenceException: Object reference not set to an instance of an object
    Test.EnumerateDevices () (at Assets/Scripts/Test.cs:18)
    Test.Start () (at Assets/Scripts/Test.cs:12)

    Double click the second wrong,it turns to this:
    int numDevices = AVProLiveCameraManager.Instance.NumDevices;
     
  8. TheRaider

    TheRaider

    Joined:
    Dec 5, 2010
    Posts:
    2,185
    could this read a live mjpeg ip cam video stream into unity?
     
  9. r233967

    r233967

    Joined:
    Sep 24, 2013
    Posts:
    2
    I'm looking to buy a compatible HDMI capture card to use with your plugin and a MacBook Pro. Would the BlackMagic UltraStudio Mini Recorder work? Or is there a better recommendation? Thanks!
     
  10. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,648
    Hi r233967,

    Our plugin is compatible with BlackMagic capture hardware (such as Intensity and DeckLink). The plugin is Windows PC only though so it'll only work if you are running Windows on your MacBook Pro. If you want to give me details on what you want to do, I can try to recommend something.

    Cheers,
     
  11. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,648
    Hi TheRaider,

    Yes that may be possible, depending on the manufacturer. Our plugin relies on the camera having its own DirectShow driver. You can contact your camera manufacturer to see if they support this. We also have a demo on the website you can use for testing your hardware.

    Cheers,
     
  12. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,648
    Hi kuailaiwani,

    Check the script execution order. Add your 'test' script to the list and make sure it appears after AVProLiveCameraManager script.

    Thanks,
     
  13. megisto

    megisto

    Joined:
    Dec 25, 2009
    Posts:
    127
    Hi Andrew! Is it possibile to use your plugin with a camera directly connected to the pc via Firewire, without capture card?
     
  14. Gaccho

    Gaccho

    Joined:
    Feb 7, 2014
    Posts:
    1
    Greetings.

    We are experiencing lag.

    We have set up 4-5 live cameras using this plugin. Only one camera is running (SetActive = true) at a time.

    When we run the project in Editor, we get lag (for about 70 frames) once in a while, without any pattern - It can be 5 times/min or once in 5min. When this happens, profiler shows GPU usage drop (in the attached picture you can see it at the end part)
    $lag2.PNG

    Any idea what could be causing this lag?
     
  15. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,648
    As long as the camera is compatible with DirectShow then it will work. You can test your camera with the downloadable demo on the plugin website.
     
  16. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,648
    Hi Gaccho,

    What version of the plugin and Unity are you using? Are you actually pausing the other cameras when they're not active? We recommend you pause them so they don't run in the background.
     
  17. Natancoutured

    Natancoutured

    Joined:
    Dec 11, 2012
    Posts:
    2
    Hi! First of all your plug-in work like a charm and we are very satisfied with your product :)

    I have some question for you:

    I need to apply a live stream on object that we see from far away (in a big 3d world) my concern is the texture output flicker when you watch it from a distance. Should it be possible to anisio or filter the content? If yes can you give me pointer?

    I have the chance to work with monster machine, i need to achieve 6 live full hd stream in your opinion could it work? And do you have any tips to increase the performance or any tips to achieve those kind of result:)?

    Sorry for my terrible english.

    Thanks Again,

    - Natan
     
  18. megisto

    megisto

    Joined:
    Dec 25, 2009
    Posts:
    127
    Thank you
     
  19. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,648
    Hi Natan,

    Yes 6 live full HD streams should indeed work, provided you have a good enough machine and are not overloading the bus.

    The problem with the texture flicking is probably due to the fact that we're not generating any mip maps for the texture. This is something we need to look into. In the meantime you could try to find your own solution for this.
     
  20. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,648
    Hi, we're working on some new features and thought we'd share them here to get some feedback.

    The next release will feature exposed camera settings so you can control settings such as exposure, white balance etc. Here's what it looks like in the editor:

    $avprolivecam-settings2.png

    And here's an example test app:

    $avprolivecam-settings3.png

    Feedback welcomed :)
     
  21. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,648
    Hi All,

    We've just released version 1.90 of AVPro Live Camera plugin!

    Changes in this version include:

    + Camera settings such as brightness, contrast, focus, exposure etc are now exposed so you can control them from your app.
    + Flip X and Flip Y have been added so it's easier to create a mirrored webcam
    + Various bugs fixed, documentation updated and other minor improvements
     
  22. Natancoutured

    Natancoutured

    Joined:
    Dec 11, 2012
    Posts:
    2
    Thank you that what i tought for the mipmap! I will send you some stuff if i found a solution.

    I installed the 1.90 awesome work, i don't see your new Camera settings features tho..? but it look awesome it is exactly what i need.
     
    Last edited: Mar 13, 2014
  23. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,648
    Yeah, Unity can auto-generate mipmaps for RenderTextures but only for ones of pow-2 size :( This is a great shame... I also couldn't find any way to render into the mip levels manually...

    The camera settings should be exposed, but it will depend on your webcam. Some webcams don't expose and settings, others expose a whole bunch. The settings sliders should appear in the editor when you run your scene on your AVProLiveCamera component.

    Cheers,
     
  24. Avengerxp

    Avengerxp

    Joined:
    Sep 9, 2013
    Posts:
    12
    Hi Andrew,

    I want to know if it is possible to live feed a Sony HD handycam feed via blackmagic capture to unity?

    As I read the specs on Blackmagic Intensity Pro internal card, this plugin will not record but directly pull the stream from camera and display it in unity?
     
  25. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,648
    Yes that'll work just fine. Sony cam >> blackmagic device >> avprolivecamera plugin >> unity texture
     
  26. yifan024

    yifan024

    Joined:
    Jun 5, 2013
    Posts:
    19
    Is audio supported yet? thanks
     
  27. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    1,842
    Get this plugin RIGHT NOW! Don't waste your time trying anything else!
     
  28. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,648
    Not yet no :) Working on it....
     
  29. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,648
    Another happy customer :) Thanks Castor76!
     
  30. pantopan

    pantopan

    Joined:
    Nov 6, 2013
    Posts:
    1
    Hey Andrew!
    Is it possible to answer when to expect audio support?
    Thanks!
     
  31. Interactivame

    Interactivame

    Joined:
    Apr 8, 2013
    Posts:
    1
    Hi. I did buy this amazing plugin. I will like to know how to apply 2 different video signals to 2 different materials. For example: I have 2 inputs (1 web cam and 1 decklink signal) and I want to apply the webcam signal to a material named "cc" and the decklink signal to a material named "laptop".

    Thanks!
     
  32. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,648
    What sort of audio features are you looking for? How would the audio integrate into Unity?

    Thanks,
     
  33. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,648
    Hi,

    Simply use the AVProLiveCameraMaterialApply component. You would need 2 of these scripts with each one mapped to it's own material and AVProLiveCamera.
     
  34. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,648
    AVPro Live Camera version 1.92 released!

    Changes include:

    1) Fixed textures not being released in editor
    2) Added names to textures

    As usual demos can be found on the website.
     
  35. Nilk

    Nilk

    Joined:
    Jun 21, 2013
    Posts:
    2
    Hi Andrew,
    I've tried your AVPro live camera and AVPro movie capture (just a demo), and it work really good.
    However, my project need an other feature : Capture gameplay screen and send it to other device via decklink card SDI.
    Do you have any plan for this idea?
    I'm looking forward to it.
    Thanks.
     
  36. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,648
    Yes, we do have an internal system that can do this. Email us for more information.

    Thanks,
     
  37. yifan024

    yifan024

    Joined:
    Jun 5, 2013
    Posts:
    19
    One quick question, is 4K input supported with black magic Deckling 4k card? Thanks
     
  38. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,102
    For me the Deltacast HD Card and the Deckling 4k did not work, anyone a hint what i could done wrong?

    PS: i get good video signal with the Default/ provided Software

    The Deltacast HD is not detected at all , no signal or device.
    The Deckling 4k delives the device but not usable signal.
    Both Windows 7X64
     
  39. EarMaster

    EarMaster

    Joined:
    Mar 7, 2013
    Posts:
    29
    I have a problem using the Decklink Studio 4K and a Blackmagic Cinema Camera. I don't get a signal every time I start the capture device. I also tried your demo and have the same problem. I only get a signal in about 1 of 8 attempts to capture the input. In the other cases I either get a pink or (in most cases) a gray input. Any ideas?
     
  40. EarMaster

    EarMaster

    Joined:
    Mar 7, 2013
    Posts:
    29
    Nobody else with a similar problem? I have no problems using Blackmagic's Media Express to access the camera stream. It starts immediately. But from within Unity with the Live Camera plugin it only works sometimes. Even if you don't know why this is the case, can you suggest a method to constantly trying to access the stream until it works?
     
  41. EarMaster

    EarMaster

    Joined:
    Mar 7, 2013
    Posts:
    29
    I am now checking for the AVProLiveCamera.CaptureFPS count. If it is zero I call Close() on the AVProLiveCameraDevice, wait half a second and then call Begin() on the AVProLiveCamera again. This takes some iterations (a chance of about 1/8) but seems to be reliable.
     
  42. wmaass88

    wmaass88

    Joined:
    Dec 23, 2012
    Posts:
    43
    For me personally it would be very useful to be able to hear and control the volume for Decklink streams in Unity. I understand that Decklink does not output audio to the PC's audio system so I don't know how hard this would be. Since you can record Decklink streams with audio in Media Express it seems it should be possible, no?
     
  43. stefanseibert

    stefanseibert

    Joined:
    Oct 21, 2014
    Posts:
    2
  44. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,648
    Hi everyone,

    Sorry for the long absence but there's been a lot going on :)

    We're just released version 2.0 of the AVPro Live Camera plugin! Improvements include:
    • Supports Unity 4.6 and Unity 5.0 (beta)
    • Added Unity 4.6 uGUI component
    • Added NGUI component
    • Improved documentation
    • Fixed Blackmagic Decklink SDI 4K bug
    • Dropped support for Unity 3.x, now requires Unity 4.1 minimum
    • Simplified code after dropping legacy Unity 3.x support
    The new version should be on the Asset Store soon. If you want to try it sooner don't forget there's a free trial version on our website.

    Let me know if there are any issues, thanks :)
     
  45. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,648
    Hi legarcon, no we haven't had any AJA cards handy for testing. If the AJA cards have a DirectShow driver then it should be compatible.
     
  46. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,648
    Hi EarlMaster, yes we have tested it winth the SDI 4K card and can confirm the issue. I believe it has been fixed in the latest version.
     
  47. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,648
    I believe that I've read that BlackMagic DeckLink drivers don't send 2K or 4K signal to their DirectShow drivers... I'm not sure why this is the case. I also don't have a 4K input device to test this well.
     
  48. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,102
    That sound like a good explanation ... good we did not need it in the end :)
     
  49. kylekaturn

    kylekaturn

    Joined:
    Feb 24, 2013
    Posts:
    8
    Hello Andrew,
    I'm trying to use AVProLiveCamera with my CV & Image Processing project.

    Due to no support for GetPixels method in RenderTexture, I need to change RenderTexture into Texture2D.
    and it costs so much processing power.

    Do you have any advice to acheive get pixel data from RenderTexture more efficently?
     
  50. EarMaster

    EarMaster

    Joined:
    Mar 7, 2013
    Posts:
    29
    Thanks for your reply. Is the change to 2.0 combined with a change in the API or should scripts which interacted with the previous version work as before?

    Edit: I just did a test with the problem described in #139. With the new version my script-workaround isn't working anymore and I always get a pink input (no matter if my workaround is active or not).

    The bug also isn't Decklink 4K Studio specific. I also ran this application on a machine with a Decklink Mini Recorder some time ago and also needed my workaround to access the camera image from the Cinema Camera.

    Edit-Edit: My fault. I forgot to replace the old plugin-dlls. You were right, the bug is fixed.
     
    Last edited: Feb 11, 2015
unityunity