title: FFMPEG picture in picture and watermark
body: <p>I'm trying to take create a picture in picture effect with 2 videos and add a watermark with 1 command.  Here's what I have so far, it works great, except the watermark is on the picture in picture video, not the main background video.  How do I make the watermark on the main video?  </p>
  
  <pre><code>ffmpeg -y -i pip.mp4 -i main.mp4 -i logo.png -filter_complex \
  "[0]scale=iw/4:-1[pip]; \
   [pip][2]overlay=10:10[watermark]; \
   [1][watermark]overlay=main_w-overlay_w-10:main_h-overlay_h-10" output.mp4
  </code></pre>