FORUMS: list search recent posts

Adding multiple drawtexts with different timing and effect

COW Forums : Compression Techniques

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Gianluca Ferrantelli
Adding multiple drawtexts with different timing and effect
on Feb 8, 2018 at 9:58:36 am

Hi guys,
I need to create a video from an image ( or from another video ), and I have to add multiple text on it ( the number may vary ), in this way:
the odd text ( text 1,3,5 ... ) should move from the left to the center, the even text ( 2,4,6.. ) from the right to the center, and so on.

I'm trying to proceed in this way; I split the input video in as many part as the text I need to draw , then, for each split, I create a drawtext with its own effect; then I concat all the split together in the final video.
Each text should remain on the video for 5 seconds.

It should looks like :

ffmpeg -y -f image2 -loop 1 -i img001.jpg \
-filter_complex "\
[0]split=2[v1][v2]...[vn], \
[v1]drawtext=enable='between(t,0,5)':text='First Text':fontsize=40:fontcolor=red:x=[[some effect]]:y=[[some effect]][out1];\
[v2]drawtext=enable='between(t,5,10)':text='Second Text':fontsize=40:fontcolor=red:x=[[some effect]]:y=[[some effect]][out2];\
[vn]drawtext=enable='between(t,5,10)':text='Second Text':fontsize=40:fontcolor=red:x==[[some effect]]:y==[[some effect]]:[out{n}];\
" \
-c:v libx264 \
-t 20 \
-map "[final]" out.mp4

But unfortunatly it does not work; can someone help me? is this the right way to proceed?
Thanks in advance

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 All Rights Reserved