Flick to black during layer swap.

#1
I'm writing a template in flash that once it has loaded will swap itself down a layer so that a new one can be faded in on top.

It uses the server connection and when it has animated on, it clears the layer below and then swaps with it.

I notice a slight flicker to black on the swap.

Is there a better way of doing this or how can I avoid the flicker?

Can I just duplicate the layer rather than swap so I can be sure the one below is there before the one above is cleared?

Re: Flick to black during layer swap.

#3
Hmmm, and it would not work to use the same two layers and just crossfade? You can set MIXER effects up by adding DEFER at the end of the command and then start them together with COMMIT, so that a layer crossfade can made to work in sync. I never saw a difference by doing this, never saw which one was above.
Didi Kunz
CasparCG Client-Programmer, Template Maker & Live CG-Operator
Media Support, CH-5722 Gränichen, Switzerland http://mediasupport.ch/
Problems? Guide to posting Bug reports & Feature requests

Re: Flick to black during layer swap.

#4
I am using the AMCP swap command.

Didi - I think you are suggesting loading the templates on alternate layers? Due to the control system the template will always load on the same layer.

The only other option I can think of is snapshot-ing the channel and loading that on the layer below.

Re: Flick to black during layer swap.

#5
Yes, I would use alternate layers. I had similar problems with a studio automation system, that only allows play and stop commnads and I needed a way to issue a next. So what I did was using a fully transparent template, that controlled an other template runing on a layer bellow. There is a way to check (via AMCP INFO commnad) to check if something is running on a layer, so that you could figure out, which layer is free for the next template to be loaded...
Didi Kunz
CasparCG Client-Programmer, Template Maker & Live CG-Operator
Media Support, CH-5722 Gränichen, Switzerland http://mediasupport.ch/
Problems? Guide to posting Bug reports & Feature requests

Re: Flick to black during layer swap.

#6
Thanks Didi.

I've realised the flick to black occurs as the CLEAR happens before the loading template has reached full opacity. I presume this is due to buffering. By inserting a delay on the clear command this is solved.

Do you know if a template can know which video channel and layer it is loaded on? At the moment I have hard coded the layers in the template. If not I'll have to pass them in as variables.

Re: Flick to black during layer swap.

#7
Unfortunaltely there is no easy way to get that information. There is a layer value that the template knows, (see here: http://casparcg.com/wiki/Content_/_Medi ... _Templates) but this holds the Flash layer and NOT the video layer. So my templates always get the cahnnel and the layer as a parameter. Normally I give some defaults to these values, so that it runs also, if the parameters are missing.
Didi Kunz
CasparCG Client-Programmer, Template Maker & Live CG-Operator
Media Support, CH-5722 Gränichen, Switzerland http://mediasupport.ch/
Problems? Guide to posting Bug reports & Feature requests