From 17073857e1ee3d91eab4f39b7040be4be2e517c7 Mon Sep 17 00:00:00 2001 From: clinton-hall Date: Sun, 13 Jul 2014 21:17:03 +0930 Subject: [PATCH] try again without show_error. Fixes #480 --- nzbtomedia/transcoder/transcoder.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/nzbtomedia/transcoder/transcoder.py b/nzbtomedia/transcoder/transcoder.py index 9f548c15..afe37088 100644 --- a/nzbtomedia/transcoder/transcoder.py +++ b/nzbtomedia/transcoder/transcoder.py @@ -43,14 +43,22 @@ def getVideoDetails(videofile): result = 1 if not nzbtomedia.FFPROBE: return video_details, result - command = [nzbtomedia.FFPROBE, '-v', 'quiet', '-print_format', 'json', '-show_format', '-show_streams', '-show_error', videofile] try: + command = [nzbtomedia.FFPROBE, '-v', 'quiet', '-print_format', 'json', '-show_format', '-show_streams', '-show_error', videofile] proc = subprocess.Popen(command, stdout=subprocess.PIPE) out, err = proc.communicate() result = proc.returncode video_details = json.loads(out) - except: - logger.error("Checking [%s] has failed" % (videofile), 'TRANSCODER') + except: pass + if not video_details: + try: + command = [nzbtomedia.FFPROBE, '-v', 'quiet', '-print_format', 'json', '-show_format', '-show_streams', videofile] + proc = subprocess.Popen(command, stdout=subprocess.PIPE) + out, err = proc.communicate() + result = proc.returncode + video_details = json.loads(out) + except: + logger.error("Checking [%s] has failed" % (videofile), 'TRANSCODER') return video_details, result def buildCommands(file, newDir):