summaryrefslogtreecommitdiff
path: root/libmat2/video.py
diff options
context:
space:
mode:
Diffstat (limited to 'libmat2/video.py')
-rw-r--r--libmat2/video.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/libmat2/video.py b/libmat2/video.py
index 2b33bc0..b4a3232 100644
--- a/libmat2/video.py
+++ b/libmat2/video.py
@@ -1,6 +1,6 @@
1import subprocess 1import subprocess
2import functools 2import functools
3import os 3import shutil
4import logging 4import logging
5 5
6from typing import Dict, Union 6from typing import Dict, Union
@@ -137,9 +137,8 @@ class MP4Parser(AbstractFFmpegParser):
137 137
138@functools.lru_cache() 138@functools.lru_cache()
139def _get_ffmpeg_path() -> str: # pragma: no cover 139def _get_ffmpeg_path() -> str: # pragma: no cover
140 ffmpeg_path = '/usr/bin/ffmpeg' 140 which_path = shutil.which('ffmpeg')
141 if os.path.isfile(ffmpeg_path): 141 if which_path:
142 if os.access(ffmpeg_path, os.X_OK): 142 return which_path
143 return ffmpeg_path
144 143
145 raise RuntimeError("Unable to find ffmpeg") 144 raise RuntimeError("Unable to find ffmpeg")