3

I'm trying to watermark a video with another video placed in a different folder.

Source video [video.mov] is placed in a folder like

x:\test1\

Overlay video [overlay.mov] is placed in

x:\test2\

I'm using this command:

ffmpeg.exe -y -i x:\test1\video.mov -vf "movie=x:\test2\overlay.mov [watermark]; [in][watermark] overlay=0:0 [out]" x:\test3\video_overlay.mov

But I'm getting an error saying

Missing key or no key/value separator found after key 'test2overlay.mov'

When placing all files in the same folder and using this:

ffmpeg.exe -y -i video.mov -vf "movie=overlay.mov [watermark]; [in][watermark] overlay=0:0 [out]" video_overlay.mov

everything works fine.

So how do I get the video filter to load the overlay file from a different folder on Windows?

evilheinz
  • 153
  • 1
  • 3
  • 7

4 Answers4

3

Get rid of the movie source filter and use -filter_complex (used for filtering with multiple inputs) instead of -vf (used for filtering with one input). Now you can simply list your inputs as usual, and then tell each of your filters which inputs you want them to work with.

Since you only have two inputs you can simply do:

ffmpeg.exe -i x:\test1\video.mov -i x:\test2\overlay.mov -filter_complex overlay x:\test3\video_overlay.mov

This would be the same as:

ffmpeg.exe -i x:\test1\video.mov -i x:\test2\overlay.mov -filter_complex "[0:0][1:0]overlay[out]" x:\test3\video_overlay.mov

Get a recent ffmpeg build if yours does not support -filter_complex at Zeranoe FFmpeg Builds and see the FFmpeg Filters Documentation for more information.

llogan
  • 57,139
  • 15
  • 118
  • 145
  • Thanks, working fine! Unfortunately this doesn't work with ffmbc, which I want to use for ProRes4444 encoding. –  Mar 21 '13 at 01:35
  • @evilheinz I'm disappointed at the lack of merging back from ffmbc to ffmpeg. I should bug Baptiste about that... – llogan Mar 21 '13 at 04:46
  • Yeah, even the newly released 0.7rc8 fails in using the -filter_complex option. The only workaround I could think of would be to copy ffmbc.exe to the same folder as the overlay video and run it from there. But since I was planning to use anotherGUI as a Front-End for ffmbc it's not the best option... – evilheinz Mar 21 '13 at 09:37
1

For me, this is the only version working at all setups (double-escaped colon does not work in git bash under windows):

movie=\'c:/your/path/here.mp4\'
0

As mentioned in ticket #2166 you need to double-escape the colon:

movie=x\\:/test1/video.mov
slhck
  • 223,558
  • 70
  • 607
  • 592
-1

While @LordNeckbeard's solution is the one I would personally use (because I find it more readable), the problem may well be with those backward-slashes. Try using movie=x:/test2/overlay.mov instead.

FFmpeg is primarily developed for *nix systems, where \ is used as an escape character rather than a separator; and furthermore, ffmpeg's filterchains/filtergraphs are a special case, hence needing to be quoted.

evilsoup
  • 13,097
  • 3
  • 59
  • 80