[FFmpeg-user] text overlay will not work on rtmp stream

Carl Eugen Hoyos ceffmpeg at gmail.com
Wed Sep 19 19:04:47 EEST 2018


2018-09-19 17:08 GMT+02:00, Anthony Griffiths <neuronetv at gmail.com>:
> I stream video from a canopus advc100 device to a vps running nginx
> using ffmpeg with the following command:
> dvgrab -format dv1 - |
> /home/<me>/Downloads/ffmpeg-git-20170817-64bit-static/ffmpeg
> -deinterlace -f dv -i - \
> -vf
> [in]drawtext="fontfile=/home/<me>/packages/Fonts/verdana.ttf:textfile=/home/<me>/screentext.txt:fontcolor=white:fontsize=20:x=30:y=30:reload=1"[out]
> \
> -codec:v libx264 -preset slow -aspect 16:9 -s 320x180 -b:v 1500k
> -maxrate 500k -bufsize 1000k -vf scale=-1:240 -threads 0 -f flv \
> -framerate 15 -qscale:v 20 -codec:a aac -b:a 64k -af aformat=s16:44100
> rtmp://<ip-address>/<name-nginx>
>
> the video plays fine at the other end but there is no text overlay on
> the video. the file /home/<me>/screentext.txt does have text in it.
>
> whats strange is this command does work with text overlay. It streams
> the same source to the same vps but to red5 server rather than nginx.
> dvgrab -format dv1 - | /home/<me>/bin/ffmpeg -deinterlace -f dv -i - -f flv
> \
> -vf
> [in]drawtext="fontfile=/home/<me>/packages/Fonts/verdana.ttf:textfile=/home/<me>/screentext.txt:fontcolor=white:fontsize=20:x=30:y=30:reload=1"[out]
> \
> -y -vcodec flv -s 320x240 -r 10 -b:v 400k -vcodec libx264 -preset

This command looks wrong because you are requesting
two different video codecs which is likely undefined
behaviour.

> veryfast -crf 25 -maxrate 1000k -bufsize 6000k \
> -g 20 -c:a libfdk_aac -ac 1 -ab 32k -ar 22050
> 'rtmp://<ip-address>/<name-red5>'
>
> The first command is the one I want to use because it works for
> playback on a smart phone but i can't get the text overlay to work.
> can anyone see whats wrong with the command?

Feel free to provide the complete, uncut console output of the
command you tested.

Carl Eugen


More information about the ffmpeg-user mailing list