PNG transparency with LOAD command

It seems that Chrome engine automatically adds a background-color css rule for all transparent PNG:s.
To my understanding CasparCG uses Chrome engine for rendering.
Thus the same “add background feature” seems to apply.

This behaviour is not present if PNG’s are loaded as part of a template.
Is there a way to load PNG files with LOAD command and not have the engine add the background rule, allowing the transparency to behave as expected?

Screenshot attached for depicting the issue.

I don’t understand exactly, what you try to do and why it adds a background color. Can you post the command you sent to Caspar?

There is a way to load and play a PNG (as many other image formats) using one of the basic commands LOADBG, LOAD or PLAY the same way, as you do it for videos. But it will always be scaled to fill the entire screen. So maybe the best way is to build a template and add the image as a dynamic image to it.

I should have included the commands and a screenshot from the consumer, my bad :slight_smile:
Mixer command is used to show the video layer (SDI IN) to better depict the “added background” = the black frame around the emoji.

So here they are:

MIXER 1-6 FILL 0.1 0.1 0.8 0.8
PLAY 1-6 http://SERVER_IP/mask_emoji.png

OR:

MIXER 1-6 FILL 0.1 0.1 0.8 0.8
LOAD 1-6 http://SERVER_IP/mask_emoji.png

Screenshot 2022-05-30 at 15.43.22

The mask emoji is some sample pulled from google, all pngs with alfa seem to behave the same way.

by doing http://.... in the PLAY command, you are probably causing it to be played through ffmpeg, which I don’t think I have ever tested.
If you were to play it from the media folder instead, then I expect it would get the correct transparency

1 Like

I never did it that way. It seems to be kind of a streaming command, as the PLAY (and LOAD) commands use FFMPEG and not Chrome (AFAIK). So this would then be a limitation of FFMPEG.

That would also explain, why it does not do it, when the PNG is put into a template. That leads to the next question: Why not use a template and send the PNG to it? The template could also contain code that, for instance scale the PNG into a given area, while preserving the aspect ratio.

Thanks Julusian , Thanks didikunz

This was more a matter of understanding the behaviour, as alfa video plays nice if loaded “natively”.
But as its now clear that FFMPEG is the renderer we need to approach this with the templates, which is not an issue here.

Privacy Policy   Terms of Service