[FFmpeg-user] Drawtext filter
Stefano Sabatini
stefano.sabatini-lala at poste.it
Sun Mar 27 19:07:04 CEST 2011
On date Sunday 2011-03-27 16:36:59 +0100, Sebastian Arcus encoded:
> [/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.
Are you sure that x and y don't specify a position *outside* the
screen?
> >>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).
I can't reproduce here (the "upside down" issue). Are you sure that
there is not a problem in the input file in the first place?
Can you show a minimal command which issue the problem, whatever the
input file is?
Thanks for the report.
More information about the ffmpeg-user
mailing list