FFMPEG: Overlaying one video on another one, and making black pixels transparent

前端 未结 2 1729
逝去的感伤
逝去的感伤 2020-12-10 21:27

I\'m trying to use FFMPEG to create a video with one video overlayed on top another.

I have 2 MP4s. I need to make all BLACK pixels

2条回答
  •  粉色の甜心
    2020-12-10 21:39

    You will not be able to get a "replace black pixels" approach to work properly. What you actually want is a foreground video with a real alpha channel that can be manipulated and tested before doing an overlay on a background. For an extended example that describes the problems, please take a look at my blog post on the subject. When using FFMPEG, an easy way to import alpha channel video is to use Quicktime with the Animation codec video at 32 BPP.

提交回复
热议问题