Av1an icon indicating copy to clipboard operation
Av1an copied to clipboard

Filename with single quote fail target quality with temp set to name with quote

Open luigi311 opened this issue 7 months ago • 1 comments

If you try to encode a video with a single quote in the name of it target vmaf will fail if you name the temp folder the same name with the quote. The following error along with the backtrace version

thread '<unnamed>' panicked at av1an-core/src/vmaf.rs:263:48:
called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

thread '<unnamed>' panicked at av1an-core/src/vmaf.rs:263:48:
called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }
stack backtrace:
   0: rust_begin_unwind
             at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/panicking.rs:597:5
   1: core::panicking::panic_fmt
             at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/panicking.rs:72:14
   2: core::result::unwrap_failed
             at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/result.rs:1652:5
   3: av1an_core::vmaf::read_vmaf_file
   4: av1an_core::vmaf::read_weighted_vmaf::inner
   5: av1an_core::target_quality::TargetQuality::per_shot_target_quality_routine
   6: av1an_core::broker::Broker::encoding_loop::{{closure}}::{{closure}}::{{closure}}
   7: core::ops::function::FnOnce::call_once{{vtable.shim}}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Running without target quality it encodes perfectly. Looking at the error it specifically points to a vmaf function.

luigi311 avatar Nov 30 '23 04:11 luigi311

looks like the error also happens if you dont specify a temp folder so it uses the generate one, if you have a quote in the output though when it runs the final vmaf calculation. So right now the only work around is to make sure the output doesnt have a quote in it because the final vmaf, --vmaf, seems to be force when using target_quality, see #790 and you dont specify a temp folder with a quote in it.

luigi311 avatar Nov 30 '23 05:11 luigi311