title: how to merge audio and video file in python using ffmpeg?
body: <p>I am trying to create a python script which merge the audio and video file in one (audio+video) file.</p>
  <p>And i am using ffmpeg to achieve this but it is not working and i am getting a errors.
  while running this script here is my script.</p>
  <pre class="lang-py prettyprint-override"><code>import os
  import subprocess
  import time
  from datetime import datetime
  def merge_all():
      
   global p
   p =subprocess.Popen('ffmpeg -i temp_vid.mp4 -i temp_voice.wav -c:v copy -c:a aac -strict experimental - 
   strftime 1 ' + dt_file_name ,stdin=subprocess.PIPE,creationflags = subprocess.CREATE_NO_WINDOW)
    time.sleep(2)
    print('merging done')
    os.remove('temp_vid.mp4')
    os.remove('temp_voice.wav')
    print('file delete done')&gt;
  </code></pre>
  <p>here is the error</p>
  <pre><code>Exception in Tkinter callback
  Traceback (most recent call last):
    File &quot;C:\Users\kp\AppData\Local\Programs\Python\Python38\lib\tkinter\__init__.py&quot;, line 1883, in __call__
      return self.func(*args)
  
    File &quot;C:\Users\kp\Desktop\test.py&quot;, line 179, in change_icon
      merge_all()
  
    File &quot;C:\Users\kp\Desktop\test.py&quot;, line 104, in merge_all
   
  p =subprocess.Popen('ffmpeg -i temp_vid.mp4 -i temp_voice.wav -c:v copy -c:a aac -strict experimental -strftime 1 ' + dt_file_name ,stdin=subprocess.PIPE,creationflags = subprocess.CREATE_NO_WINDOW)
  
    File &quot;C:\Users\kp\AppData\Local\Programs\Python\Python38\lib\subprocess.py&quot;, line 854, in __init__
      self._execute_child(args, executable, preexec_fn, close_fds,
  
    File &quot;C:\Users\kp\AppData\Local\Programs\Python\Python38\lib\subprocess.py&quot;, line 1307, in _execute_child
  
  hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
  FileNotFoundError: [WinError 2] The system cannot find the file specified
  </code></pre>