I'm trying to make an RTMP stream of a video and put some graphical data on it. I have a command which creates the output I need. The only problem is that despite of the fact the PNG image is being updated on disk during the render process, in output video the overlay stays always the same. I would like ffmpeg to take a PNG image from disk every time it has been changed (or once a minute or so) and use it as an overlay. Is that possible?
Here is the command I use to render the output:
ffmpeg \
-re -y \
-f lavfi \
-i "movie=filename=video/videobg.mp4:loop=0, setpts=N/(FRAME_RATE*TB)" \
-loop 1 \
-i images/forecast.png \
-filter_complex "[1:v]format=argb,geq=r='r(X,Y)':a='0.9*alpha(X,Y)'[overlay]; [0:v][overlay]overlay" \
-i data/musicbg.mp3 \
-ac 1 \
-ar 44100 \
-b:a 128k \
-vcodec libx264 \
-pix_fmt yuv420p \
-r 30 \
-g 60 \
output.mp4