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,806
    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. seabits

    seabits

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

    Thanks.
     
  4. franMx

    franMx

    Joined:
    May 27, 2013
    Posts:
    30
    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:
    20
    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. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    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. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    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. GUMTEC1

    GUMTEC1

    Joined:
    Jul 30, 2019
    Posts:
    7
    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:
    447
    Hi,

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

    Thanks,
     
  10. GUMTEC1

    GUMTEC1

    Joined:
    Jul 30, 2019
    Posts:
    7
    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. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    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. GUMTEC1

    GUMTEC1

    Joined:
    Jul 30, 2019
    Posts:
    7
    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!
     
    seabits likes this.
  13. JudahMantell

    JudahMantell

    Joined:
    Feb 28, 2017
    Posts:
    476
    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. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    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. JudahMantell

    JudahMantell

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

    Kaimen001

    Joined:
    Aug 25, 2014
    Posts:
    14
    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. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    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:
    14
    Ok, Thanks!
     
  19. Kaimen001

    Kaimen001

    Joined:
    Aug 25, 2014
    Posts:
    14
    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. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    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:
    14
    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. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    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:
    14
    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
     
    seabits likes this.
  24. Kaimen001

    Kaimen001

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

    Attached Files:

  25. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    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:
    288
    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:
    17
    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. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    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. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    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. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    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. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    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. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    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:
    110
    Any chance of UWP support?
     
  37. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    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.
     
  38. firepad9

    firepad9

    Joined:
    May 20, 2016
    Posts:
    8
    Does it support asynchronous function now?
     
    gtk2k likes this.
  39. NathanRH

    NathanRH

    Joined:
    Oct 24, 2012
    Posts:
    447
    What do you mean?

    Thanks,
     
  40. firepad9

    firepad9

    Joined:
    May 20, 2016
    Posts:
    8
    livecamera.start() or livecamera.device.stop() will block the thread. Instead, i just make the component active enable or disable, it works well. Of course, it works in backgroud.^_^
     
  41. Nigiri-Meshi

    Nigiri-Meshi

    Joined:
    Dec 24, 2020
    Posts:
    9
    Hi team.

    I'm trying to display multiple Axis network cameras.
    However, it is not possible to display the second and subsequent units.
    Does AVPro Live Camera not support multiple Axis cameras?

    - "Axis Streaming Assistant" is already installed.
    - The image of the camera (DeviceName: "AXIS Streaming Assistant Default Video Device") set as the Default Camera in "Axis Streaming Assistant" is displayed.
    - The second and subsequent cameras are recognized by "AXIS Streaming Assistant".
    - Compornent [LiveCamera] "Device Select By"-> "Name"-> There is no display in the name -> The video was displayed.
    - Compornent [LiveCamera] "Device Select By"-> "Index"-> 0 -> The video was displayed.
    - Compornent [LiveCamera] "Device Select By"-> "Index"-> 1-> No displayed (Warning: Could not find the device.)

    <Version>
    AVPro Live Camera:2.9.1
    Unity:2021.2.0f1
     
  42. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    Hi there,

    It's possible that the AXIS streaming assistant is not enumerating all the devices - from your post above, it seems like only one device is being enumerated.

    Could you try our Camera Explorer Demo? If it's only finding a single device then it might be that the assistant is not exposing all the devices, which you might need to contact them about (from their docs it seems like it should expose multiple).
     
  43. Nigiri-Meshi

    Nigiri-Meshi

    Joined:
    Dec 24, 2020
    Posts:
    9
    Thank you TerryRH

    The cause has been found.
    Only one unit is recognized in the 32-bit version of "Axis Streaming Assistant".
    The 64-bit version of "Axis Streaming Assistant" was able to recognize multiple units.

    It seems that I installed the 32-bit version without knowing it.


    * Camera Explorer was out of print and could not be discontinue
    .
     
    seabits likes this.
  44. Nigiri-Meshi

    Nigiri-Meshi

    Joined:
    Dec 24, 2020
    Posts:
    9
    I will contact you as it may be a problem.

    It seems that the IsConnect flag is not working properly.
    If you alternate between pointing two devices to the same USB port, previously connected devices seem to be ignored.
    It seems that only the last newly connected device is responding with Reconnect.

    Are there any countermeasures, including emergency measures?
    (Update()?Begin()?)

    <Procedure>
    1. There is one USB port (α) and two USB cameras (A) and (B).
    2. Connect A to α. <= A is IsConnect = true
    3. Remove A from α. <= A is IsConnect = false
    4. Connect B to α. <= B is IsConnect = true
    5. Remove B from α. <= B is IsConnect = false
    6. Connect A to α. <= A is IsConnect = false ←?


    <Environment>
    Product:AVProLiveCamera 2.9.1 (Buy 2021/11/15)
    UnityVer : 2021.2.11f1
    OS:Windows10
     
    Last edited: Feb 23, 2022
  45. EI-UK

    EI-UK

    Joined:
    Dec 1, 2021
    Posts:
    4
    Hi, we're still evaluating the trial version to confirm we can use it for a specific machine vision application. Thanks to a support email reply, we now have a USB3 vision camera working successfuly.

    Is there a method to modify the camera settings that are displayed in the config window? For instance, we need to set gain and gamma correction on first load (as values are not stored when the camera is powered off) and also to dynamically change values (using UI) whilst the camera is in use.

    Thanks
     
  46. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    Have you tried using the update options (eg. 'hotswap') in the LiveCamera component?
     
  47. seabits

    seabits

    Joined:
    Dec 3, 2019
    Posts:
    199
    Hi there,

    Here's a code snippet that should give you something to work with:

    Code (CSharp):
    1. AVProLiveCameraDevice device = liveCamera.Device;
    2. AVProLiveCameraSettingBase settingBase = device.GetVideoSettingByType(AVProLiveCameraDevice.SettingsEnum.Exposure);
    3. if (settingBase != null && settingBase is AVProLiveCameraSettingFloat)
    4. {
    5.     AVProLiveCameraSettingFloat setting = settingBase as AVProLiveCameraSettingFloat;
    6.     setting.IsAutomatic = false;
    7.     setting.CurrentValue = 1.0f;
    8. }
    Let us know if that helps!
     
  48. EI-UK

    EI-UK

    Joined:
    Dec 1, 2021
    Posts:
    4

    Hi, many thanks for the reply. This method does work fine for a standard webcam but fails to return any settings using the Flir USB3 Vision camera which is our requirement. Looping through the available video settings returns null for this camera.

    What we're looking for is to be able to read/write the nodes via script, as we can manually do using the configure window in the CameraExplorerDemo (below).

    Thanks,

    Adam

    upload_2022-3-17_11-59-15.png
     
  49. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    I suspect those settings are not exposed via DirectShow (the API that we're using) so we don't have any way to read/write them. That config window is a custom window that is authored by the developers and sadly looks like it contains options they aren't exposing to the API.
     
  50. EI-UK

    EI-UK

    Joined:
    Dec 1, 2021
    Posts:
    4
    Hi Andrew, thanks for the reply. That's a shame as allowing access to the nodes via the API would open up many machine vision applications.