title: FFmpeg - How to scale a video then apply a watermark?
body: <p>Im trying to scale a video so that it is always 512 wide where the height changes in proportion to the original video.
  Once scaled, I then want to apply a watermark/overlay to the video, therefore the video will scale but the watermark wont.</p>
  <p>I am able to achieve each of these separately using the following filters:</p>
  <p><strong>Scale</strong></p>
  <pre><code>-vf &quot;scale=512:-1&quot;
  </code></pre>
  <p><strong>Watermark</strong></p>
  <pre><code>-vf &quot;movie=watermark.png [watermark]; [in][watermark] overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2 [out]&quot;
  </code></pre>
  <p>They work successfully on their own.</p>
  <p>However when trying to combine the two, Im having a bit of trouble.</p>
  <p>Having both as parameters of course does not work as one will override the other.</p>
  <p>Ive tried:</p>
  <pre><code>-vf &quot;scale=512:-1,movie=watermark.png [watermark]; [in][watermark] overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2 [out]&quot;
  </code></pre>
  <p>my thinking was that the scale would be applied first then the watermark but all I get is an error</p>
  <blockquote>
  <p>Too many inputs specified for the &quot;movie&quot; filter.</p>
  <p>Error opening filters!</p>
  </blockquote>
  <p>Then changing the , to a ; resulted in:</p>
  <blockquote>
  <p>Simple filtergraph 'scale=512:-1;
  movie=watermark.png
  [watermark]; [in][watermark]
  overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2 [out]' does not have
  exactly one input and output.</p>
  <p>Error opening filters!</p>
  </blockquote>
  <p>I presume I need to do something more with filterchains but Im struggling to figure it out.</p>
  <p>Any ideas anyone?</p>
  <p>Many thanks in advance.</p>