nish
nish

Reputation: 1044

ffmpeg multiple text in one command ( drawtext )

how is it possible to display multiple lines on one image

i tried command but it gives error

[NULL @ 0203D780] Unable to find a suitable output format for '[in][T1]'
[in][T1]: Invalid argument

command :

ffmpeg -threads 8 -i D:\imagesequence\dpx\brn_055.%04d.dpx -vf "drawtext="fontsize=18:fontcolor=Green:fontfile='/Windows/Fonts/arial.ttf':text='shotcam':x=(w)/2:y=(h)-25[T1], [in][T1] "drawtext="fontsize=18:fontcolor=Green:fontfile='/Windows/Fonts/arial.ttf':text='Focal Length':x=(w)/1.2:y=(h)-25[out]" D:/imagesequence/dpx/final_with_text_mod_04.jpg

Upvotes: 12

Views: 17908

Answers (1)

Ben
Ben

Reputation: 970

You don't need to label each drawtext, you just need to specify that both drawtexts are being applied on the "main" source. Everything that happens after the [in] tag is applied to the main source. You only need to label if you're using different filters, since you need to specify what is happening to each filter and when, and then how it relates to the main source. This command should work for you:

ffmpeg -threads 8 
  -i D:\imagesequence\dpx\brn_055.%04d.dpx
  -vf "[in]
    drawtext=fontsize=18:fontcolor=Green:fontfile='/Windows/Fonts/arial.ttf':
      text='shotcam':x=(w)/2:y=(h)-25,
    drawtext=fontsize=18:fontcolor=Green:fontfile='/Windows/Fonts/arial.ttf':
      text='Focal Length':x=(w)/1.2:y=(h)-25
  [out]"
  D:/imagesequence/dpx/final_with_text_mod_04.jpg

(newlines added for clarity)

Upvotes: 20

Related Questions