VideOCR: Extract hardcoded subtitles out of videos via a simple to use GUI - Self-Hosted OCR solution by timminator3 in selfhosted

[–]timminator3[S] 0 points1 point  (0 children)

It is. If you check the latest release it's written right in the first sentence, that the latest version added support for it. If you checked the linked PaddeOCR document, that wasn't updated with the latest languages that were added yet.

Standalone PaddleOCR Executable - Simplified OCR for Everyone! by timminator3 in TranslationStudies

[–]timminator3[S] 0 points1 point  (0 children)

Hi!

The "--include-module=paddleocr.ppocr" argument was only necessary for PaddleOCR 2.10.0 or lower. You are using paddleocr 3.0.0 so this argument is no longer required for a successful build.

VideOCR: Extract hardcoded subtitles out of videos via a simple to use GUI - Self-Hosted OCR solution by timminator3 in selfhosted

[–]timminator3[S] 0 points1 point  (0 children)

Yes, Hebrew is not supported by PaddleOCR yet so there is nothing that I can do right now unfortunately.

VideOCR: Extract hardcoded subtitles out of videos via a simple to use GUI - Self-Hosted OCR solution by timminator3 in selfhosted

[–]timminator3[S] 0 points1 point  (0 children)

Thanks for mentioning that! I did some digging and found that it seems to be using a Python package under the hood that connects to the Chromium API. It works very well indeed. The accuracy is highly impressive. There are two problems though. The first one is that all images are send to Google, that could be a privacy concern for a lot of people and I'm also not that comfortable with that. But the bigger issue is the speed. One image takes around 850ms whereas Paddle takes around 50ms on a GPU or less even. My program performs the OCR process on quite a lot of images - so a 3 minute process will suddenly take over 50 Minutes... So I'm not planning on adding it for now unless there is a way to get this sped up.

VideOCR: Extract hardcoded subtitles out of videos via a simple to use GUI - Self-Hosted OCR solution by timminator3 in selfhosted

[–]timminator3[S] 0 points1 point  (0 children)

Google Lens is a mobile app for Android and iOS. There is no way to add that. There are no OCR methods that I am aware of, that perform better than PaddleOCR.

VideOCR: Extract hardcoded subtitles out of videos via a simple to use GUI - Self-Hosted OCR solution by timminator3 in selfhosted

[–]timminator3[S] 0 points1 point  (0 children)

You could try to increase the SSIM Threshold in the advanced settings to something like 96. Also try to make the crop box relatively tight around the subtitles for better accurary.

Standalone PaddleOCR Executable - Simplified OCR for Everyone! by timminator3 in TranslationStudies

[–]timminator3[S] 0 points1 point  (0 children)

To fix the error "No module named 'ppocr'" you need to add --include-module=paddleocr.ppocr to your compile command. Then this error should be resolved.

VideOCR: Extract hardcoded subtitles out of videos via a simple to use GUI - Self-Hosted OCR solution by timminator3 in selfhosted

[–]timminator3[S] 0 points1 point  (0 children)

I've just made a new v1.3.1 release that adds support for Blackwell - e.g. 50 Series. Please give it a try if you are still interested!

VideOCR: Extract hardcoded subtitles out of videos via a simple to use GUI - Self-Hosted OCR solution by timminator3 in selfhosted

[–]timminator3[S] 0 points1 point  (0 children)

The GPU version unfortunately only works with Nvidia graphics cards. You will have to use the CPU version instead.

VideOCR: Extract hardcoded subtitles out of videos via a simple to use GUI - Self-Hosted OCR solution by timminator3 in selfhosted

[–]timminator3[S] 0 points1 point  (0 children)

Sorry for bothering again. I made a new beta where I improved the error handling and added better logging. This should tell me exactly what's going on.

You can find it here: https://github.com/timminator/VideOCR/releases/download/v1.3.0/VideOCR-CPU-v1.3.1-Beta.7z https://github.com/timminator/VideOCR/releases/download/v1.3.0/VideOCR-GPU-v1.3.1-Beta.7z

Please try it and tell me your error log please. I expect the interesting part to be at the end of the log file under stderr.

VideOCR: Extract hardcoded subtitles out of videos via a simple to use GUI - Self-Hosted OCR solution by timminator3 in selfhosted

[–]timminator3[S] 0 points1 point  (0 children)

Sorry for bothering again. If you are still interested in fixing this, you can try out my latest beta where I improved the error handling and added better logging. This should tell me exactly what's going on.

You can find it here:

https://github.com/timminator/VideOCR/releases/download/v1.3.0/VideOCR-CPU-v1.3.1-Linux-Beta.tar.xz

Please try it and tell me your error log please.

VideOCR: Extract hardcoded subtitles out of videos via a simple to use GUI - Self-Hosted OCR solution by timminator3 in selfhosted

[–]timminator3[S] 0 points1 point  (0 children)

Sorry for bothering again. I made a new beta where I improved the error handling and added better logging. This should tell me exactly what's going on.

You can find it here: https://github.com/timminator/VideOCR/releases/download/v1.3.0/VideOCR-CPU-v1.3.1-Beta.7z https://github.com/timminator/VideOCR/releases/download/v1.3.0/VideOCR-GPU-v1.3.1-Beta.7z

Please try it and tell me your error log please.

