Created
April 28, 2017 19:12
-
-
Save zeryx/00173fcd8a15ccee7f640e468b08038e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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