File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 66import subprocess
77import distutils .command .clean
88import distutils .spawn
9+ from distutils .version import StrictVersion
910import glob
1011import shutil
1112
@@ -346,6 +347,19 @@ def get_extensions():
346347
347348 ffmpeg_exe = distutils .spawn .find_executable ('ffmpeg' )
348349 has_ffmpeg = ffmpeg_exe is not None
350+ if has_ffmpeg :
351+ try :
352+ ffmpeg_version = subprocess .run (
353+ 'ffmpeg -version | head -n1' , shell = True ,
354+ stdout = subprocess .PIPE ).stdout .decode ('utf-8' )
355+ ffmpeg_version = ffmpeg_version .split ('version' )[- 1 ].split ()[0 ]
356+ if StrictVersion (ffmpeg_version ) >= StrictVersion ('4.3' ):
357+ print (f'ffmpeg { ffmpeg_version } not supported yet, please use ffmpeg 4.2.' )
358+ has_ffmpeg = False
359+ except (IndexError , ValueError ):
360+ print ('Error fetching ffmpeg version, ignoring ffmpeg.' )
361+ has_ffmpeg = False
362+
349363 print ("FFmpeg found: {}" .format (has_ffmpeg ))
350364
351365 if has_ffmpeg :
You can’t perform that action at this time.
0 commit comments