[FFmpeg-devel] Changing the color of the pixel

Vitor Sessak vitor1001
Sat Apr 5 23:48:22 CEST 2008


Hi,

sathvik L wrote:
> On Sat, Apr 5, 2008 at 10:23 PM, V?ctor Paesa <wzrlpy at arsystel.com> wrote:
> 
>> Hi,
>>
>> And instead of creating your own program it might be easier for you
>> to create a "bluescreening" video filter.
>>
>> See http://wiki.multimedia.cx/index.php?title=Libavfilter
>> and
>> http://wiki.multimedia.cx/index.php?title=FFmpeg_filter_howto
>>
>> Regards,
>> V?ctor
>>
>> Hello ,
> 
>  The links mentioned in wiki.multimedia contains the details specific to th
> implementation in
> FFmpeg . Can you recommend me a link which contains the fundamental details
> of AV filters  . I am new to filters so I have to start from scratch .

The simplest way of doing it is to first apply the patches to compile 
FFmpeg with libavfilter, see this howto: 
http://svn.mplayerhq.hu/soc/libavfilter/README?view=co

Then you should try to understand how the overlay filter (vf_overlay.c) 
work. To do that, you should use the documentation in the wiki.

Finally, you should use the overlay filter as a template for your own 
filter.

About your original question about the AVFrame struct, there are two 
ways data can be set. Either YUV or RGB. The most common case is planar 
YUV (if you don't know what YUV is, ask wikipedia). If you want the 
pixel line x, column y

Y = data[0][x + y*linesize[0]]
U = data[1][x + y*linesize[1]]
V = data[2][x + y*linesize[2]]

-Vitor




More information about the ffmpeg-devel mailing list