Skip to content

高级教程中extract+ocr部分在3.1.1版本无法正常使用 #93

Description

@SWHL

高级教程中extract+ocr部分在3.1.1版本无法正常使用
需要手动定义vsf_input_params和ocr_input_params

from rapid_videocr import RapidVideoSubFinderOCR,  RapidVideOCRInput
from rapid_videocr.vsf_cli import VideoSubFinderInput

vsf_exe = "VideoSubFinder_6.10_x64\Release_x64\VideoSubFinderWXW.exe"

vsf_input_params = VideoSubFinderInput(
    vsf_exe_path=vsf_exe,
    use_cuda=True,
    open_video_opencv= False,
    open_video_ffmpeg= True,
    top_video_image_percent_end=0.5,   # -te
    bottom_video_image_percent_end=0.0,  # -be
    left_video_image_percent_end=0.0,  # -le
    right_video_image_percent_end=0.0,  # -re
)


ocr_input_params = RapidVideOCRInput(
    is_batch_rec=True,
    batch_size=10,
    out_format="srt",
    ocr_params=None,
)

extractor = RapidVideoSubFinderOCR(vsf_input_params, ocr_input_params)

Originally posted by @altar0918 in #92 (comment)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions