title: Parse ffmpeg output into batch variable
body: <p>help please.
  I am on Windows command line and I want ffmpeg error returned as variable.
  Tried many things, still not working.</p>
  
  <pre><code>@echo off&amp;setlocal disabledelayedexpansion
  SET S="path\to\ffmpeg.exe" -hide_banner -i InputFile.FLV -vframes 1 -an -s 400x222 -ss 30 OutputFile.jpg
  !S!
  for /f "usebackq delims=" %%A in ('!S!') do set var=%%A
  echo !var!
  </code></pre>
  
  <p>The result is that the statement !S! produces the correct output on the console (<code>InputFile.FLV: No such file or directory</code>) but does not put that into the variable. The output of echo !var! statement simply shows as <code>"path\to\ffmpeg.exe" -hide_banner -i InputFile.FLV -vframes 1 -an -s 400x222 -ss 30 OutputFile.jpg</code></p>
  
  <p>How do I get the output of !S! into !var!?</p>