Skip to content

Instantly share code, notes, and snippets.

@zeryx
Created April 28, 2017 19:12
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