{"id":13988807,"url":"https://github.com/krviolent/subtitles_extract","last_synced_at":"2025-07-22T09:31:37.279Z","repository":{"id":40364177,"uuid":"418808360","full_name":"krviolent/subtitles_extract","owner":"krviolent","description":"Tool for extraction hard-coded (hardsub) Chinese subtitles from video files with 720p resolution","archived":false,"fork":false,"pushed_at":"2022-05-12T18:32:36.000Z","size":18779,"stargazers_count":12,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-29T07:36:59.721Z","etag":null,"topics":["chinese","chinese-translation","easyocr","machine-learning","ocr","python","srt-subtitles","subtitles","video"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/krviolent.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-19T07:03:09.000Z","updated_at":"2024-07-23T22:03:38.000Z","dependencies_parsed_at":"2022-08-09T18:22:57.979Z","dependency_job_id":null,"html_url":"https://github.com/krviolent/subtitles_extract","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/krviolent/subtitles_extract","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krviolent%2Fsubtitles_extract","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krviolent%2Fsubtitles_extract/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krviolent%2Fsubtitles_extract/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krviolent%2Fsubtitles_extract/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krviolent","download_url":"https://codeload.github.com/krviolent/subtitles_extract/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krviolent%2Fsubtitles_extract/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266465086,"owners_count":23933062,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chinese","chinese-translation","easyocr","machine-learning","ocr","python","srt-subtitles","subtitles","video"],"created_at":"2024-08-09T13:01:22.293Z","updated_at":"2025-07-22T09:31:32.257Z","avatar_url":"https://github.com/krviolent.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# subtitles_extract\nTool for extraction hardcoded chinese subtitles from video files with 720p resolution (1280 × 720) based on [EasyOCR](https://github.com/JaidedAI/EasyOCR) tool by [JaidedAI](https://github.com/JaidedAI)\n\nInspride by [Entrepreneurial Age/创业时代 (2018)](https://www.imdb.com/title/tt9085276/)\n \n# Download:\n\tgit clone https://github.com/krviolent/subtitles_extract.git\n \tor tap Code -\u003e Download ZIP and extract\n# Install requirements:\nOS: Windows 10/WSL\nInstructions: [Enable and install WSL](https://www.windowscentral.com/install-windows-subsystem-linux-windows-10)\n\n\tInstall python3, ffmpeg, easyocr (https://github.com/JaidedAI/EasyOCR):\n\tsudo apt install python3\n\tsudo apt install ffmpeg\n\tgit clone https://github.com/JaidedAI/EasyOCR.git\n\tcd EasyOCR\n\tsudo python3 setup.py install\n\n# Use:\n\tTested on WSL Ubuntu 20.04. Meet some difficulties running CUDA on Windows to use GPU for OCR.\n\t\n\t\tbash scripts/run_extract_subs.sh [video.mp4] [episode_number] [duration_of_video_in_seconds] [frame_rate]\n\t\t[duration_of_video_in_seconds] - optional argument\n\t\t[frame_rate] = 1\n\tExample:\n\t\tbash scripts/run_extract_subs.sh video_ep34.mp4 34 2600\n\tDivide subs_file_[EP].txt into the timestamps.txt and textonly.txt:\n\t\tbash scripts/divide_timestamp_and_text.py [episode_number]\n\n# Steps to extract subtitles into the text file:\n\t1. crop.sh -\u003e frame_xx/*.jpg\n\t2. 2580 - 43 minites, 2600 - ok\n\t\tpython3 easyocr_test.py [episode_number] [duration_in_seconds]\n\t\tOutput files will saved in files:\n\t\t\tsubs/subs_file_[episode_number].txt\n\t\t\tsubs/EP.A.[episode_number]/subs_[episode_number].srt\n\t3. Auto-translate obtained subs using https://translatesubtitles.co/\n\t \n# Optional (replace names, for example):\n\tbash scripts/replace.sh\n\t\n\tcommand to replace A -\u003e B:\n\tsed -i -e 's/[A]/[B]/g' subs_file.srt\n\tThis might not work quite right.\n# Info\n\tDuplicated subs not removed during extraction, because same phrases might be repeated during video.\n\tAlso sometimes recognition accuracy is not sophisticated.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrviolent%2Fsubtitles_extract","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrviolent%2Fsubtitles_extract","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrviolent%2Fsubtitles_extract/lists"}