Page 2 of 3

Re: Error output in txt file

Posted: Mon Jul 12, 2021 2:10 pm
by emcodem
Oh, ok... well this is from the very first test in the populate processor.

In the first line of your populate proc, make sure the left side of the : is empty instead of "%s_custom_error%
%i_width% = 720 ? "" : "Video Width error, actual width %i_width% | %s_custom_error%"

Alternatively, you can just initialize s_custom error at the very first line,
%s_custom_error% = ""
(empty line on the right)

Actually your whole list is upside down, to keep the order you'd need to move s_custom_error to the left of your error message:

OLD:
"Video Width error, actual width %i_width% | %s_custom_error%"

NEW:
%s_custom_error% | Video Width error, actual width %i_width%

Re: Error output in txt file

Posted: Tue Jul 13, 2021 9:22 am
by Larsdp
So i'm trying to understand the number vs string but can't get it right.

%s_v_codec% = mp4 ? "" : "%s_custom_error% | Video height error, actual codec %s_v_codec%"

above line outputs this: prores = mp4 ? "" : "

I'ved tried with all kinds of "" ways but cant get it to work. How is the correct syntax for strings?

Thanks :-)

Re: Error output in txt file

Posted: Tue Jul 13, 2021 9:50 am
by Larsdp
sorry just found the answer with '' not sure what they are called "%s_v_codec%" = 'mp4' ? "" :
everything works now....

No too fast doenst work hmm

Re: Error output in txt file

Posted: Tue Jul 13, 2021 10:43 am
by emcodem
should be as easy as

"%s_v_codec%" = "mp4"

no?

Re: Error output in txt file

Posted: Tue Jul 13, 2021 11:31 am
by Larsdp
No, not sure whats happening :-)

-Prores Check Status-

"prores" = "prores" ? "" : "
Video Width error, actual width 1920 should be 721
Video height error, actual heitgh 1080 should be 725
Codec error, actual codec prores should be prores

Re: Error output in txt file

Posted: Tue Jul 13, 2021 2:07 pm
by emcodem
Sorry for the delay

This is what you have:

Code: Select all

"%s_v_codec%" = "prores" ? "" : "%s_custom_error% | Codec error, actual codec %s_v_codec% should be prores
There is a " missing on the right side, this leads to unexpected behaviour.
I know quoting is hell but one gets used to it :D

This is correct:

Code: Select all

"%s_v_codec%" = "prores" ? "" : "%s_custom_error% | Codec error, actual codec %s_v_codec% should be prores"

Re: Error output in txt file

Posted: Wed Jul 14, 2021 6:48 am
by Larsdp
thanks it works, sort of :-) When inputting a mp4 file it show this:

Video Width error, actual width 512 should be 721
Video height error, actual heitgh 640 should be 725
Codec error, actual codec h264 should be prores


So thats working, the file is wrong on all parameters....but when i feed in a prores file 1920x1080 it succed the workflow, which doesnt make sense so its prores but rest is wrong. The prores is written by a mac if that makes any difference.

Re: Error output in txt file

Posted: Wed Jul 14, 2021 7:02 am
by emcodem
OK, in that case, you should debug and show the actual value of the variables you are testing against.

E.g. use a populate vars processor and set
%s_success% = "%i_width% %i_height% %s_v_codec%"

So you see the actual values in the status monitor..

Re: Error output in txt file

Posted: Wed Jul 14, 2021 7:33 am
by Larsdp
"1920 1080 prores" is the output in the Results window. Actually same story is i set it to h264 and test a h264 file it overrules the first two checks and just go to succeed so something is off with the way a positive is handled. I wish i was a programmer :-)

Hm maybe it has to do with the second conditional being filled with the latest "empty" succes string? So maybe some sort of more advancwed second conditional to catch all? Could that be an array of some sort?

Re: Error output in txt file

Posted: Wed Jul 14, 2021 7:48 am
by emcodem
Ah, in the last job.json you sent me, you did still "reset %s_custom_error% in every check in case the check was positive.
Make sure that on the left side of the : you have "%s_custom_error%"

Like so:

Code: Select all

%i_width% = 720  ? "%s_custom_error%" : "Video Width error, actual width %i_width% | %s_custom_error%"
With one exception, at the very first test, there you do this:

Code: Select all

%i_width% = 720  ? "" : "Video Width error, actual width %i_width% | %s_custom_error%"