README.md 1.3 KB

video-subtitle-extract

videos extract subtitles. The project includes python (video processing) and java (picture to text) source.

Introduction

This tool mainly serves companies such as news media and self-media. Implemented the following functions:

Position the subtitles in the video,

Use the Natural Language Recognition function to extract the subtitle text in the video.

Usage

  1. Put the video file in the videos folder.

  2. First execute the pre_do.py file to check the video frame rate, video size and other information.

  3. Through the previous operation, modify the parameters in main.py so that the subtitle pictures are intercepted well. Then executing main.py will generate subtitle pictures (10 sentences combined into one picture for easy identification) in the videos folder after analyzing the video.

  4. Execute MainFm.java to perform batch text recognition on the above pictures (call Baidu/Sogou and other text recognition free interfaces respectively). The obtained results are saved in the project resxxx.txt file.

Note

Due to the text recognition interface, the recognition may be wrong. So you can execute it a few times and compare the results.

Copyright

mail: liuyuqi.gov@msn.cn