title: converting complex ffmpeg command to python3
body: <p>I have a complicated <code>ffmpeg</code> command that takes audio and image as input, and exports a music video.</p>
  
  <pre class="lang-sh prettyprint-override"><code>ffmpeg -loop 1 -framerate 2 -i "front.png" -i "testWAVfile.wav" \
      -vf "scale=2*trunc(iw/2):2*trunc(ih/2),setsar=1,format=yuv420p" \
      -c:v libx264 -preset medium -tune stillimage \
      -crf 18 -c:a aac -shortest -vf scale=1920:1080  "outputVideo.mp4"
  </code></pre>
  
  <p>I'm trying to write a python3 program <code>cmdMusicVideo.py</code> which will run this command in pure Python. I know that to run this command you need the <code>ffmpeg</code> program, I'm trying to write it in pure python3, where I'm not just spawning a separate process to run the bash command where the user needs to have <code>ffmpeg</code> installed.</p>
  
  <p>I've looked at the various solutions to running <code>ffmpeg</code> in python3, and they're either:</p>
  
  <ul>
  <li>A:  Just running the <code>ffmpeg</code> command as a subprocess, where the user needs to have <code>ffmpeg</code> installed</li>
  <li>or B: An ffmpeg pip program like <code>ffmpeg-python</code></li>
  </ul>
  
  <p>The pip libraries I've checkout out all use incredibly different formatting, and I haven't found a way to replicate my <code>ffmpeg</code> command. I've searched the <code>loop</code> command in their python package documentation and it doesn't appear anywhere.</p>
  
  <p>Is there a way to convert my <code>ffmpeg</code> command into a python3 program where the user doesn't need to already have <code>ffmpeg</code> installed on their computer? </p>
  
  <p>The plan is to eventually turn this into its own pip package, and my concern is that if I use the <strong>A</strong> method, there would be a case where somebody tries to run my pip command but doesn't have <code>ffmpeg</code> installed on their terminal (maybe using a python3 specific terminal?) </p>