Skip to content

Commit

Permalink
Fixed the bug of timestep
Browse files Browse the repository at this point in the history
  • Loading branch information
SWHL committed Feb 12, 2023
1 parent 4a381c5 commit a21c9ce
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
- [简介](#简介)
- [TODO](#todo)
- [更新日志(more)](#更新日志more)
- [🎈2023-01-29 v1.1.10 update:](#2023-01-29-v1110-update)
- [2023-02-12 v2.0.1 update:](#2023-02-12-v201-update)
- [🎈2023-01-29 v1.1.10 update:](#2023-01-29-v1110-update)
- [🧨2023-01-28 v1.1.9 update:](#2023-01-28-v119-update)
- [使用步骤](#使用步骤)
- [写在最后](#写在最后)
Expand All @@ -41,6 +42,9 @@
- [ ] 尝试将VideoSubFinder核心功能整合到本项目中,通过其开放的CLI mode

### 更新日志([more](./docs/change_log.md)
#### 2023-02-12 v2.0.1 update:
- 修复视频时长大于1个小时,字幕帧时间变为0的bug.

#### 🎈2023-01-29 v1.1.10 update:
- 修复帧索引转时间戳时,索引为空错误

Expand Down
6 changes: 3 additions & 3 deletions assets/test_video/2.srt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
00:00:00,041 --> 00:00:00,415
0:00:00,041 --> 0:00:00,415
空间里面他绝对赢不了的

00:00:00,416 --> 00:00:01,165
0:00:00,416 --> 0:00:01,165
我进去帮他

00:00:01,541 --> 00:00:02,540
0:00:01,541 --> 0:00:02,540
你们接着善后

2 changes: 1 addition & 1 deletion demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@

extractor = RapidVideOCR()

rgb_dir = 'RGBImages'
rgb_dir = 'test_files/RGBImages'
save_dir = 'result'
extractor(rgb_dir, save_dir)
2 changes: 0 additions & 2 deletions rapid_videocr/rapid_videocr.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,9 @@ def __call__(self,
def get_time(file_path: Path) -> str:
split_paths = file_path.stem.split('_')
start_time = split_paths[:4]
start_time[0] = '00'
start_str = ':'.join(start_time[:3]) + f',{start_time[3]}'

end_time = split_paths[5:9]
end_time[0] = '00'
end_str = ':'.join(end_time[:3]) + f',{end_time[3]}'
return f'{start_str} --> {end_str}'

Expand Down

0 comments on commit a21c9ce

Please sign in to comment.