Skip to content

Instantly share code, notes, and snippets.

@zeryx
Created April 28, 2017 19:12
Show Gist options
  • Save zeryx/00173fcd8a15ccee7f640e468b08038e to your computer and use it in GitHub Desktop.
Save zeryx/00173fcd8a15ccee7f640e468b08038e to your computer and use it in GitHub Desktop.
def get_ffmpeg(location):
tar_file = client.file(location).getFile().name
retcode = subprocess.call(['tar', '-xvf', tar_file, '-C', '/tmp'])
if retcode == 0:
ffmpeg_file = '/tmp/ffmpeg-static/ffmpeg'
os.environ["PATH"] += os.pathsep + ffmpeg_file
# for testing
subprocess.call(['ffmpeg'])
else:
raise AlgorithmError('tar exited with code %d' % retcode)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment