Skip to content

Commit 3663d45

Browse files
authored
fix: expand exception (#291)
fix #287
1 parent 44c87d6 commit 3663d45

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/burn/render_video.py

+10-6
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,21 @@ def render_video(video_path):
5454
srt_path = original_video_path[:-4] + ".srt"
5555
jsonl_path = original_video_path[:-4] + ".jsonl"
5656

57-
# Recoginze the resolution of video
58-
resolution_x, resolution_y = get_resolution(original_video_path)
5957
try:
58+
# Recoginze the resolution of video
59+
resolution_x, resolution_y = get_resolution(original_video_path)
6060
# Process the danmakus to ass and remove emojis
6161
subtitle_font_size, subtitle_margin_v = process_danmakus(
6262
xml_path, resolution_x, resolution_y
6363
)
64-
except TypeError as e:
65-
scan_log.error(f"TypeError: {e} - Check the return value of process_danmakus")
66-
except FileNotFoundError as e:
67-
scan_log.error(f"FileNotFoundError: {e} - Check if the file exists")
64+
# except TypeError as e:
65+
# scan_log.error(f"TypeError: {e} - Check the return value of process_danmakus")
66+
# except FileNotFoundError as e:
67+
# scan_log.error(f"FileNotFoundError: {e} - Check if the file exists")
68+
except Exception as e:
69+
scan_log.error(f"Error in process_danmakus: {e}")
70+
subtitle_font_size = "16"
71+
subtitle_margin_v = "60"
6872

6973
# Generate the srt file via whisper model
7074
if MODEL_TYPE != "pipeline":

0 commit comments

Comments
 (0)