Clean-up fall-back for ffmpeg not accepting show error

This commit is contained in:
Clinton Hall 2019-05-31 13:23:40 +12:00 committed by GitHub
commit dd2ce9112b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -109,12 +109,11 @@ def get_video_details(videofile, img=None, bitbucket=None):
result = proc.returncode result = proc.returncode
video_details = json.loads(out.decode()) video_details = json.loads(out.decode())
except Exception: except Exception:
pass try: # try this again without -show error in case of ffmpeg limitation
if not video_details:
try:
command = [core.FFPROBE, '-v', 'quiet', print_format, 'json', '-show_format', '-show_streams', videofile] command = [core.FFPROBE, '-v', 'quiet', print_format, 'json', '-show_format', '-show_streams', videofile]
print_cmd(command)
if img: if img:
procin = zip_out(file, img) procin = zip_out(file, img, bitbucket)
proc = subprocess.Popen(command, stdout=subprocess.PIPE, stdin=procin.stdout) proc = subprocess.Popen(command, stdout=subprocess.PIPE, stdin=procin.stdout)
procin.stdout.close() procin.stdout.close()
else: else: