Skip to main content

rapid_videocr Package

PyPI SemVer2.0

1. Install package by pypi.

pip install rapid_videocr

2. Run by script.

  • RapidVideOCR API

    # __init__
    Args:
       is_concat_rec (bool, optional): Whether to single recognition. Defaults to False.
       concat_batch (int, optional): The batch of concating image nums in concat recognition mode. Defaults to 10.
       out_format (str, optional): Output format of subtitle(srt, txt, all). Defaults to 'all'.
       is_print_console (bool, optional): Whether to print the subtitle results to console. 1 means to print results to console. Default is 0.
    
    # __call__
    Args:
         video_sub_finder_dir (Union[str, Path]): RGBImages or TXTImages from VideoSubFinder app.
         save_dir (Union[str, Path]): The directory of saving the srt/txt file.
    
    Raises:
        RapidVideOCRError: meet some error.
    
  • Example:

    from rapid_videocr import RapidVideOCR
    
    extractor = RapidVideOCR(is_concat_rec=True,
                             concat_batch=10,
                             out_format='srt')
    
    rgb_dir = 'RGBImages'
    save_dir = 'result'
    extractor(video_sub_finder_dir=rgb_dir, save_dir=save_dir)
    

3. Run by command line.

  • Usage:
    $ rapid_videocr -h
    usage: rapid_videocr [-h] -i IMG_DIR [-s SAVE_DIR] [-o {srt,txt,all}]
                        [-m {single,concat}] [-b CONCAT_BATCH] [-p {0,1}]
    
    optional arguments:
    -h, --help            show this help message and exit
    -i IMG_DIR, --img_dir IMG_DIR
                            The full path of RGBImages or TXTImages.
    -s SAVE_DIR, --save_dir SAVE_DIR
                            The path of saving the recognition result. Default is
                            "results" under the current directory.
    -o {srt,txt,all}, --out_format {srt,txt,all}
                            Output file format. Default is "all".
    -m {single,concat}, --mode {single,concat}
                            Which mode to run (concat recognition or single
                            recognition). Default is "single".
    -b CONCAT_BATCH, --concat_batch CONCAT_BATCH
                            The batch of concating image nums in concat
                            recognition mode. Default is 10.
    -p {0,1}, --print_console {0,1}
                            Whether to print the subtitle results to console. 1
                            means to print results to console. Default is 0.
    
  • Example:
    $ rapid_videocr -i RGBImages -s Results -o srt -m concat -b 10 -p 1
    

See details for RapidVideOCR.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rapid_videocr-2.1.7-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file rapid_videocr-2.1.7-py3-none-any.whl.

File metadata

  • Download URL: rapid_videocr-2.1.7-py3-none-any.whl
  • Upload date:
  • Size: 12.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for rapid_videocr-2.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 d9563e4ddea582e31ad79a686e0ef04ab33d3f8d47685285f2409f6a1f7bdf00
MD5 5a4be7c9672680b2d4c133aff47a70a0
BLAKE2b-256 bd68a984b760de42a365a5e9d80d2965e702e248a60001f42f0796022d5c66aa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page