Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

MEncoder/FFmpeg can overlay a video with an image from the command line. Is this possible with a video?

I want to overlay a video with another dynamic video. Some parts of the overlayed video must be see-through (the parts where nothing is actually there, an arrow shows up on the screen and then disappears and then I do not want the whole screen to go black because of no background, only the arrow is shown etc).

My guess is that the overlayed video must have alpha levels enabled in the encoding or something? Please shed some light which encoding I must use on the overlayed video. The combined video should be encoded as one of the most universal formats if possible.

share|improve this question
Can you supply examples? You're right that your input video needs some kind of alpha channel – do you have that already? Seeing your source material would help. – slhck Jan 28 '13 at 14:44
@slhck No sorry I currently have nothing to work with. I am to gather information so my company may request said overlay videos from another company. I thus have full control on what I want. The non-overlay video may be recorded through a webcam, phone or other recording device so it's encoding may differ. The overlayed video however will be what I request. For example, first video 1 is played, then video 2 in sequence. As video 2 is ending video 3 is going to be played on top of video 2 and display some indicator on the screen, a small thing compared to the non-overlay video. – Simon Zettervall Jan 28 '13 at 14:51
I see. I can't give you any authoritative suggestion here, but ProRes supports alpha channels (ProRes 4444). I can't confirm though whether FFmpeg supports this. FFmbc does, but it probably doesn't have the filtering tools you'd need. – slhck Jan 28 '13 at 15:20
@slhck Okay, I have no clue about stuff like this but here… the author tells to export as an AVI. Cannot I just load that one and use it as an overlay? – Simon Zettervall Jan 28 '13 at 16:10
AVI is just a container that stores different video codecs. In the case of that link you found, the "video" codec used is a sequence of transparent PNG images, which could of course also work in your case. Ideally you'd request a sample that you could try first—don't want to buy a pig in a poke. – slhck Jan 28 '13 at 16:26

You must log in to answer this question.

Browse other questions tagged .