all repos — videocr @ 1da8f73e30dc0ff45fb3ccd9c90552d3e45f91e9

Extract hardcoded subtitles from videos using machine learning

README.md (view raw)

 1# videocr
 2
 3<img width="300" alt="screenshot" src="https://user-images.githubusercontent.com/10210967/56873658-3b76dd00-6a34-11e9-95c6-cd6edc721f58.png">
 4
 5<img width="300" alt="screenshot" src="https://user-images.githubusercontent.com/10210967/56873659-3b76dd00-6a34-11e9-97aa-2c3e96fe3a97.png">
 6
 7<img width="300" alt="screenshot" src="https://user-images.githubusercontent.com/10210967/56873660-3b76dd00-6a34-11e9-90dc-20cd9613ebb1.png">
 8
 9```
10import videocr
11
12print(videocr.get_subtitles('video.avi', lang='HanS'))
13
14```
15
16Output:
17
18``` 
190
2000:00:00,000 --> 00:00:02,711
21-谢谢 … 你 好 -谢谢
22Thank you...Hi. Thanks.
23
241
2500:00:02,794 --> 00:00:04,879
26喝 点 什么 ?
27What can I get you?
28
292
3000:00:05,046  --> 00:00:12,554
31休闲 时 光 …
32For relaxing times, make it...
33
343
3500:00:12,804 --> 00:00:14,723
36三 得 利 时 光
37Bartender, Bob Suntory time.
38
394
4000:00:16,474 --> 00:00:19,144
41Un, I'll have a vodka tonic.
42
435
4400:00:19,394 --> 00:00:20,687
45谢谢
46Laughs Thanks.
47
48```