Error output in txt file

Questions and answers on how to get the most out of FFAStrans
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: Error output in txt file

Post 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%
emcodem, wrapping since 2009 you got the rhyme?
Larsdp
Posts: 14
Joined: Tue Dec 10, 2019 6:00 pm

Re: Error output in txt file

Post 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 :-)
Larsdp
Posts: 14
Joined: Tue Dec 10, 2019 6:00 pm

Re: Error output in txt file

Post 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
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: Error output in txt file

Post by emcodem »

should be as easy as

"%s_v_codec%" = "mp4"

no?
emcodem, wrapping since 2009 you got the rhyme?
Larsdp
Posts: 14
Joined: Tue Dec 10, 2019 6:00 pm

Re: Error output in txt file

Post 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
Attachments
emcodem_custom_error.json
(7.55 KiB) Downloaded 227 times
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: Error output in txt file

Post 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"
emcodem, wrapping since 2009 you got the rhyme?
Larsdp
Posts: 14
Joined: Tue Dec 10, 2019 6:00 pm

Re: Error output in txt file

Post 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.
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: Error output in txt file

Post 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..
emcodem, wrapping since 2009 you got the rhyme?
Larsdp
Posts: 14
Joined: Tue Dec 10, 2019 6:00 pm

Re: Error output in txt file

Post 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?
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: Error output in txt file

Post 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%"
emcodem, wrapping since 2009 you got the rhyme?
Post Reply