Commit b0581ef2 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

debug globbing issue with new scaling cmd

parent cbc4e52c
Loading
Loading
Loading
Loading
+21 −14
Original line number Diff line number Diff line
@@ -97,7 +97,8 @@ def process_output_file(outfile, infile, format, input_loudness, input_loudness_
        rend = "./IVAS_rend"
        if platform.system() == "Windows":
            rend = ".\\IVAS_rend.exe"
        scale_cmd = [
        scale_cmd = " ".join(
            [
                rend,
                "-i",
                str(outfile),
@@ -108,8 +109,11 @@ def process_output_file(outfile, infile, format, input_loudness, input_loudness_
                "-g",
                str(scale_factor),
                "-o",
            str(outfile.with_suffix(f"scaled_{scale_factor:3.2f}_{outfile.suffix}")),
                str(
                    outfile.with_stem(f"{outfile.stem}_scaled_{scale_factor:3.2f}")
                ),
            ]
        )

        return {
            "infile": infile.name,
@@ -141,7 +145,7 @@ def main(args):
    }

    # mono and stereo are only accepted as lowercase for runIvasCodec.py modes
    # multichannel modes must be prefixed with "MC_"
    # multichannel modes are prefixed with "MC_" for filtering, but without the prefix elsewhere
    # further, MASA1_TC and MASA_2TC are accepted, but the config.json contains them without the underscore
    # so patch everything for compatibility
    replacements = {
@@ -199,6 +203,9 @@ def main(args):
            if f.stem.startswith(infile.stem)
        ]

        print(f"Directory {output_folder}")
        print(f"Found output files {' '.join([str(f) for f in output_files])}")

        for outfile in output_files:
            tasks.append(
                (outfile, infile, format, input_loudness, input_loudness_format)