prep multi
This commit is contained in:
13
bin/ffx.py
13
bin/ffx.py
@@ -10,6 +10,7 @@ DEFAULT_QUALITY = 23
|
||||
|
||||
DEFAULT_AV1_PRESET = 5
|
||||
|
||||
DEFAULT_LABEL='output'
|
||||
DEFAULT_FILE_SUFFIX = 'webm'
|
||||
|
||||
DEFAULT_STEREO_BANDWIDTH = "128"
|
||||
@@ -263,7 +264,9 @@ def streams(filename):
|
||||
|
||||
@ffx.command()
|
||||
@click.pass_context
|
||||
@click.argument('args', nargs=-1)
|
||||
@click.argument('paths', nargs=-1)
|
||||
|
||||
@click.option('-l', '--label', type=str, default=DEFAULT_LABEL, help='Label to be used as filename prefix')
|
||||
|
||||
@click.option('-ve', '--video-encoder', type=str, default=DEFAULT_VIDEO_ENCODER, help='Target video encoder (vp9 or av1) default: vp9')
|
||||
|
||||
@@ -283,18 +286,18 @@ def streams(filename):
|
||||
@click.option("-d", "--denoise", is_flag=True, default=False)
|
||||
|
||||
|
||||
def convert(ctx, args, video_encoder, quality, preset, stereo_bitrate, ac3_bitrate, dts_bitrate, crop, clear_metadata, default_subtitle, default_audio, denoise):
|
||||
def convert(ctx, paths, label, video_encoder, quality, preset, stereo_bitrate, ac3_bitrate, dts_bitrate, crop, clear_metadata, default_subtitle, default_audio, denoise):
|
||||
|
||||
startTime = time.perf_counter()
|
||||
|
||||
if len(args) != 2:
|
||||
if len(paths) != 2:
|
||||
raise click.BadArgumentUsage(
|
||||
'Exactly 2 arguments containing the source file path and target file name must be provided\n'
|
||||
'Usage: ffx convert source_path target_filename'
|
||||
)
|
||||
|
||||
sourcePath = args[0]
|
||||
targetFilename = args[1]
|
||||
sourcePath = paths[0]
|
||||
targetFilename = paths[1]
|
||||
|
||||
if not os.path.isfile(sourcePath):
|
||||
raise click.ClickException(f"There is no file with path {sourcePath}")
|
||||
|
||||
Reference in New Issue
Block a user