I'm working on turning a sequence of TGA images into a video using ffmpeg. I want the video to have a depth of field blur effect. The alpha channel of each TGA contains a depth-mask, where black=close and white=far. I want to use this info to add DOF blur to the final output of that frame. After searching, the closest answer I could find was this
FFMPEG filter to boxblur and greyscale a video using alpha mask, but it is for a static dof-mask. The DOF mask I would be using is obviously changing every frame, and an alpha channel instead of a seperate png.
Here is my current cmd line
ffmpeg -framerate 60 -i image.%10d.tga -c:v libx264 -preset slow -crf 0 -c:a copy -pix_fmt yuv420p output0.mp4
It seems the answer would involve some use of alphamerge/alphaextract/boxblur, but I'm brand new to ffmpeg so I don't know how to formulate the command.
Here is an example of the type of TGA I would use https://dl.dropboxusercontent.com/u/19482624/alphachanneltest.tga
Thanks in advance.