rigaya / NVEnc

NVENCによる高速エンコードの性能実験
https://rigaya34589.blog.fc2.com/blog-category-17.html
Other
1.09k stars 114 forks source link

Please apply syntax changes for --sub-source to --sub-burn #509

Closed Shanghai-Tom closed 1 year ago

Shanghai-Tom commented 1 year ago

Please apply recent syntax changes for --sub-source to --sub-burn, or an alternate parsing fix

( self compiled version: NVEnc (x64) 7.25 (r2543) by rigaya, May 14 2023 16:06:56 (gcc 11.3.0/Linux)

If the filename has a ',' in the name, then the filename is parsed as two pieces and the command fails

parameter --vpp-subburn filename="./S01E05 - Here Today, Gone To-Marrow.for.srt",charcode=utf-8 ^

shows error message "subburn: subtitle file " Gone To-Marrow.for.srt" does not exist" ^

T.I.A Tom.

rigaya commented 1 year ago

Actually, we can still work with current parser by using escapes, below shall work with current command line parser. (--sub-source had different type of parser, which required fix and syntax change for another reason)

nvencc -i input -o output "--vpp-subburn filename=\"./S01E05 - Here Today, Gone To-Marrow.for.srt\",charcode=utf-8"
Shanghai-Tom commented 1 year ago

Thank you, I will amend my scripts to apply the escapes.

Shanghai-Tom commented 1 year ago

I used the escape syntax and now nvencc exits with return code 1 but no error messages even when I specify --log-level debug as one of the first options.

--vpp-subburn filename=\"./S01E05 - Here Today, Gone To-Marrow.for.srt\",charcode=utf-8

This is on Linux, not windows, perhaps there is an issue with \ because on a linux command line the \ escapes the next character , in this case the \ should be \\ I tried this --vpp-subburn filename=\\"./S01E05 - Here Today, Gone To-Marrow.for.srt\\",charcode=utf-8 ^ ^

and I have the different result subburn: subtitle file " Gone To-Marrow.for.srt\" does not exist ^

Using this escape option is not functioning under linux

rigaya commented 1 year ago

I have tested on WSL2, so should work fine...

Have you surrounded the whole --vpp-subburn paramter with double quotation?

nvencc -i in -o out "--vpp-subburn filename=\"./S01E05 - Here Today, Gone To-Marrow.for.srt\",charcode=utf-8"
                    ^                                                                                       ^
Shanghai-Tom commented 1 year ago

I had too many " and ' for the shell to interpret correctly, it did not pass the correct syntax, I have corrected it to:

"--vpp-subburn filename=\"./S01E05 - Here Today, Gone To-Marrow.for.srt\",charcode=utf-8" ^ ^

to match your example, but now receive error:

Error: Unknown option: --vpp-subburn filename="./S01E05 - Here Today, Gone To-Marrow.for.srt",charcode=utf-8

Did you mean option(s) below? --vpp-subburn --vpp-deinterlace

-vpp-subburn is the option , and the parameter to it is "filename=\"./S01E05 - Here Today, Gone To-Marrow.for.srt\",charcode=utf-8"

--vpp-subburn "filename=\"./S01E05 - Here Today, Gone To-Marrow.for.srt\",charcode=utf-8" ^ ^

Console output indicates: subburn: ./S01E05 - Here Today, Gone To-Marrow.for.srt, scale x1.00

Thank you for your assistance :-), character escaping can be fun, hah hah. I am closing this ticket now.

Regards, Tom.