def decorate_parser(api: Api, parser: argparse.ArgumentParser) -> None: parser.add_argument( "--start", help="where the sample should start", type=lambda value: Pts(api, value), default="a.s", ) parser.add_argument( "--end", help="where the sample should end", type=lambda value: Pts(api, value), default="a.e", ) parser.add_argument( "-p", "--path", help="path to save the sample to", type=lambda value: FancyPath(api, value), default="", ) parser.add_argument( "-i", "--include-subs", help='whether to "burn" subtitles into the video stream', action="store_true", ) parser.add_argument( "--crf", help="constant rate factor parameter for ffmpeg (default: 20)", type=int, default=20, )
def decorate_parser(api: Api, parser: argparse.ArgumentParser) -> None: parser.add_argument( "--pts", help="which frame to make screenshot of", type=lambda value: Pts(api, value), default="cf", ) parser.add_argument( "-p", "--path", help="path to save the screenshot to", type=lambda value: FancyPath(api, value), default="", ) parser.add_argument( "-i", "--include-subs", help='whether to "burn" the subtitles into the screenshot', action="store_true", ) parser.add_argument( "--width", help="width of the screenshot (by default, original video width)", type=int, ) parser.add_argument( "--height", help=( "height of the screenshot (by default, original video height)" ), type=int, ) parser.epilog = ("If only either of width or height is given, " "the command tries to maintain aspect ratio.")
def decorate_parser(api: Api, parser: argparse.ArgumentParser) -> None: parser.add_argument( "-p", "--path", help="path to load the subtitles from", type=lambda value: FancyPath(api, value), default="", )
def decorate_parser(api: Api, parser: argparse.ArgumentParser) -> None: parser.add_argument( "-s", "--start", help="start of the audio sample", type=lambda value: Pts(api, value), default="a.s", ) parser.add_argument( "-e", "--end", help="end of the audio sample", type=lambda value: Pts(api, value), default="a.e", ) parser.add_argument( "-p", "--path", help="path to save the sample to", type=lambda value: FancyPath(api, value), default="", )