[Cin] Two links on ICC in MP4

Georgy Salnikov sge at nmr.nioch.nsc.ru
Sun Apr 13 15:05:44 CEST 2025


On Fri, 11 Apr 2025, Andrew Randrianasulu wrote:

> > I think we hit crudest form of this limitation when we try to fade
> > titler's text over png image. It sort of flashes, due to missing
> > (unapplied) 2.4 gamma step?

No, the reason for "flashes" for fading in titles and dissolve transitions
in transparent PNGs is totally other.

Take and unpack the small archive in attachment.

unwanted_black_flash.xml is a small demo project, IgorBeg has created it a
few years ago to demonstrate the quirks. There are a white title over violet
background with 5 sec fade in, and two white PNGs with transparent
background with 5 sec Dissolve transition in between. Try to play it,
focusing on the fading and the transition, it is not so easy to figure out,
what is not correct.

And yes, what we have now, is Blend Program. You can load now ubf1.xml, it
uses two simple programs which print the values of R, G, B, A (the project's
color model is RGBA-8bit) inside some letter in the title, and inside each
of the two PNGs.

What do we see? For the title:
Title RGBA: 0.00 / 0.00 / 0.00 / 0.00
Title RGBA: 0.00 / 0.00 / 0.00 / 0.00
Title RGBA: 0.01 / 0.01 / 0.01 / 0.01
Title RGBA: 0.02 / 0.02 / 0.02 / 0.02
Title RGBA: 0.02 / 0.02 / 0.02 / 0.02
Title RGBA: 0.03 / 0.03 / 0.03 / 0.03
.....................................
Title RGBA: 0.97 / 0.97 / 0.97 / 0.97
Title RGBA: 0.98 / 0.98 / 0.98 / 0.98
Title RGBA: 0.98 / 0.98 / 0.98 / 0.98
Title RGBA: 0.99 / 0.99 / 0.99 / 0.99
Title RGBA: 1.00 / 1.00 / 1.00 / 1.00

Pay attention on these numbers! What do you see? A smooth increase of white
title opacity over the background? No, you see here a smooth transition from
the transparent black letters (RBG=0.00/0.00/0.00 is black, not white) to
the opaque white, with some semi-transparent grey in the middle.

The Dissolve transition does the similar:
1 RGBA: 1.00 / 1.00 / 1.00 / 1.00
2 RGBA: 0.00 / 0.00 / 0.00 / 0.00
1 RGBA: 1.00 / 1.00 / 1.00 / 1.00
2 RGBA: 0.00 / 0.00 / 0.00 / 0.00
1 RGBA: 0.99 / 0.99 / 0.99 / 0.99
2 RGBA: 0.01 / 0.01 / 0.01 / 0.01
.................................
1 RGBA: 0.01 / 0.01 / 0.01 / 0.01
2 RGBA: 0.99 / 0.99 / 0.99 / 0.99
1 RGBA: 0.00 / 0.00 / 0.00 / 0.00
2 RGBA: 1.00 / 1.00 / 1.00 / 1.00

The first PNG gradually changes from opaque white to transparent black, the
second one does the same in the backward direction, both being
semi-transparent grey in the middle.

Although one can imagine a case where exactly such behaviour (fading from
white to black) could be desired, here it is definitely not that what is
wanted, as the background track has some other color.

Load the third example, ubf2.xml. It tries to demonstrate how this all
should look, were it all consistent. I removed the title fading from the
titler plugin and configured fading in the Fade Autos for the track. Now the
letters gradually come from transparent white to opaque white, not from
black to white. The transition is not so easy to imitate, so I added one
more track and put the second PNG there with 5 sec overlap with the first
one, and made the same transition from white to transparent white via the
Fade Autos. This all looks quite different now!

It is obvious: fading in titler and in Dissolve is to be done solely on the
Alpha channel, not touching colors, provided that the track where it takes
place has no transparent areas. Alternatively, it can be done in the RGB
channels, without touching Alpha channel, actually it is what takes place if
the project is pure RGB, without transparency. But what must Dissolve do, if
there is also a controlled transparency in the track, perhaps different in
the two parts between which Dissolve is played, seems not to be obvious...
_______________________________________________________________________________

Georgy Salnikov
NMR Group
Novosibirsk Institute of Organic Chemistry
Lavrentjeva, 9, 630090 Novosibirsk, Russia
Phone   +7-383-3307864
Email   sge at nmr.nioch.nsc.ru
_______________________________________________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unwanted_black_flash.tar.gz
Type: application/octet-stream
Size: 59009 bytes
Desc: 
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20250413/556ba406/attachment-0001.obj>


More information about the Cin mailing list