Straight Alpha CasparCG version 2.2 Stable and later

graphics
hardware
config
template
server

#1

Hi,

I know that CasparCG works fine with alpha premultiplied, but I have a lot of templates created in alpha straight that are displayed 24/7 (made by a previous person). I have a question, is there any possibility to force the server version to use straight alpha, because these commands do not work (in total, they have no right).

<mixer>
    <blend-modes>true</blend-modes>
    <straight-alpha>true</straight-alpha>
    <chroma-key>true</chroma-key>
  </mixer>
<channels>
    <channel>
      <video-mode>1080i5000</video-mode>
      <straight-alpha-output>true</straight-alpha-output>

Servers operate on two types of machines Dell Precision 7910 and Dell Precision 7920, configuration is below.

Dell Precision 7910

Graphic Card Quadro K2200, Decklink 4K Extreme 6G.

Dell Precision 7920

Graphic Card Quadro 4000, Decklink 4K Extreme 12G.

Displayed alpha on the output looks like this.

and should looks like this.

additional config file

<configuration>
  <paths>
    <media-path>_media/</media-path>
    <log-path>log/</log-path>
    <data-path>data/</data-path>
    <template-path>C:/Templates/</template-path>
    <font-path>font/</font-path>
  </paths>
  <log-level>trace</log-level>
  <flash>
    <buffer-depth>auto</buffer-depth>
</flash>
  <lock-clear-phrase>secret</lock-clear-phrase>
  <channels>
    <channel>
        <video-mode>1080i5000</video-mode>		
        <consumers>
            <decklink>
                <device>1</device>
                <embedded-audio>false</embedded-audio>
                <latency>low</latency>
		<keyer>external</keyer>
		<buffer-depth>3</buffer-depth>
		<custom-allocator>true</custom-allocator>
            </decklink>
	</consumers>
    </channel>
  </channels>
  <controllers>
    <tcp>
      <port>5250</port>
      <protocol>AMCP</protocol>
    </tcp>
  </controllers>
  <amcp>
    <media-server>
      <host>localhost</host>
      <port>8000</port>
    </media-server>
  </amcp>
</configuration>

Interestingly, I also have 1 Dell Precision 7920 server and 1 Dell Precision 7920 server, with 2x Decklink 4K Extreme 12G cards, the servers work as a playout and have the same configuration as the other and the config file as above. Straight alpha on these servers is correctly displayed on the server version 2.2 Stable.

Changes to the graphics card settings give nothing, whether it is GPU or CPU etc.

Maybe someone had a similar problem, or maybe I am doing something wrong, or something needs to be set up (Windows, Graphic Card, Server config), because I would like to switch to 2.2 Stable on production, because on the previous ones after a long operation I get “out of memory”.

Thank you in advance for any tips.


#2

How can you do that? At least Flash is always premuliplied, no matter what you do.

Have you checked the settings on the vision mixers keyer? I would guess, that they are wrong.

That has noting to do with they way the keying works.


#3

What kind of vision mixer? ATEM?


#4

Thanks for replies.

Blockquote
@didikunz:
How can you do that? At least Flash is always premuliplied, no matter what you do.

FLV files were rendered in straight alpha, but this should not affect, I think or generally template is premuliplied, but FLV is interpteted as straight, the same effect is with PNG image, dynamically loaded.

Blockquote
@didikunz @TheYouth
Have you checked the settings on the vision mixers keyer? I would guess, that they are wrong.

CasparCG is keyed on Miranda DSK-3901. Is used for logos and animations. SImple fill/key.

Compared to version 2.1 Beta 2, after setting “straight-alpha” to false, I get the same effect on version 2.2, when set to true, everything is OK, from what I saw in the Caspar code, the alpha should be set correct. I have tried everything and it does nothing, but the puzzle is that it works on some devices and not on others at the same configurations.


#5

Just an idea, are the Dynamic Range settings for Nvidia different between systems?


#6

Hmm, maybe, but settings Nvidia are the same on all machines, but I not changed this option. I check it tomorrow. Thanks:grinning:


#7

As far as I am aware, CasparCG requires all sources to be premultiplied. (PNGs are converted while being loaded, to make them usable)
Dynamically base64 loaded pngs may be broken in beta2, I cant remember if that was fixed there or if that only got fixed in later versions (both 2.2 and 2.1NRK).

I do not know the reason, but the straight-alpha setting was removed in 2.2. So it will not be possible to output straight-alpha from that version. Also worth noting is that setting only changed the output signal. Sources are still required to be premultiplied, but simply the output is straightened out before being sent to decklink or screen or whatever.


#8

Also I just remembered that a sure fire way to do straight alpha (atleast with ffmpeg sources) is to run CCG 2.1 in CPU mode with:
<accelerator>cpu</accelerator>

That saved me in a few situations a couple of years ago.


#9

Blockquote
@hreinnbeck
Just an idea, are the Dynamic Range settings for Nvidia different between systems?

I have changed, but the effect is the same. It’s time to convert these templates to HTML.

Thank you all for trying to help.