New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: decklink consumer "secondary" ports #1493
Conversation
Thanks again for this @Julusian |
Thanks from me too @Julusian -- Was great to see it. |
Thanks a lot for this @Julusian, outstanding work! For example: you need to output via HDMI so you have to use 2 Decklink Extreme (if you want to avoid converting from SDI to HDMI). I have some Mini Monitor 4k that have only 1 output and no ref input, so I'm guessing the sync is not guaranteed at all between them. I'll try to test those scenarios soon, but just to know what to expect. Thanks! |
@Sidonai-1 yes, it is only guaranteed within the same decklink, as we are relying on the card internally to keep it in sync. |
Hi @Julusian , one question: I saw that the diag window doesn't show the "ports" devices, only the main one. I'm guessing that's intended behaviour? |
@Sidonai-1 correct, it is expected to only show the primary in the diag graph. |
Great, good to know. Thanks. One more thing I noticed. When using Extreme 4K BM cards with the new ports option, it needs a reference signal no matter what you put in the config: the "disable" option doesn't seem to work. This doesn't happen with 'MiniMonitor 4K' or '8K Pro cards', as one doesn't have reference input, and the other has its own internal one or something like that (don't quote me on this). This is the config/log I had:
|
Hi again @Julusian, one more question. Only the main device outputs embedded audio, so none of the 'ports' have audio output even if you set it to 'true'. Is this intended behaviour? Thanks a lot! |
I can't explain that issue you are seeing, and I dont have access to a similar card to be able to test with.. The SDK does say that ref must be locked when doing this except for with the 8k card, so it is possible that some cards are pickier than others if ref is not locked. It is expected that only the primary will have embedded audio currently. The client had no need for embedded audio, so I didnt spend any time on it. The structure should be in place for it to slot in easily, when someone wants to do it. |
The lack of embedded audio in the ports is not a big issue, it just caught me by surprise and I struggled to find the cause for a bit. I was able to test this feature in a big LED screen and the synchronization between two Decklink 8K Pro cards was perfect (providing ref. signal). Using the 8 outputs at 4K30p the total was around 23.800 px wide; one channel and one single file containing the 23k-wide-video and 8 audios. Everything was smooth, even if the CPU was around 83%. In summary: amazing work! hats off |
This work was sponsored by the BBC.
Testing build: https://builds.julusian.dev/casparcg/casparcg-server--pr-1493-80f8ee76b3bc43efa6a6ed78f5bdb95ec7e355c6-windows.zip
This expands upon #1433, to resolve some synchronisation issues that were observed on the output when splitting a channel up over multiple decklink outputs.
Since v11.0 of the Decklink SDK, some cards support a concept of 'playback groups'. This is currently supported by the Duo2, Quad2 and 8K Pro (I expect any newer multi-channel cards will also support it). By adding outputs to a playback group, the driver/card will ensure that they are run in sync with each other with the same playback timings used across each.
We can use this new functionality to allow for grouping multiple ports on a card in combination with subregions, to allow for slicing up a channel across the ports on card.
To utilise this, the decklink consumer configuration has been expanded, to allow for defining these secondary ports:
The additional ports block defines the secondary ports to run. The SDK requires them to be the same video-mode for the driver level synchronisation, but it is possible to use different modes (with the same framerate) with less guarantees on the timing.
It is also possible to manually define a key-only output as a secondary port against a fill output, internally the
external_separate_device
has been rewritten to use this same flow. If one of the outputs used does not support the playback group functionality, it will still be run but will have less guarantees on the timing. It should run as well as theexternal_separate_device
used to.For this to guarantee the accuracy, most cards (except the 8K pro) require a reference to be provided and for lock to be aquired before CasparCG starts playback. When running with these secondary ports, the default configuration will wait for reference (in my setup this takes 3.5 seconds) with a max wait of 10s. If no secondary ports are defined, no wait will be done by default. Both the max wait, and whether to wait are configurable.
Example usages:
3x1080p wide videowall
Manual key output: