<p>This code works well now. It has several text animations with FFMpeg.</p>

<p><code>ffmpeg -i input.mp4 -vf "[in]drawtext=fontfile=/path/to/font.ttf: text='First Line': fontcolor=red: fontsize=40: x=(w-text_w)/2: y=if(lt(t\,3)\,(-h+((3*h-200)*t/6))\,(h-200)/2):enable='between(t,2.9,50)',drawtext=fontfile=/path/to/font.ttf: text='Second Line': fontcolor=yellow: fontsize=30: x=if(lt(t\,4)\,(-w+((3*w-tw)*t/8))\,(w-tw)/2): y=(h-100)/2:enable='between(t,3.5,50)',drawtext=fontfile=/path/to/font.ttf: text='Third Line': fontcolor=blue: fontsize=50: x=if(lt(t\,5)\,(2*w-((3*w+tw)*t/10))\,(w-tw)/2): y=h/2:enable='between(t,4.5,50)',drawtext=fontfile=/path/to/font.ttf: text='Fourth Line': fontcolor=black: fontsize=20: x=(w-text_w)/2: y=if(lt(t\,6)\,(2*h-((3*h-100)*t/12))\,(h+100)/2):enable='between(t,5.5,50)'[out]" out.mp4
</code></p>

CC BY-SA 4.0
2018-10-03T01:46:43.213Z
2018-10-05T00:59:34.797Z
2018-10-05T00:59:34.797Z
Alexia1990
<p>You can achieve that with <a href="https://www.ffmpeg.org/" rel="nofollow noreferrer">ffmpeg</a>. Draw text with <kbd>drawtext</kbd> command. And draw semitransperent beckground under it with <kbd> drawbox</kbd>. You can see more in <a href="https://video.stackexchange.com/questions/15551/ffmpeg-drawtext-filter-create-transparent-background-with-text">that question</a>.</p>

<p>You can add animation of moving text  from side of video with <a href="http://ffmpeg.org/ffmpeg-utils.html#Expression-Evaluation" rel="nofollow noreferrer">Expression Evaluation</a>.</p>

CC BY-SA 4.0
2021-01-09T09:50:34.443Z
do you know if it's possible to render the render text and video in html5 canvas, convert the merged video to webm, then use ffmpeg to produce mp4 or another format?
Crashalot
CC BY-SA 3.0
2016-02-17T16:30:44.637Z
2016-02-17T16:30:44.637Z
2017-04-13T12:46:08.110Z
Shultc
<p>Looking at the video, I'd say it's highly likely it was made with Adobe Premiere, Final Cut, or Adobe After Effects.  You could achieve the same thing in FFMPEG, but I doubt that's how they actually made it.</p>

CC BY-SA 4.0
2018-10-03T09:36:22.483Z
Upvoted, on this website it seems that ffmpeg is the solution to everything. It's true it can do almost anything, but when the OP asks for something easier than After Effects, ffmpeg is not really an answer
mcont
CC BY-SA 4.0
2021-01-09T09:49:43.137Z
thanks for the answer. would it be possible to render the render text and video in html5 canvas, convert the merged video to webm, then use ffmpeg to produce mp4 or another format?
Crashalot
CC BY-SA 4.0
2018-10-03T08:58:50.137Z
2018-10-03T08:58:50.137Z
tomh
<p>I want to add simple textual animations to videos, just like this one from Business Insider : <a href="https://www.facebook.com/228803477461289/videos/231065770568393/" rel="nofollow">https://www.facebook.com/228803477461289/videos/231065770568393/</a></p>

<p>What software do I need in order to realize this ? </p>

<p>I know that After Effects is capable of such things, but I'm looking for (more specialized) software with much less learning curve. </p>

CC BY-SA 3.0
2016-02-17T13:24:58.240Z
all of those could be achieved directly in your NLE or using simple templates for your NLE, if your using FCPX then Motion would be a good option otherwise AE is going to be the best bet
Adam Mann Pro
CC BY-SA 3.0
2016-02-17T19:59:35.810Z
I'd use Premiere before I used AE, or FCPX.  Take your pick.
Jason Conrad
<animation><effects>
How to add simple textual animations to videos?
sudo --do-it
# How to add simple textual animations to videos?

(Asked by: username_0 on 2016-02-17)

I want to add simple textual animations to videos, just like this one from Business Insider : <https://www.facebook.com/228803477461289/videos/231065770568393/>

What software do I need in order to realize this ?

I know that After Effects is capable of such things, but I'm looking for (more specialized) software with much less learning curve.

**Tags:** animation, effects

> **Comments:**
> **username_1**: all of those could be achieved directly in your NLE or using simple templates for your NLE, if your using FCPX then Motion would be a good option otherwise AE is going to be the best bet  
> **username_2**: I'd use Premiere before I used AE, or FCPX.  Take your pick.  

---

## 3 answers

### Answer by username_3 on 2018-10-03. Score: 2

This code works well now. It has several text animations with FFMpeg.

`ffmpeg -i input.mp4 -vf "[in]drawtext=fontfile=/path/to/font.ttf: text='First Line': fontcolor=red: fontsize=40: x=(w-text_w)/2: y=if(lt(t\,3)\,(-h+((3*h-200)*t/6))\,(h-200)/2):enable='between(t,2.9,50)',drawtext=fontfile=/path/to/font.ttf: text='Second Line': fontcolor=yellow: fontsize=30: x=if(lt(t\,4)\,(-w+((3*w-tw)*t/8))\,(w-tw)/2): y=(h-100)/2:enable='between(t,3.5,50)',drawtext=fontfile=/path/to/font.ttf: text='Third Line': fontcolor=blue: fontsize=50: x=if(lt(t\,5)\,(2*w-((3*w+tw)*t/10))\,(w-tw)/2): y=h/2:enable='between(t,4.5,50)',drawtext=fontfile=/path/to/font.ttf: text='Fourth Line': fontcolor=black: fontsize=20: x=(w-text_w)/2: y=if(lt(t\,6)\,(2*h-((3*h-100)*t/12))\,(h+100)/2):enable='between(t,5.5,50)'[out]" out.mp4`


---

### Answer by username_4 on 2016-02-17. Score: 2

You can achieve that with [ffmpeg](https://www.ffmpeg.org/). Draw text with `drawtext` command. And draw semitransperent beckground under it with  `drawbox`. You can see more in [that question](https://video.stackexchange.com/questions/15551/ffmpeg-drawtext-filter-create-transparent-background-with-text).

You can add animation of moving text from side of video with [Expression Evaluation](http://ffmpeg.org/ffmpeg-utils.html#Expression-Evaluation).

> **Comments:**
> **username_5**: do you know if it's possible to render the render text and video in html5 canvas, convert the merged video to webm, then use ffmpeg to produce mp4 or another format?  

---

### Answer by username_6 on 2018-10-03. Score: 2

Looking at the video, I'd say it's highly likely it was made with Adobe Premiere, Final Cut, or Adobe After Effects. You could achieve the same thing in FFMPEG, but I doubt that's how they actually made it.

> **Comments:**
> **username_7**: Upvoted, on this website it seems that ffmpeg is the solution to everything. It's true it can do almost anything, but when the OP asks for something easier than After Effects, ffmpeg is not really an answer  
> **username_5**: thanks for the answer. would it be possible to render the render text and video in html5 canvas, convert the merged video to webm, then use ffmpeg to produce mp4 or another format?  

---

