I have a video that is composed of 3 parts: intro, outro and middle. in the outro and intro I need to add some text as an overlay and on the middle part, I need to change the background (which is one color) to an image I'll provide plus add a text overlay. All the texts will appear at certain times, be displayed for few seconds in different parts of the video and disappear. The background image too needs to be displayed only for few seconds in the middle of the video. Can you point me to something that can help me or give me few pointers that can help me accomplish this task? Thank you.
You can accomplish text overlay with the drawtext filter.
Draw a text string or text from a specified file on top of a video, using the libfreetype library.
For changing the background, you should look into the colorkey filter. From the docs, here's an example to "make every green pixel in the input image transparent":
ffmpeg -i input.png -vf colorkey=green out.png
As for timing, you should cross-reference if they support timeline editing.
Some filters support a generic enable option. For the filters supporting timeline editing, this option can be set to an expression which is evaluated before sending a frame to the filter. If the evaluation is non-zero, the filter will be enabled, otherwise the frame will be sent unchanged to the next filter in the filtergraph.
Again, this is probably better suited for an NLE, but it's certainly possible with
ffmpeg, and will likely render significantly faster (at the tradeoff of likely taking much longer to craft the
ffmpeg invocation vs. using an NLE). Good luck!
Pretty much any Non-Linear Editing program can do this: 'Free' versions include; iMovie (Mac), Microsoft Photos (Windows). KDNELIVE (Linux).
For more Professional apps, try the free DaVinci Resolve, or trial Adobe Premiere or Apple Final Cut Pro X.
Simply overlay the text on the edited video using that software’s preferes method.