[MEncoder-users] encoding for chroma key

Rich Felker dalias at aerifal.cx
Sun Nov 27 23:16:55 CET 2005


On Sun, Nov 27, 2005 at 06:25:23PM +0100, Aleksandar Uzelac wrote:
> 
> > > and as it is now i'm getting green egde around my images... rather
> > > visible.
> > 
> > I'd guess you aren't using dimentions that are multiples of 16
> > 
> 
>   i'm getting that too:) but that's not the problem. let me try to explain this in a few words more...
>   for instance, i have a picture 800x600 pixels RGB24 taken with ordinary photo camera, with let's say a table (300x400 pixels in size) on that picture. i take that picture to photoshop (not that i do that) and cover everything but the table in chroma key color (solid 255 green), and export it as PNG. at the end i have nice mostly solid 255 green picture, and a brown table in the middle of it, nothing else - four legs of the table are surrounded by green. this is an ordinary file for chroma key effect.
>   now i take that PNG and offer mencoder to make an AVI out of it. so far i tried lavc mpeg4 and xvid, in both cases resulting file has a greenish-brownish aura (couple of pixels wide) surrounding the table, probably due to quantization cut-off. that aura is my problem. on dark background with chroma key effect turned on i'm seeing that greenish color loud and clear.
>   i can also post the picture as a demonstration. PNG images in question are ~60kB.
> 
>   now, am i missing something? is this the right way to go?

yes, you're missing the fact that video is 4:2:0 subsampled. it is not
made for doing this kind of thing.

rich




More information about the MEncoder-users mailing list