[FFmpeg-user] Drawtext filter

Sebastian Arcus shop at open-t.co.uk
Sun Mar 27 17:36:59 CEST 2011


[/snip]
>
>> 1. If I use the just the "text" argument, there is an error
>> complaining about not having used a "fontfile" argument.
>
> Yes, because fontfile is mandatory.
>
>> 2. If I use "text" and "fontfile", there is no error, but the text
>> doesn't show.
>
> You need to specify a value for text, or it will use the default value
> of "".
>
>> 3. If I use "text" and "fontfile" and "x" and "y" arguments, still
>> no error and still no snow.
>
> Same, x and y are optional, and default to 0.

That's exactly my point. It doesn't seem that the defaults work 
properly. Above, I meant, even if I give appropriate values to "text", 
"fontfile", "x" and "y" arguments - the text still doesn't show in the 
video - but there is no error either.

>
>> 4. If I use "text", "fontfile", "x", "y", "fontcolor" - finally the
>> text shows in the video - although I haven't used "fontsize".
>
> fontsize is optional.
>
>> It would be useful if there is a full error for any compulsory
>> argument missing from the command line - for the drawtext filter,
>> that is.
>
>> Also - the text shows upside down in the video - I have no idea why.
>
> Please provide commandline so that I can reproduce it.

   ffmpeg -fflags +genpts -t 600 -f mjpeg -r 5 -s 640x480 \
     -i http://localhost:808$4/?action=stream -vcodec mpeg4 \
     -vf drawtext="fontfile=mitra.ttf:x=40:y=430: \
     text='test': \
     fontcolor=0xFFFFFFFF:fontsize=22: \
     shadowcolor=0x000000EE:shadowx=2:shadowy=2" \
     -b 1000000 -r 5 /var/myapp/testvideo.avi


The input for the above is an mjpeg stream from mjpg_streamer (which 
comes from a usb webcam).


Thanks again,

Sebastian


More information about the ffmpeg-user mailing list