Search Unity

AVPro Live Camera

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

  1. AndrewRH

    AndrewRH

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

    AVPro Live Camera version 2.9.1 has just been released!

    You can find the updated version on the Asset Store and the free trial version on our website.

    Changes include:

    Bug fixes
    • Fixed crash issue when selecting I420 pixel format modes due to buggy Logitech color conversion filter. This issue presented when using the “OBS Virtual Camera” filter which was pretty buggy itself. See FAQ for notes about OBS.

    Thanks to everyone that reported bugs that were fixed in this release :)

    Please report any issues here on the forum, or preferably to our Github Issue tracker

    Thanks,
     
  2. kaushal_1995

    kaushal_1995

    Joined:
    Sep 19, 2018
    Posts:
    2
    Hi, i am trying to use the AVProLiveCameraGrabber class to grab the texture2d but it shows up completely blank. In the inspector preview i can see the webcam image clearly.

    Edit: upon setting breakpoints and debugging it seems the method GetFrameAsColor32 is returning false, which i assume means it failed. Since its a native dll i am not sure why it fails.
     
    Last edited: Mar 26, 2021
    newgaze likes this.
  3. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    158
    Please refer to this issue: https://github.com/RenderHeads/UnityPlugin-AVProLiveCamera/issues/30

    Thanks.
     
  4. franMx

    franMx

    Joined:
    May 27, 2013
    Posts:
    25
    Hello, I am trying to get/set options from script to:
    a) Get current format (codec?) I only get "YUV_422_HDYC" as format, no matter if I select mjpg or yuv_yu2. Problem is if I selet mjpg I get inverted image, so would like to flag if texture flip is necessary or not.
    b) Set camera, resolution and format, from script. So far can use
    Code (CSharp):
    1.  
    2. AVProLiveCamera avCam;
    3. ...
    4. avCam._modeSelection = AVProLiveCamera.SelectModeBy.Index;
    5. avCam._desiredModeIndex = 0; //example
    6.  
    but would rather be able to specify each individually. code snippet if possible please.
     
  5. XB23

    XB23

    Joined:
    Sep 12, 2018
    Posts:
    12
    Hello, I just bought your asset and I have some problems using the example defaultcamerademo, when I select my device, it gets the good resolution but there is no fps option in green and there is a bad video format.

    I have an eco capture magewell dual hdmi in my pc and I plug in the hdmi, a Birddog p100.
    The camera output is 1920/1080, 50fps, in YUV_UYVY, but when I select it, it says 1920/1080, no fps activated and YUV_YUY2.

    I would like to know how to automatically put the good parameters.
    Best regards.
     
  6. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    158
    Hi @franMx

    Could you please post this as an issue on our Github page? Our entire technical team monitors those issues and we're trying to get everything in one place.

    Thanks!
     
  7. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    158
    Hey @XB23

    As above, could you please post this on our Github page so someone from our technical team can get back to you?

    Thanks.
     
  8. GeorgeUamTec

    GeorgeUamTec

    Joined:
    Jul 30, 2019
    Posts:
    5
    Hey AndrewRH,

    Hope you are well!

    This is more of a feature than an error. We are using your 2 products AVProCapture and LiveCam which are awesome assets by the way.

    Our application is purely camera based and Unity was the best choice.

    We first used Unity's webcam feature to display our camera, however it had it's limitations. I found though and also implemented the ability to detect a camera when I plug/Unplug the devices and Unity was able to update the count of devices in runtime. This is an important feature for software product.

    I found that when I try this through your API, It seem only to initialize the cam devices when they are already plugged in and I start unity. But does not re-initialize in runtime, when I try to remove and plug the device back in
    I am still on the intermediate side of development but was able to scan through your code and get it up and running until into this feature.

    Is there something I am missing?. Is this not possible yet with your product?

    Is there something I could customise to get it working?

    Platforms:
    Unity version: 2020.3.12f1
    AVProLiveCam Version: 2.9.1
    OS: Windows 10

    Hope to hear from you soon:)

    Much obliged.
     
  9. NathanRH

    NathanRH

    Joined:
    Oct 24, 2012
    Posts:
    429
    Hi,

    Have you ticket the option "support hot swap" which is designed to detect device unplug/replug?

    Thanks,
     
  10. GeorgeUamTec

    GeorgeUamTec

    Joined:
    Jul 30, 2019
    Posts:
    5
    Hey AndrewRH,

    Yes I have ticked hot swap unfortunately it freezes and does not re-initialize. Even when I've run the demo scenes that you have setup.

    Thanks
     
  11. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    158
    Hi @GeorgeUamTec

    Could you please log an issue with all relevant information on our Live Camera Gtihub so we can help resolve this.

    Thanks.
     
  12. GeorgeUamTec

    GeorgeUamTec

    Joined:
    Jul 30, 2019
    Posts:
    5
    Hey AndrewH,

    All good. I realised I had to also click support hot swapping in the manager component. And now it works fine.
    Thanks I will post any issues in the Live Camera Gtihub if I come across any. So far so good though:)

    Much Obliged!
     
    TerryRH likes this.
  13. MidnightCoffeeInc

    MidnightCoffeeInc

    Joined:
    Feb 28, 2017
    Posts:
    251
    Hey @TerryRH I am considering purchasing LiveCamera because I need to access hardware cameras at runtime, but I'm a little confused: This asset advertises compatibility with DeckLink products... if that's the case, what's the point of the much more expensive DeckLink asset you offer?

    If my users are plugging their cameras into a decklink capture card, will this asset (LiveCamera) be able to access it? Or do I need the other asset as well?

    Additionally, how does your integration with ChromaKeyKit work? I have that asset as well and am using it with a webcam, but want to use it with better, HD cameras too.

    Thanks!
     
  14. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    158
    Hi @MidnightCoffeeInc

    AVPro DeckLink is built using the native DeckLink SDK, whereas AVPro Live Camera is built on Microsoft DirectShow and is more of a general camera input plugin, without any DeckLink specific features. This means that the AVPro DeckLink plugin has a lot of advantages:
    • Automatic input mode detection
    • Lower latency
    • Better performance
    • Output support (so you can send Unity content out to the DeckLink card)
    • Supports keying modes for output (so you can composite Unity rendering over a DeckLink input stream in the output)
    • Genlock features
    • DeckLink audio support (input and output)
    So the two major differences are better input handling and the output rendering. Output rendering is very useful for broadcast and other media cases. Basically this asset is aimed at professional broadcasters or anyone who wants to get the best results from AV capture, compositing or rendering.

    Ultimately, it really depends on your use-case. We offer feature-complete free trials of both products which you're welcome to test with. You can find the DeckLink trial here and the Live Camera trial here.

    As for ChromaKey - we don't have access to that asset but we've had users reporting smooth integration with our plugins. You would have to ask them about their implementation if you wanted more details.

    Thanks!
     
    Last edited: Aug 16, 2021
  15. MidnightCoffeeInc

    MidnightCoffeeInc

    Joined:
    Feb 28, 2017
    Posts:
    251
    Okay, thanks for the detailed reply, I appreciate it!
     
    TerryRH likes this.
  16. Kaimen001

    Kaimen001

    Joined:
    Aug 25, 2014
    Posts:
    8
    Hello AndrewRH,
    I am using AVPro Live Camera plugin for Unity in a project. Due to application requirements, I must synchronize several events with the video capture. My problem is that the video capture is ahead of these events in time. I need to be able to delay the video capture a few frames. I understand that I will need a video buffer. Is there a way to do this with AVPro Live Camera?
    Thanks.
     
  17. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    158
    Hi @Kaimen001
    There is no feature in AVPro Live Camera to delay frames - we display the frames as soon as they come through. This is something you could implement in Unity if you wanted to - by copying the frames into a buffer and then only showing older ones and working your way through it. It would however use more memory.
     
  18. Kaimen001

    Kaimen001

    Joined:
    Aug 25, 2014
    Posts:
    8
    Ok, Thanks!
     
  19. Kaimen001

    Kaimen001

    Joined:
    Aug 25, 2014
    Posts:
    8
    Hi TerryRH,
    I am having a little problem with AVPro Live Camera. I have a Blacmagic DeckLink Quad HDMI Recorder mounted on the computer and it works perfectly from the blackmagic software without any drops. With AVPro Live Camera and Chroma Key Kit in Unity everything apparently works fine. I only have one problem and that is that there are drops in the signal every 10 - 20 seconds. I have no idea why it can be. Could you give me an idea to solve it?
    The equipment is a tenth generation i7 with an Nvidia RTX 3080.
    Thank you.
     
  20. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    158
    What exactly do you mean by drops in the signal? Can you describe the behaviour/send a screen recording?
     
  21. Kaimen001

    Kaimen001

    Joined:
    Aug 25, 2014
    Posts:
    8
    Hi TerryRH, thanks for responding.
    I attach a video at a time where the problem happens to us. On the left is the source signal and on the left the signal processed with AVPro Live Camera and Chroma Key Kit in Unity.
    Thank you.
     

    Attached Files:

  22. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    158
    Thanks for sending a video. Not sure I'm seeing the issue though. Are you sure this demonstrates the signal drops? You say it happens roughly every 10-20 seconds but this video is only 5 seconds long.
     
  23. Kaimen001

    Kaimen001

    Joined:
    Aug 25, 2014
    Posts:
    8
    Hello TerrryRH, I have only sent you a piece of the video where you see the problem. If you look at the original camera on the left, the movement is very fluid. On the right there are small stops. This also happens to me even if I deactivate the 3D scene and the chroma. I begin to think that it may be a synchro problem between the capture and the graph. What you think?
    Greetings
     
    TerryRH likes this.
  24. Kaimen001

    Kaimen001

    Joined:
    Aug 25, 2014
    Posts:
    8
    Hello TerryRH, I am attaching a video of when it looks good.
     

    Attached Files:

  25. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    158
    Ok, I understand. There's a lot of reasons why this could be happening so it's difficult to say outright. The two main things we'd suggest are:
    1. Check the garbage collection - Unity could be doing this regularly causing a dropped frame every time
    2. Check the frame rate of your recorder vs that of Unity - ideally you'd want these to match otherwise you'd see this sort of jitter effect.
    A third thing to note is that the Live Camera plugin is based off DirectShow - and the problem could be something to do internally with Black Magic and DirectShow. AVPro Live Camera is not really meant for this kind of production-level application where every single frame is important. We have another product called AVPro DeckLink which is intended and much better suited to this type of work, specifically meant to pair with DeckLink hardware. ChromaKey also have an integration for AVPro DeckLink, to our knowledge. We have a free trial version here if you'd like to test it.
     
  26. gtk2k

    gtk2k

    Joined:
    Aug 13, 2014
    Posts:
    178
    I am using a Live camera (AVProLiveCamera) component.
    I unchecked Auto Format in the Inspector and set the specific format to "RAW_BGRA32".
    However, the format of OutputTexture is R8G8B8A8_UNorm.
    I want texture format is B8G8R8A8_UNorm.
     
  27. edufurlaneto

    edufurlaneto

    Joined:
    Sep 18, 2017
    Posts:
    13
    Hi. I need four 4K inputs with loop thru on my system. I am thinking of using 4 USB Magewell 4K. Do you know if is supported?
    Or do you think using a Decklink Quad HDMI and four HDMI splitters would be a better solution?
    Thanks
     
  28. roimil

    roimil

    Joined:
    Nov 17, 2017
    Posts:
    7
    Hello Thank you for your plugin
    I am using it in a PC app which letting users control the camera settings like brightness, contrast etc
    I am letting the use decide if to enable automatic or manual control over the settings
    one parameter i have trouble with is the Exposure setting.
    i need to know the current exposure value even if it is set to automatic
    and the result i get from the api is wrong.
    maybe i am doing it wrong so here is the way i get and control the settings :

    declare variables :
    Code (CSharp):
    1. AVProLiveCameraSettingBase exposure_settingBase;
    2. AVProLiveCameraSettingFloat exposure_settingFloat;
    assign variables :
    Code (CSharp):
    1. exposure_settingBase = _liveCamera.Device.GetVideoSettingByType(AVProLiveCameraDevice.SettingsEnum.Exposure);
    2. exposure_settingFloat = (AVProLiveCameraSettingFloat)exposure_settingBase;
    change settings :
    Code (CSharp):
    1. exposure_settingFloat.CurrentValue = val;
    2. exposure_settingFloat.Update();
    control automatic :
    Code (CSharp):
    1. exposure_settingBase.IsAutomatic = true;
    get values :
    Code (CSharp):
    1. Debug.Log("current val : " + exposure_settingFloat.CurrentValue);
    2. Debug.Log("default val : " + exposure_settingFloat.DefaultValue);
     
  29. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    158
    Not sure exactly what you're trying to do here/what the issue is - could you please tell us the following, preferably in an issue on our Github:
    1. Why do you want B8G8R8A8?
    2. What are the issues you're seeing?
    3. What type of camera are you using?
    4. Which version of AVPro Live Camera are you using?
     
  30. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    158
    The Magewell should be supported but you'd have to test it. We have a free trial that you can use for this purpose.
    However, it sounds like your use-case would be better suited to using our DeckLink plugin, AVPro DeckLink - free trial here. It's much better optimised and has better support for DeckLink hardware. Please let us know if you require further information.
     
  31. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    158
    Hi there,
    Could you try this in the Camera Explorer Demo scene? Make sure to toggle the 'update settings' button. It'd be useful to know if this works for you.
    There's also a chance that it's a driver issue - in which case it'd be useful for you to update your drivers.
    Can you also let us know which webcam you are using?
     
  32. bazevent

    bazevent

    Joined:
    Feb 13, 2015
    Posts:
    4
    Hi
    I try to use xsplit vcam , do you have some advice or a tutorial to explain how it works ?
    I launch xsplit v cam and background demo on unity . I just can see x plit vcam logo ? Do I need to subscribe a licence to xsplit ? and I use your demo version , because I want to see if the solution work before buying it .
    Thx for your help
     
  33. roimil

    roimil

    Joined:
    Nov 17, 2017
    Posts:
    7
    Thank you for replying. i tried the Camera Explorer Demo Scene :
    if i set the Exposure to Manual and move the slider handle all the way to the left (for example) to get the most "bright" exposure then the value is -11 and i can get this value with "exposure_settingFloat.CurrentValue"
    if i set to Auto then the value becomes unknown, it is somewhere between -11 and -10 and if i try to get the value i still get the last manual selection (-11).
    if i try to get the default value using : "exposure_settingFloat.DefaultValue" i get -5 which is not the correct Automatic value

    EDIT - I understand that the DeafultValue is not the value that the Automatic setting value will produce, but if there is a way to get the current value even if set to Automatic mode it will solve my issue. Thank you
     
    Last edited: Sep 29, 2021
  34. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    158
    You'll probably need to use vcam software to assign a webcam/specific settings. Not sure of a step-by-step as this is device specific and not directly an AVPro Live Camera issue.
     
  35. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    158
    Sorry, a little confused as to what you mean here. Is there a chance you could give a more detailed description of what the problem is? Not sure if this will help, but we're just polling back the values from the driver - the values there are the values we get back, so it seems unlikely we can help with that (unless we're misunderstanding your issue).

    It'd probably be best to log this as an issue on our Github, with all the relevant details and screenshots.

    Thanks!
     
  36. ickydime

    ickydime

    Joined:
    Nov 20, 2012
    Posts:
    94
    Any chance of UWP support?
     
  37. TerryRH

    TerryRH

    Joined:
    Dec 3, 2019
    Posts:
    158
    This was responded to on our Github. For anyone else who might have the same question: UWP is not currently supported, but will likely be a feature of our next major release. Progress can be followed/details added here.
     
unityunity