Interesting

How to change the background of a video (similar to how it is done with pictures in Photoshop)

Good time everyone!

Probably everyone was surprised by the films in which the actors swam among dangerous alligators and sharks, climbed a tightrope over an abyss, went into open space, etc. etc.

In fact, in most of these exciting episodes, one "trick" was used: with the help of specials. The software changed the background of the video to the one needed by the director. It is thanks to this that now it is possible to shoot such impressive scenes!

So, what am I all about ... The fact is that today any of us on a home PC has the ability to apply similar effects. For example, you can record yourself standing in a room (at home), and then, by replacing the background, make a video as if you are in the desert or on a desert island ... ✔

In this article I will give a step-by-step example of solving such a problem - we will make an "interview from the Middle Ages" from a regular interview (you must admit, this can significantly revive the video). As an example - see the screenshot below, it shows what this is about ...

Example (preview)

*

Change the background of the video

Selection and preparation of the main video

Firstly, the main video (for which we will change the background) must be recorded in a special way: the background must be monochromatic (for example, green, blue, white, etc.).

Secondly, it is highly desirable that the background does not overlap with the colors of the clothes and hair of the person who is recorded in this video. To clearly see what needs to be obtained - I brought one frame from the video below. 👇

Screen from interview

Video length, compression format, etc. are not so important (in most cases, the editor program doesn't care what to encode).

Choosing software, creating a project

To solve the current problem, I will use a video editor for beginners - 👉 Video-Editing (link to the official site). By the way, despite its simple interface, this editor allows you to do amazing things!

The installation of the video editor is standard (like any other program), so I'm not considering it.

Actually, after starting the editor - select the task from the menu "Chromakey" ... See the example below in the picture.

Convenient replacement for monochrome backgrounds

Selecting the main video and new background

In the first step, the program will ask you to specify the main video (with a solid background). Just point it and click "Further" .

Choosing the video you want

After that, you need to specify a new background: i.e. the background that will replace our plain canvas. As such a background, you can take either some picture or another video (in our example, a picture with a medieval castle is indicated).

Choosing a new background (can be a picture or video)

Background replacement: mixing, dissolving

Now the video editor will ask you to manually specify the background that will be replaced (on the main video). In our example, this is a green canvas, and this is what we indicate.

Specifying the background color

Next, the program will automatically remove the color you specified and substitute a new background. In this step, we need:

  1. set the size and position of the main character;
  2. "pre-adjust" blending and tolerance parameters (sharpness, brightness, alignment quality, etc. parameters depend on this).

When everything is perfectly placed (as required) click "Further" .

How to blend and dissolve one object on top of another

Cropping video (optional)

Now you can trim the video to length. For example, this is often required for the beginning and end of the video (when some preparations or strangers get into the frame ...). In general, the step is optional - you don't need to do it ...

Crop video if necessary

Adding music (if necessary)

If you want to impose additional. thematic music - just click on the "Plus sign" in the left menu of the window and select the desired song.By the way, there are already several blanks for different projects in the editor itself, maybe they will suit you ...

Putting on music (if necessary)

Saving the resulting video

And the final touch is to save the resulting video. If you make a video for viewing on a PC, TV, etc., it is recommended to select the AVI or MP4 (HD video) format.

By the way, "Video Editing" at the stage of saving, it allows you to specify not only the codec and frame resolution, but also manually set the bitrate (and, in advance, informing you of the final video size!). Agree, this is very convenient if you need to fit a video on a USB flash drive or CD ...

Selecting the format and quality of the video

❽ 

Result

In general, after encoding the video, you can open it in any player (I used the standard one built into Windows). As you can see, the image as a whole turned out to be quite bright, juicy, and at first glance, for an inexperienced user, everything looks quite realistic - as if it was actually filmed in a castle ... ✌

It was - it was

*

That's all for me today ...

Break a leg!..

👋

First published: 09.11.2019

Correction: 11/19/2020

$config[zx-auto] not found$config[zx-overlay] not found