Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Compression Techniques Adding multiple drawtexts with different timing and effect

  • Adding multiple drawtexts with different timing and effect

    Posted by Gianluca Ferrantelli on February 8, 2018 at 9:58 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}];\
    [out1][out2]...[out{n}]concat=n={n}:v=1:a=0[final]\
    " \
    -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

    Gianluca Ferrantelli replied 8 years, 4 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy