[FFmpeg-user] How to apply effects to a frame decoded using ffmpeg?

James Darnley james.darnley at gmail.com
Wed Jul 23 15:56:09 CEST 2014


On 2014-07-23 15:39, David Varghese wrote:
> Thanks for the reply.
> 
> Infact I tried to directly manipulate the YUV frame that I got from decoder
> . I tried to modify the Y value of every pixels of every frames to 1 ,
> expecting to see a much darker video . But I didnt found any changes in the
> video .
> 
> The code snippet is as below,
> 
> AVFrame *frame = {*YUV420P frame recieved from ffmpeg decoder*}uint8_t
> *tempPtr = NULL;
> tempPtr = frame->data[0];int j;for(j = 0 ; j < frame->linesize[0] ; j++){
>     *(tempPtr++) = 1;}
> 
> Am I doing something seriously wrong?

You are only processing one line there.  You need to be iterating over
the height too.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 683 bytes
Desc: OpenPGP digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20140723/40ff86d0/attachment.asc>


More information about the ffmpeg-user mailing list