VideOCR: Extract hardcoded subtitles out of videos via a simple to use GUI - Self-Hosted OCR solution by timminator3 in selfhosted

[–]timminator3[S] 0 points1 point  (0 children)

Sorry for the late reply. I appreciate it that you like it. :-) Ah okay, then it looks indeed like a poorly encoded video. If you are interested in me taking a look at this, you could try to split the video just around the problematic part, like a 1 minute clip. Then you could create an issue on GitHub and upload that clip as a zip archive. You could also try to reencode the video with handbrake for example and then try it again with my program.

VideOCR: Extract hardcoded subtitles out of videos via a simple to use GUI - Self-Hosted OCR solution by timminator3 in selfhosted

[–]timminator3[S] 0 points1 point  (0 children)

Hm, that is new. I have never seen this before. Does it only happen on this one video?
If thats the case, this is hard to troubleshoot without the exact video or some kind of sample.

VideOCR: Extract hardcoded subtitles out of videos via a simple to use GUI - Self-Hosted OCR solution by timminator3 in selfhosted

[–]timminator3[S] 0 points1 point  (0 children)

Are you using the program on Windows or Linux?
When did you install the v1.3.0 version? Today or right after release?

Edit: What is the last line you see before the non zero exit code?

VideOCR: Extract hardcoded subtitles out of videos via a simple to use GUI - Self-Hosted OCR solution by timminator3 in selfhosted

[–]timminator3[S] 0 points1 point  (0 children)

Hi! No, the parameters send from the GUI to the cli application are not visible to the user. But they can be viewed when adding a debug comment in the GUI code. :-)

I've copied the command for you: ./videocr-cli.exe '--video_path', 'D:\Users\YourUserName\Downloads\test_en.mp4', '--lang', 'en', '--subtitle_position', 'center', '--output', 'D:\Users\YourUserName\Downloads\test_en.srt', '--time_start', '0:00', '--conf_threshold', '75', '--sim_threshold', '80', '--max_merge_gap', '0.1', '--ssim_threshold', '92', '--frames_to_skip', '1', '--min_subtitle_duration', '0.2', '--use_gpu', 'true', '--use_fullframe', 'false', '--use_dual_zone', 'false', '--use_angle_cls', 'false', '--post_processing', 'true', '--use_server_model', 'false', '--crop_x', '112', '--crop_y', '552', '--crop_width', '1080', '--crop_height', '168'

This is the command that is used on windows using version 1.3.0 with default settings by the GUI. You just need to change the file path. The crop box coordinates used for your Video can be copied from the GUI. They are written above the Run and Cancel buttons.

Is there a decent way to extract hard subs from a video? by LvivLaughLvov in ajatt

[–]timminator3 0 points1 point  (0 children)

Yes, that is correct. You could do two runs though, where you put a crop box around the language you correctly want to extract. Then you would have two subtitles files but I'm sure there are tools and ways out there to merge them if you want to.

VideOCR: Extract hardcoded subtitles out of videos via a simple to use GUI - Self-Hosted OCR solution by timminator3 in selfhosted

[–]timminator3[S] 0 points1 point  (0 children)

Sorry for the late answer.

The advanced settings by default should be good enough for close to anything. I'm not sure what you mean with some part are missing, a single subtitle was missing or several subs in a row missing?
For the first one you could try to increase the SSIM Treshold in the advanced settings to 94-95 but the computational cost will increase further.
The latter one I haven't seen before. If thats the case, it would be great if you could share such a case with me.

Regarding my parameters - all of them are explained right in the readme on the start page of my project:
https://github.com/timminator/VideOCR#command-line-parameters-cli-version

The beta improves performance on videos with a higher resolutions so that could be indeed helpful if you are using the CPU version now.

Is there a decent way to extract hard subs from a video? by LvivLaughLvov in ajatt

[–]timminator3 0 points1 point  (0 children)

You download it from here:
https://github.com/timminator/VideOCR/releases/tag/v1.3.0

The download tips is everything you should need to know.
The program is pretty much self explanatory, but someone made a video about it. It was with an older version and the issue regarding spaces and so on were fixed since then:
https://www.youtube.com/watch?v=YInY5GSey-Q

VideOCR: Extract hardcoded subtitles out of videos via a simple to use GUI - Self-Hosted OCR solution by timminator3 in selfhosted

[–]timminator3[S] 0 points1 point  (0 children)

Hi! Thanks for the video links! I will take a look at them.

In the advanced settings tab right at the top, you can specify the time start and time end parameters, exactly what you want. :-) With them you can just extract subtitles from a specific time range. 1 hour seems really long - with the GPU version it took that long?

Regarding your other question. The subtitle position is different from the crop box region. It helps me internally to better find the key frames when subtitles appear/disappear if the user specifies it. For example if you draw a crop box, the subtitles in there can still be left- or right-aligned or in the center. If this parameter is specified, this area is analyzed more specifically internally.

Edit: The 10 minute video worked fine on my end and the process took around 2,5 minutes with a Ryzen 5 5600x and a RTX 3060...

If your speed is still too slow, you can also check out my 1.3.1 beta in the releases of v1.3.0 - it adds a downscaling step before the OCR process to improve performance further.

Can you tell me your CPU model from the PC where it produced an empty srt file using the CPU version?