File tree 1 file changed +10
-6
lines changed
1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -54,17 +54,21 @@ def render_video(video_path):
54
54
srt_path = original_video_path [:- 4 ] + ".srt"
55
55
jsonl_path = original_video_path [:- 4 ] + ".jsonl"
56
56
57
- # Recoginze the resolution of video
58
- resolution_x , resolution_y = get_resolution (original_video_path )
59
57
try :
58
+ # Recoginze the resolution of video
59
+ resolution_x , resolution_y = get_resolution (original_video_path )
60
60
# Process the danmakus to ass and remove emojis
61
61
subtitle_font_size , subtitle_margin_v = process_danmakus (
62
62
xml_path , resolution_x , resolution_y
63
63
)
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"
68
72
69
73
# Generate the srt file via whisper model
70
74
if MODEL_TYPE != "pipeline" :
You can’t perform that action at this time.
0 commit comments