pipi cucu
This commit is contained in:
@@ -111,9 +111,14 @@ def extract_scene_frames(input_path, output_dir, scene_threshold=0.10,
|
||||
except ffmpeg.Error as e:
|
||||
# ffmpeg may exit non-zero on growing files (corrupt tail) but still
|
||||
# produce valid frames. Return the stderr for parsing anyway.
|
||||
log.debug("ffmpeg exited with error (may still have valid frames)")
|
||||
stdout = e.stdout or b""
|
||||
stderr = e.stderr or b""
|
||||
err_text = stderr.decode("utf-8", errors="replace")
|
||||
# Log the last meaningful line so we can see the real cause
|
||||
for line in reversed(err_text.splitlines()):
|
||||
if line.strip() and not line.startswith(" "):
|
||||
log.debug("ffmpeg scene error: %s", line.strip())
|
||||
break
|
||||
stdout = e.stdout or b""
|
||||
return stdout.decode("utf-8", errors="replace"), stderr.decode("utf-8", errors="replace")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user