0

I have two videos.
One is a normal video, the other is a grayscale video.
Supposedly, merging the videos I can have a video with a depth of field blur effect.
I wish to know how I could do it using ffmpeg.
The videos are generated with WolfCamQL, is a program to capture Quake Live demos.

  • Do you mean that the greyscale video is a depth map for the other? Don't think this is possible with ffmpeg – you can only set one particular level of blur for a certain area. After Effects or Foundry Nuke would be an option. – slhck Dec 30 '17 at 11:04
  • Yes! Exactly! I know that's possible to do it with After Effects. But I do not want to use propietary software, and even less if I must pay for it. I don't stand piracy, so the only option is using open source software (if it's cheap, maybe I would pay for the software). The most similar to my question that I found is this: https://superuser.com/questions/1054940/using-ffmpeg-to-create-a-video-from-a-sequence-of-tga-images-with-a-depth-of-fi?rq=1 But I don't understand the -filter_complex and -map parameters. So I don't know if I could adapt that parameters having two input videos. – Carlos Martínez Medina Dec 30 '17 at 11:25
  • Maybe I could expand the two videos into png frames, and make use of another program like ImageMagick to merge the normal frames with depth map frames, and then joining again with ffmpeg? – Carlos Martínez Medina Dec 30 '17 at 11:40
  • You can try `ffmpeg -i main.mp4 -i depth.mp4 -filter_complex "[0:v]boxblur=5[v];[v][1]alphamerge[v];[0:v][v]overlay" out.mp4` -- it may not be the exact effect you seek. – Gyan Dec 30 '17 at 16:51
  • Well, using that at least don't crash. I mean, in theory merges the two videos. But I don't perceive any difference. Maybe I need to adjust the DoF settings in WolfCamQL. – Carlos Martínez Medina Dec 30 '17 at 17:51

0 Answers0