code: def extract_stream(source, dest, stream_id):
      '''
      Get the data out of the file using ffmpeg
      @param filename: mp4 filename
      '''
      if not os.path.isfile(source):
          raise IOError('No such file: ' + source)
  
      subprocess.check_output([
          'ffmpeg',
          '-i', source,
          '-y',  # overwrite - potentially dangerous
          '-nostats',
          '-loglevel', '0',
          '-codec', 'copy',
          '-map', '0:' + str(stream_id),
          '-f', 'rawvideo',
          dest,
      ]f extract_stream(source, dest, stream_id):
      '''
      Get the data out of the file using ffmpeg
      @param filename: mp4 filename
      '''
      if not os.path.isfile(source):
          raise IOError('No such file: ' + source)
  
      subprocess.check_output([
          'ffmpeg',
          '-i', source,
          '-y',  # overwrite - potentially dangerous
          '-nostats',
          '-loglevel', '0',
          '-codec', 'copy',
          '-map', '0:' + str(stream_id),
          '-f', 'rawvideo',
          dest,
      ])
docs: Get the data out of the file using ffmpeg
      @param filename: mp4 filename