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. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

[Released] Demolition Media Hap Pro Sync — Network Synced GPU video playback

Discussion in 'Assets and Asset Store' started by leavittx, Mar 8, 2022.

  1. leavittx

    leavittx

    Joined:
    Dec 27, 2013
    Posts:
    139
    Hap is a video codec which allows to decode high-resolution videos using mainly GPU power and gives ability to play videos with alpha channel transparency.

    It proved to be the only one solution which managed to preserve glitch-free high-framerate video playback in our mixed reality playscape with Unity running with 8 projectors. We tried other solutions, but they just didn't work. Finally, we made this plugin.

    This plugin version has an ability to sync the video playback across multiple machines in a LAN network:





    Get it on the Asset Store
    Try it before buying: Demo app


    Main features:
    Hardware accelerated Hap video playback without any external codecs installation needed. All fravours of Hap are supported.
    Sync playback across multiple machines using UDP networking
    — Use Unity Timeline to control the playback
    — Control video playback with your own clock source
    — Ability to manually specify current video frame index
    — Texture updates are completely in background threads - main and render threads are unaffected
    Multichannel 5.1/7.1 audio support using Unity AudioSource
    High quality video with the new Hap R codec
    Low CPU usage. Frames are mostly decompressed on the GPU.
    — Play 4k @ 120 fps, 8k @ 60 fps or 10k @ 60fps videos (on supported hardware), play tons of smaller videos at once. Extremely fast frame-precise seeking.
    — Playback speed control.
    Transparent videos with Hap Alpha, Hap Q Alpha and Hap R codecs. First plugin to support Hap Q Alpha/Hap R in Unity.
    — Chunked Hap support for even faster multi-threaded decoding.
    — Works with DX11 rendering on Windows.
    — Audio output through the Unity Native Audio plugin (without network syncing) and AudioSource (with netowrk syncing, multichannel audio supported).
    — Preload video to memory if your SSD isn't fast enough.
    — Configurable RAM/GPU memory usage.
    — Suits for both programmers and artists: C# API along with IMGUI/uGUI/Render to Material wrappers provided.
    — Example scenes with the typical usage scenarios.

    Requirements for this asset version:
    — Unity 2019 - Unity 2020
    — Windows 8.1/10
    — DirectX 11
     
    Last edited: Mar 8, 2022
    blueivy likes this.
  2. leavittx

    leavittx

    Joined:
    Dec 27, 2013
    Posts:
    139
    Demo app just got updated - fixed bug where it wasn't possible to change the video size using G hotkey
     
  3. cameranebbia

    cameranebbia

    Joined:
    Aug 29, 2018
    Posts:
    6
    Hi,
    is the Demolition Media Hap standard player included in the Demolition Media Hap Pro Sync?
    (and are Unity 2021 and 2022 supported?)
    Thanks
     
  4. cameranebbia

    cameranebbia

    Joined:
    Aug 29, 2018
    Posts:
    6
    Hi,
    we bought the asset,
    unfortunately after half a day of testing we got erratic behaviours
    and both server and client did not play smootly
    a resync with mouse click made it work better again till now.
    We will keep on testing but could you please give some feedback/tips? maybe a resync after each loop ?

    videos are 1920x1920 30 fps normal Hap (8 chunk from after effects)
    the setup for each pc is two 4k screen with two cameras/canvas panel playing the same video (scaled twice),
    hardware is gpu Nvidia Geforce rtx 3080 , cpu i7 10700k 3.80Ghz, nvme drive
    for the test the 2 pc are cabled directly (no switch or router)
    unity version is 2021.2.19

    here some short video of the stuttering





    Thank you
     
  5. cameranebbia

    cameranebbia

    Joined:
    Aug 29, 2018
    Posts:
    6
    (the password to watch videos is "test")
     
  6. leavittx

    leavittx

    Joined:
    Dec 27, 2013
    Posts:
    139
    Hi, the standard player is included. Unity 2021 and 2022 should be ok
     
    Last edited: Jul 22, 2022
  7. leavittx

    leavittx

    Joined:
    Dec 27, 2013
    Posts:
    139
    Hi!
    1. Did you try first launching clients and then server?
    2. Did you also try with a router? Shouldn't be a problem actually
    3. Did you try doing the same setup with the demo app available out there (with the sample videos/with your videos)?
    4. Can you send your videos / sample project please? (you can send the link to demolition.studios.rocks@gmail.com)
     
  8. leavittx

    leavittx

    Joined:
    Dec 27, 2013
    Posts:
    139
    @cameranebbia If nothing of the above helps, somewhat informative thing will be to record a video (preferrably a slowmotion using iphone) of the demo app playback with all the information visible. The best is to have both computers screens on one vertical video, where one screen is located above another like below:

     
  9. leavittx

    leavittx

    Joined:
    Dec 27, 2013
    Posts:
    139
    @cameranebbia Another thing to watch out for: make sure VSync is enabled on server/client.
    Either use QualitySettings.vSyncCount = 1 (done in scripts included with the package by default) for build, or enable it in the Editor window.
     
  10. cameranebbia

    cameranebbia

    Joined:
    Aug 29, 2018
    Posts:
    6
    HI,
    thanks for the reply,
    1. Did you try first launching clients and then server? Yes
    2. Did you also try with a router? Shouldn't be a problem actually, tried with switch and also direct cable (->latency is not the issue)
    3. Did you try doing the same setup with the demo app available out there (with the sample videos/with your videos)? Not yet, I will
    4. Can you send your videos / sample project please? (you can send the link to demolition.studios.rocks@gmail.com) OK, i will

    This weekend I launched another test, same set up and same problem after around 10 hours, the issue is clear on the client machine, here is a video with the info resyncing and glitching (password is "test")



    the server was not smoothed but also not as bad as the client.
    Again after a mouse click (but not with a space bar pause/play) the playing became smoothed
    The issue appears after at least half a day, so testing will take time.
    Pretty sure everything was vsynched,
    I will update you and in case send project files.
    Best
     
  11. cameranebbia

    cameranebbia

    Joined:
    Aug 29, 2018
    Posts:
    6
    just read the demolition_media_hap_pro_sync_demo_app manual:
    do you recommend using nvidia sorround for two display (1 video spanned across the screens)?
    I'm using two display with two cameras and two canvas (cause it's easier for frame blending)
     
  12. cameranebbia

    cameranebbia

    Joined:
    Aug 29, 2018
    Posts:
    6
    leavittx likes this.
  13. leavittx

    leavittx

    Joined:
    Dec 27, 2013
    Posts:
    139
    There currently seem to be a problem while running playback for long periods of time (~10hours) indeed.
    Working on a fix. I've sent you a mail
     
  14. leavittx

    leavittx

    Joined:
    Dec 27, 2013
    Posts:
    139
    New version 2.0.1 just published on the Asset Store:
    — Fixed sync stability while running for long time (several hours and more)
    . Thanks @cameranebbia for reporting the issue in the posts above
    — HAP HDR - play 16-bit per color component floating point HDR videos. Ideal for playing things like 10-bit color depth footage. Or playing back encoded ambient occlusion/arbitrary data. Unsigned format recommended. Encoding possible with TouchDesigner
    — 10-15% faster decoding compared to previous release - play even more videos.
    — DX12/Vulkan/OpenGL rendering supported in addition to DX11 (DX11 recommended).
    — Added Unity 2022/2023 support.
    — Added Linear color workflow support.
    — Ability to disable all logging or INFO-level messages using by setting DEMOLITION_MEDIA_DISABLE_LOGS / DEMOLITION_MEDIA_DISABLE_INFO_LOGS define in the Project Settings
     
    Last edited: Nov 11, 2022
  15. leavittx

    leavittx

    Joined:
    Dec 27, 2013
    Posts:
    139
    Demo app got updated with the latest plugin version. Download here