[FFmpeg-user] text overlay will not work on rtmp stream
Anthony Griffiths
neuronetv at gmail.com
Thu Sep 20 11:46:17 EEST 2018
On Wed, Sep 19, 2018 at 5:55 PM, Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
> 2018-09-19 18:46 GMT+02:00, Anthony Griffiths <neuronetv at gmail.com>:
>> On Wed, Sep 19, 2018 at 5:04 PM, Carl Eugen Hoyos <ceffmpeg at gmail.com>
>> wrote:
<snip>
>
> You have (above) "-vcodec flv -vcodec libx264" which is not ok.
>
>> is the console output from the first command:
>>
>> ffmpeg version 2.5.3 Copyright (c) 2000-2015 the FFmpeg developers
>
> This is too old, please test current FFmpeg git head.
>
> Carl Eugen
ok thanks, I'm now using the latest git static build
(ffmpeg-git-20180920-64bit-static) but it made no difference, there's
still no text overlay on the video: This is the command I'm now
running:
dvgrab -format dv1 - |
/home/<me>/Downloads/ffmpeg-git-20180920-64bit-static/ffmpeg
-deinterlace -f dv -i - -f flv -y \
-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 \
-framerate 15 -qscale:v 20 -codec:a aac -b:a 64k -af aformat=s16:44100
rtmp://<ip-address>/<name-nginx>"
this command plays video fine but text overlay is still missing,
you stated I have two video codecs but ffmpeg will not run without
them both. If I remove "-f flv" ffmpeg fails, I get:
[NULL @ 0x57c1c40] Unable to find a suitable output format for
'rtmp://<ip-address>/<name-nginx>'
rtmp://<ip-address>/<name-nginx>: Invalid argument
and if I remove "-codec:v libx264" ffmpeg again fails to run and gives
this error:
Codec AVOption preset (Configuration preset) specified for output file
#0 (rtmp://<ip-address>/<name-nginx>) has not been used for any
stream. The most likely reason is either wrong type (e.g. a video
option with no video streams) or that it is a private option of some
encoder which was not actually used for any stream.
Stream mapping:
Stream #0:0 -> #0:0 (dvvideo (native) -> flv1 (flv))
Stream #0:1 -> #0:1 (pcm_s16le (native) -> aac (native))
[flv @ 0x63f3100] bitrate above max bitrate
Error initializing output stream 0:0 -- Error while opening encoder
for output stream #0:0 - maybe incorrect parameters such as bit_rate,
rate, width or height
Conversion failed!
thankyou for your help so far on this.
More information about the ffmpeg-user
mailing list