[FFmpeg-user] how to use alpha channel to make transparent effect

qw applemax82 at 163.com
Fri Jun 26 18:10:01 CEST 2015


>> I use the below command to place one image on one video:ffmpeg
>> -i ./file1.mp4 -i ./file2.jpg -filter_complex overlay ./file3.mp4
>> 
>> But there is no transparent effect in resulting file, i.e. file3.mp4.
>> What is the command to use alpha channel to make transparent effect?
>
>Have a look at the blend filter and its opacity and expression options:
>http://ffmpeg.org/ffmpeg-filters.html#blend_002c-tblend
Thanks for your help. I use the below command to blend image and video together with transparent effect:
ffmpeg -i ./file1.mp4 -i ./file2.jpg -filter_complex blend=all_mode=overlay ./file3.mp4
But the command require the same resolution from image and video. If the size of image is different from or smaller than that of video, the command will report error. I also notice there are several blend options about position and size. How to use these options to blend image and video with different size? Could you provide some examples?


Thanks!






At 2015-06-26 16:54:15, "Frank Tetzel" <s1445051 at mail.zih.tu-dresden.de> wrote:
>> I use the below command to place one image on one video:ffmpeg
>> -i ./file1.mp4 -i ./file2.jpg -filter_complex overlay ./file3.mp4
>> 
>> But there is no transparent effect in resulting file, i.e. file3.mp4.
>> What is the command to use alpha channel to make transparent effect?
>
>Have a look at the blend filter and its opacity and expression options:
>http://ffmpeg.org/ffmpeg-filters.html#blend_002c-tblend
>
>Regards,
>Frank
>_______________________________________________
>ffmpeg-user mailing list
>ffmpeg-user at ffmpeg.org
>http://ffmpeg.org/mailman/listinfo/ffmpeg-user


More information about the ffmpeg-user mailing list