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

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

1 Like

Demo app just got updated - fixed bug where it wasn’t possible to change the video size using G hotkey

Hi,
is the Demolition Media Hap standard player included in the Demolition Media Hap Pro Sync?
(and are Unity 2021 and 2022 supported?)
Thanks

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

https://vimeo.com/731704851

https://vimeo.com/731705004

https://vimeo.com/731704236

https://vimeo.com/731704760

Thank you

(the password to watch videos is “test”)

Hi, the standard player is included. Unity 2021 and 2022 should be ok

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)

@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:

@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.

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”)

https://vimeo.com/733234435

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

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)

Hi,
new tests seem not encouraging really,
for the details I’ve sent you a mail at demolition.studios.rocks@gmail.com

1 Like

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

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

Demo app got updated with the latest plugin version. Download here

Hi. Just wanted to mention that VSync should be enabled in the Project Settings, for the plugin to work correctly! There were some cases recently where some users didn’t do so, and the playback sync was broken because of that. Thanks everyone!

I’ve just implemented a playlist functionality for SYNC Server/Client to be able to switch videos during playback. Also added an example of sending custom commands from the server to the clients + couple of other improvements. The asset store package will get updated in some time, meanwhile if you want to try it, I can send it by e-mail

    • I need this plugin, but I want to use MP4

Hi. Usually .mov container is used, but .avi is likely working too. I think .mp4 won’t work for Hap codec

I don’t need hap code. I want to use the sync feature.