L
L
Lexaz2017-01-05 00:21:03
Nginx
Lexaz, 2017-01-05 00:21:03

How to overlay text or logo on video stream?

There is Ubuntu + nginx + rtmp + ffmpeg
I take the RTSP stream from the video camera and send it via RTMP to the site. I want to overlay text or logo on the video stream.
Now the command looks like this: ffmpeg -i rtsp://admin:[email protected]/cam/realmonitor?channel=01&subtype=00 -c copy -f flv -an rtmp://localhost:1935/

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Moskus, 2017-01-05
@Moskus

Since you have two inputs (rtsp stream and logo image), you will have to use complex filtergraph . Which means that the video will be recompressed (that is -c copy, it will no longer be possible to use it). Accordingly, add to your line

-i logo.png -filter_complex "[0][1]blend=all_mode=overlay:all_opacity=0.5"
(for a translucent overlay with opacity 0.5). Compression settings - to taste.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question