[FFmpeg-user] Question on Drawtext box

Roger Pack rogerdpack2 at gmail.com
Fri Aug 31 18:07:33 CEST 2012


> Is it possible to have multiple drawtext boxes in the ffmpeg stream?
>
> Here is what my command looks like now:
>
> ffmpeg -f alsa -ac 1 -i pulse -f video4linux2 -i /dev/video0 -s 1024x576 -vf
> drawtext="fontfile=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf:
> text='\%D    \%r': fontcolor=white at 1.0: x=140: y=450: fontsize=30: box=1:
> boxcolor=black at 1.0" -vcodec libx264 -acodec libmp3lame -ab 28k -ar 22050 -vb
> 350k -f flv rtmp://

This seems to work here for me:

$ ffmpeg -i input.mpg -filter_complex "[0]
drawtext=fontfile=Arial.ttf:text=hello1:x=77:y=77:box=1:
boxcolor=black at 1.0,drawtext=box=1:
boxcolor=black at 1.0:fontfile=Arial.ttf:text=hello2:x=100:y=100"  yo.mp4


More information about the ffmpeg-user mailing list