[Updated 10/08/2018] [v2.6] Multiple Displays + Servers, 4K UHD (DirectX 11) Windows Screen Grabber

  • DirectX 11 screen capture performs better than DirectX 9? 18

    1. Yes (17) 94%
    2. No (1) 6%

    Download links at the end of this post


    [COLOR=rgb(89, 179, 0)]Multiple display capture and multiple Hyperion server support is finally here![/COLOR]


    [H]Introduction[/H]
    I have been working on updating the windows grabber provided by hanselb. I started coding on top of the bug fixes in the pull request sent out by RickDB. My aim was to add DirectX 11 capture to the app to enhance the performance during everyday use and to make the application more functional and fault tolerant.


    My PC runs an Intel Core i7 6700K with dual GTX 1080 GPUs. With DX11, I was able to achieve framerate close to 60 FPS on my PC while 0.5% CPU usage and about 6% GPU usage. This is a significant improvement over DX9 capture which uses 16.5% CPU and 10% GPU. The result is that the lights respond at realtime with my 4K display.


    The app still support DX9 and greatly improves fault tolerance. There are still a couple of things that I plan to do for screen capture optimizations. The code is hosted on GitHub. I would encourage you to download the setup file linked below and give it a try.


    Please report all issues here.


    Since the code was heavily modified, I'm not sure if it can be merged into the original repository. If you are an Admin, please let me know if that is possible.


    [H]Screenshots[/H]





    [H]Downloads[/H]
    https://github.com/sabaatworld/HyperionScreenCap/releases

  • [H]Release Change log[/H]


    v2.6
    Bug Fixes

    • Fixes an issue with the detection of resolution of secondary displays. You should now be able to use this with as many displays as you want.


    • Fixed update check


    v2.5
    Bug Fixes

    • Fixed an issue which caused the app to crash on startup
    • Fixed an issue which caused the lights to turn off immediately after turning them on
    • Fixed taskbar icon not disappearing on exit issue
    • Corrected capture / transmission failure detection logic
    • Fixed application cleanup / exit logic
    • Improved logging at a few places


    v2.4
    Bug Fixes

    • Fixes a bug which prevented the API server from starting (Thanks @RickDB)
    • Fixed a bug which caused OUT_OF_MEMORY errors on ATI Radeon cards (Thanks @thymoze)
    • Enabled window auto resizing
    • Resized various buttons and other UI elements


    v2.3
    Added

    • Ability to capture multiple displays
    • Choose between DX11 or DX9 for each display capture independently
    • Ability to send captured image to multiple Hyperion servers
    • Added seamless settings upgrade - No need to re-configure application after an update


    Enhancements

    • Totally revamped setup form with support for multiple displays and Hyperion servers
    • Fixed icon size for task bar context menu
    • Replaced all icons with high-definition ones
    • Better looking taskbar icon when capture is disabled


    Bug Fixes

    • More bug fixes related to screen capture initialization


    Internal

    • Lot of code cleanup and refactor
    • Simplified multi-threading logic


    v2.2
    Added

    • Automatic update check on startup - You will be notified if a new release is available
    • Manual update check using the setup window
    • Added logging throughout the codebase
    • Ability to view logs using setup window - You can share logs to help fix issues


    Enhancements

    • Screen capture will be retried for a longer duration before giving up
    • Screen capture may work while hot-plugging displays and on lock screen (still unstable)


    Bug Fixes

    • Various bug fixes related to screen capture initialization


    Internal

    • Some code refactoring to fix bugs


    v2.1
    Added

    • Option to enable / disable pause on user switch
    • Option to enable / disable pause on system suspend


    Enhancements

    • Tray icon & save button on setup form is more responsive
    • Added more help content to explain DX11 configuration options


    Bug Fixes

    • Fixed DX11 MaxFPS and FrameCaptureTimeout in the setup form
    • Removed explicit delay before sending data to Hyperion


    Internal

    • Further code refactoring


    v2.0

    • Support for DirectX 11 screen capture along with DirectX 9 for buttery smooth performance even at 4K.
    • Fixed memory leaks at various places.
    • Much more stable code screen capture logic with in-built retries. Should crash much less as compared to the previous version.
    • DirectX 11 help directly available from the setup window
    • Fixed all issues with the setup window.
    • User configuration is now saved into the user's APPDATA directory avoid access denied issues.
    • Capture automatically pauses / resumes when workstation is locked / unlocked.
    • Capture automatically pauses / resumes on system sleep / wake.
    • Major code re-organization and cleanup.
  • So, i will give some feedback :)
    On Windows 7 64bit i get this in the following order with DX11:

    • Connected to Hyperion XYZ || With notifications set to error i get this:
    • After 10-15seconds: Error occured during capture: The object ref had no object instance (The second message part was german, this is a vague translation :)


    DX9:

    • Worked


    Ping all people of the old topic, not sure if they recognized your work you put in here. Also feel free to post improvement/extension ideas :)
    @Doc.Ex @HalbesHaehnchen @Rick164 @TPmodding @danielfmo @Slimboyfat @LooseChange @nash @iiidefconiii


  • Can you please verify the selected monitor and adapter index values in the settings? Also please share a screenshot of the message box that comes up when you click "view available DX11 monitor" option.

  • Hi this sounds great. I quickly tested it (not much time :() and it worked ootb :)


    On my quick test I recognised one thing: If you right-click on the tray icon it always say "Change DX9 monitor index" but I think I am using DX11 since it is checked in the settings as the screen capture method.


    But: Great work so far!

  • Hi this sounds great. I quickly tested it (not much time :() and it worked ootb :)


    On my quick test I recognised one thing: If you right-click on the tray icon it always say "Change DX9 monitor index" but I think I am using DX11 since it is checked in the settings as the screen capture method.


    But: Great work so far!


    Yes, that needs to be fixed. I did not work much on improving the tray icon options. And I think the Change DX9 monitor index option is partly broken as well.

  • Hi there,


    Just wanted to say thanks for your work. It works perfectly well on Windows 10 with DX12. I'm on a 21:9 screen with 3440x1440 resolution. No lag at all and 0.1% cpu usage. Great work ! Thanks again

  • Hi there,


    Just wanted to say thanks for your work. It works perfectly well on Windows 10 with DX12. I'm on a 21:9 screen with 3440x1440 resolution. No lag at all and 0.1% cpu usage. Great work ! Thanks again


    Since you are on a 1440p resolution screen. You can also try to decrease the Image Scaling Factor value. That will send a higher resolution picture to Hyperion and will probably (not tested yet :D) provide more accurate colors per LED. More information can be found in the "Help" tab of the Setup window.

  • Hi,
    at first I'd like to thank you very much Sabaat. Very nice work. I love it. Almost no lag with 4k and 1/16 scaling.


    But experienced the same error as Brindosch from time to time. This is what the screen shows when clicking on the "view available DX11 monitor" option.


    The adapter and monitor index seems ok to me.


    Thanks again for your superb work.


  • The adapter and monitor index settings seem to be correct. The error DXGI_ERROR_UNSUPPORTED means that DX11 is not supported by the graphics card hardware. I think in addition to the that you might need Windows 7 Service Pack 1.


    Is this the error you get? And when does the error happen?

  • Hi,
    thanks for the fast reply. I'm running Windows 10, so I think the system should be up to date.


    But I'll watch for the exact error message. It is possible that it's different. Unfortunately it's just displayed in a notification box. Is there a way to log it? I'll let you know as soon as I can get the exact message.

  • Hi,
    thanks for the fast reply. I'm running Windows 10, so I think the system should be up to date.


    But I'll watch for the exact error message. It is possible that it's different. Unfortunately it's just displayed in a notification box. Is there a way to log it? I'll let you know as soon as I can get the exact message.


    The error message will probably be different for you. If the screen capture keeps failing for approximately 30 seconds, it is turned off and the error message is displayed.


    It won't get logged at the moment. I'll look into what can be done about the logging events in the apps to enable debugging. If you know how to use Visual Studio, you can clone the source code and add a break point to debug.

  • First of all thanks for doing this.
    I have been able to successfully install. Having a bit of Trouble (think it is a Windows 10 issue though).
    [I can connect with HyperionScreenCap, but after like 20 seconds I get Windows error - Out of Memory]
    I will try a fresh install of Win 10, hopefully this will go away.


    But my question: How do I have to set up Hyperion to use the Screencap? I have deactivated the internal and external grabber Is that even correct? Is there something else I have to adjust? Is there some way - without LED to check if Hyperion can use the sent data ?


    Hyperion is running on a Pi Zero connected via wifi in headless mode. Data is sent via Protobuffer.
    At the Moment I dont have LEDs yet, they will arrive later this or next week.


  • Another user has recently reported the OutOfMemory Issue: https://github.com/sabaatworld/HyperionScreenCap/issues/5


    I'm not sure what is causing this right now so I haven't been able to fix it up yet. Setting up Hyperion to the data sent by the Windows Grabber is easy. You just need to ensure that the Proto port is enabled and that the priority used by the screen grabber is the lowest among all the sources Hyperion is configured to use.


    I am not aware of any solution that will let you see that the LEDs will work. The RPi's CPU usage could be one indication of the data being processed.

  • thanks for the fast reply.
    Protoserver is set up, about the priotity I will see. As I dont use an external grabber is it okay to deactivate both I guess.


    About preview: I just thought I can - for example - on the Hyperion see a grab of the Screen. SO I guess I will have to wait for my LEDs.


    The error which Comes up is from Windows. Googling it suggests it is somehow Windows Update related. It could jsut happen if you deactivate too much stuff in Windows (Antispy), therefore I want to try with a fresh install of Windows. I will let you know if that worked for me.


    EDIT: Now after reading the issue/bug. I suppose it is somehow related to AMD/Radeon Cards (I have RX470/8GB). Couldnt post this in the GITHUB thread though (dont know why).

  • thanks for the fast reply.
    Protoserver is set up, about the priotity I will see. As I dont use an external grabber is it okay to deactivate both I guess.


    About preview: I just thought I can - for example - on the Hyperion see a grab of the Screen. SO I guess I will have to wait for my LEDs.


    The error which Comes up is from Windows. Googling it suggests it is somehow Windows Update related. It could jsut happen if you deactivate too much stuff in Windows (Antispy), therefore I want to try with a fresh install of Windows. I will let you know if that worked for me.


    Use the version 2.2 that I just released. This version automatically logs everything to a log file which you can share with me to help me fix any issues that you are encountering. There are other bug fixes as well.

  • yes ok. Will post later tonight or tomorrow. See also my edit. I guess it is somehow related to AMD/Radeon Cards as all useres that reported it on Github seem to have Radeon Cards.
    Unfortunatley I cannot comment in the Github thread for issue 5. (not possible at the Moment)


    Unfortunately Github doesnt "let me perform this Action at this time", so I cannot contribute there.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!