drop frame uses full path to ffprobe set in FFMPEG_PATH env

This commit is contained in:
iLLiCiTiT 2019-10-04 13:14:50 +02:00
parent b7c827f35d
commit 71ad16e650

View file

@ -220,15 +220,21 @@ class DropDataFrame(QtWidgets.QFrame):
self._process_data(data)
def load_data_with_probe(self, filepath):
ffprobe_path = os.getenv("FFMPEG_PATH", "")
if ffprobe_path:
ffprobe_path += '/ffprobe'
else:
ffprobe_path = 'ffprobe'
args = [
'ffprobe',
ffprobe_path,
'-v', 'quiet',
'-print_format', 'json',
'-show_format',
'-show_streams', filepath
]
ffprobe_p = subprocess.Popen(
args,
' '.join(args),
stdout=subprocess.PIPE,
shell=True
)