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
video_details = json.loads(out.decode())
except Exception:
pass
if not video_details:
try:
try: # try this again without -show error in case of ffmpeg limitation
command = [core.FFPROBE, '-v', 'quiet', print_format, 'json', '-show_format', '-show_streams', videofile]
print_cmd(command)
if img:
procin = zip_out(file, img)
procin = zip_out(file, img, bitbucket)
proc = subprocess.Popen(command, stdout=subprocess.PIPE, stdin=procin.stdout)
procin.stdout.close()
else: