Advertisement
Guest User

Untitled

a guest
Apr 28th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. def get_ffmpeg(location):
  2. tar_file = client.file(location).getFile().name
  3. retcode = subprocess.call(['tar', '-xvf', tar_file, '-C', '/tmp'])
  4. if retcode == 0:
  5. ffmpeg_file = '/tmp/ffmpeg-static/ffmpeg'
  6. os.environ["PATH"] += os.pathsep + ffmpeg_file
  7. # for testing
  8. subprocess.call(['ffmpeg'])
  9. else:
  10. raise AlgorithmError('tar exited with code %d' % retcode)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement