Jeffgold commited on
Commit
1528f81
·
1 Parent(s): c901c1e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -78,7 +78,10 @@ def convert_video(video_file, quality, aspect_ratio, video_url, api_key, upload)
78
  subprocess.run(ffmpeg_command, check=True, timeout=600)
79
  except subprocess.CalledProcessError:
80
  logging.exception("ffmpeg command failed.")
81
- return "ffmpeg command failed."
 
 
 
82
  except subprocess.TimeoutExpired:
83
  logging.exception("ffmpeg command timed out.")
84
  return "ffmpeg command timed out."
 
78
  subprocess.run(ffmpeg_command, check=True, timeout=600)
79
  except subprocess.CalledProcessError:
80
  logging.exception("ffmpeg command failed.")
81
+ error_file_path = tempfile.gettempdir() + "/error.txt"
82
+ with open(error_file_path, 'w') as error_file:
83
+ error_file.write("ffmpeg command failed.")
84
+ return error_file_path
85
  except subprocess.TimeoutExpired:
86
  logging.exception("ffmpeg command timed out.")
87
  return "ffmpeg command timed out."