{"id":29655900,"url":"https://github.com/cpluspatch/tesseract","last_synced_at":"2025-07-22T08:07:13.253Z","repository":{"id":301651199,"uuid":"1009921795","full_name":"CPlusPatch/tesseract","owner":"CPlusPatch","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-28T01:17:45.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-28T02:19:05.039Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CPlusPatch.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-28T01:02:11.000Z","updated_at":"2025-06-28T01:17:49.000Z","dependencies_parsed_at":"2025-06-28T02:19:07.297Z","dependency_job_id":"81f95a57-f528-4d25-b8ee-9f874a766bd5","html_url":"https://github.com/CPlusPatch/tesseract","commit_stats":null,"previous_names":["cpluspatch/tesseract"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CPlusPatch/tesseract","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CPlusPatch%2Ftesseract","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CPlusPatch%2Ftesseract/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CPlusPatch%2Ftesseract/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CPlusPatch%2Ftesseract/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CPlusPatch","download_url":"https://codeload.github.com/CPlusPatch/tesseract/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CPlusPatch%2Ftesseract/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266455381,"owners_count":23931360,"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":[],"created_at":"2025-07-22T08:07:12.594Z","updated_at":"2025-07-22T08:07:13.241Z","avatar_url":"https://github.com/CPlusPatch.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tesseract\n\nA video analysis tool for detecting cuts by analyzing black bar changes in videos.\n\n## Requirements\n\n- Python 3.12 or higher\n- OpenCV\n- NumPy\n\n## Installation\n\n```bash\npip install -e .\n\n# Or, with Nix:\nnix run github:CPlusPatch/tesseract -- video.mp4\n```\n\n## Usage\n\n### Command Line\n\n```bash\n# Basic usage with progress bar\ntesseract path/to/video.mp4 --verbose --output-json results.json\n\n# Disable progress bar for scripting\ntesseract path/to/video.mp4 --no-progress --output-json results.json\n\n# Split video into segments at detected cuts\ntesseract path/to/video.mp4 --split-output ./output_segments --verbose\n```\n\n### Python API\n\n```python\nfrom tesseract import (\n    BlackBarDetector, \n    analyze_video, \n    analyze_and_split_video,\n    split_video_by_cuts,\n    VideoAnalysisProgress\n)\n\n# Basic usage with automatic progress bar\ndetector = BlackBarDetector(black_threshold=10, min_bar_size=10)\ncuts = analyze_video(\"video.mp4\", detector)\n\n# Disable progress bar\ncuts = analyze_video(\"video.mp4\", detector, show_progress=False)\n\n# Analyze and split video in one step\ncuts, segment_files = analyze_and_split_video(\n    \"video.mp4\", detector, output_dir=\"./segments\"\n)\n\n# Split existing cuts into video segments\nsegment_files = split_video_by_cuts(\n    \"video.mp4\", cuts, output_dir=\"./segments\"\n)\n\n# Manual progress bar usage\nwith VideoAnalysisProgress(total_frames, show_progress=True) as progress:\n    progress.start(\"Custom analysis\")\n    # ... your analysis code ...\n    progress.update(current_frame)\n\nfor cut in cuts:\n    print(f\"Cut at {cut.timestamp}s (frame {cut.frame_number})\")\n\nfor segment in segment_files:\n    print(f\"Created segment: {segment}\")\n```\n\n## Options\n\n- `--black-threshold`: Maximum pixel value considered black (default: 30)\n- `--min-bar-size`: Minimum bar size in pixels (default: 10)\n- `--tolerance`: Tolerance for bar size changes (default: 5)\n- `--sample-rate`: Analyze every Nth frame (default: 1)\n- `--output-json`: Save results to JSON file\n- `--verbose`: Show detailed bar state information\n- `--no-progress`: Disable progress bar (useful for scripting)\n- `--split-output`: Directory to save split video segments (enables automatic video splitting)\n\n## Development\n\n```bash\n# Install in development mode with dev dependencies\npip install -e \".[dev]\"\n\n# Run all formatting and linting checks\npython dev.py\n\n# Fix formatting issues automatically\npython dev.py --fix\n```\n\n### Pre-commit Workflow\n\nBefore committing, run:\n```bash\npython dev.py --fix  # Fix formatting\npython dev.py        # Verify all checks pass\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcpluspatch%2Ftesseract","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcpluspatch%2Ftesseract","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcpluspatch%2Ftesseract/lists"}