Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

migrated from stackoverflow.com Mar 21 '13 at 8:06

This question came from our site for professional and enthusiast programmers.

2 Answers 2

up vote 2 down vote accepted

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.

share|improve this answer
    
Thanks, working fine! Unfortunately this doesn't work with ffmbc, which I want to use for ProRes4444 encoding. –  evilheinz Mar 21 '13 at 1:35
    
@evilheinz I'm disappointed at the lack of merging back from ffmbc to ffmpeg. I should bug Baptiste about that... –  LordNeckbeard Mar 21 '13 at 4: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 9:37

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.

share|improve this answer
    
This brings up the same "Missing key or no key/value" error but this time with '/test2/overlay.mov' –  evilheinz Mar 21 '13 at 11:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.