[FFmpeg-user] How to perform two filters: overlay an image and apply .acv color curve?

Michael Shaffer mikeshaffer at gmail.com
Mon Aug 20 02:37:49 EEST 2018


I am streaming a ip camera feed. I want to display an image overlay on the
bottom of the screen with an image that refreshes. I also want to apply an
.acv color curve to the image to get rid of fog and haze. I have figured
out how to do both operations separately, but am having trouble figuring
out doing them both. I've read the filter_complex documentation and I'm a
bit lost.

This is my command for just apply the .acv color curve. It works great.
c:\ffmpeg\bin\ffmpeg1.exe -re -rtsp_transport tcp -i "rtsp://
admin:password at 192.168.1.101:554/VideoInput/1/h264/1" -f lavfi -f dshow
-rtbufsize 2000M -thread_queue_size 5096 -i audio="virtual-audio-capturer"
-c:a libmp3lame -ab 128k -ar 44100 -c:v libx264 -preset fast -crf 30
-x264-params keyint=60:scenecut=0 -threads 0 -bufsize 512k -vf
curves=psfile=test.acv -f flv "rtmp://
a.rtmp.youtube.com/live2/bmbp-2222-2222-3hgj"

This is my attempt to apply the overlay, test.png, and apply the .acv color
curve

c:\ffmpeg\bin\ffmpeg1.exe -report -i test.png -rtsp_transport tcp -i
"rtsp://admin:password@192.168.1.101:554/VideoInput/1/h264/1"
-filter_complex
"[0:v]format=argb,geq=r='r(X,Y)':a='0.9*alpha(X,Y)'[overlay];
[1:v][overlay]overlay; [2]curves=psfile=test.acv" -f lavfi -f dshow
-rtbufsize 2000M -thread_queue_size 5096 -i audio="virtual-audio-capturer"
-c:a libmp3lame -ab 128k -ar 44100 -c:v libx264 -preset fast -crf 30
-x264-params keyint=60:scenecut=0 -threads 0 -bufsize 512k -pix_fmt yuv420p
-f flv "rtmp://a.rtmp.youtube.com/live2/zw6v-2222-2222-9g0b"

I know have to use the filter_complex command but beyond that I'm lost.. I
would really appreciate help.

Thanks
Michael Shaffer


More information about the ffmpeg-user mailing list