[RESOLVED] Indexer Exit Codes
[RESOLVED] Indexer Exit Codes
I noticed that when an index cannot be created because the license is invalid with DGIndexNV/DGindexIM that the exit code is 0.
0 is also the exit code when everything is fine.
I am not sure what exit code will be returned for other error cases (hard disk full, video cannot be indexed, ...) as I have not tested that.
Is it possible to only return 0 when the index has been created successfully and in all other cases something else (e.g. specific to the error or always the same number)?
Otherwise I will implement a workaround in MeGUI so that a missing index file is detected as a failure but I am not sure if an abort due to insufficient hard disk space can be detected that way.
Thanks in advance for your advise!
0 is also the exit code when everything is fine.
I am not sure what exit code will be returned for other error cases (hard disk full, video cannot be indexed, ...) as I have not tested that.
Is it possible to only return 0 when the index has been created successfully and in all other cases something else (e.g. specific to the error or always the same number)?
Otherwise I will implement a workaround in MeGUI so that a missing index file is detected as a failure but I am not sure if an abort due to insufficient hard disk space can be detected that way.
Thanks in advance for your advise!
Re: Indexer Exit Codes
Sure, no problem. Give me a few days.
Re: Indexer Exit Codes
Great! Thank you very much and take your time.
Re: Indexer Exit Codes
Here's something to test:
http://rationalqm.us/misc/zathor.zip
The MKV framerate issue should be solved. For the CLI error stuff I have implemented a return of 0 if everything goes OK, a return of 1 if the input file is not found, and a return of 2 for a bad license. I haven't done anything for a failure to make the DGI file as it is not so easy with my architecture. If I find a way to do it without too much hassle I will add it.
Please advise your test results.
http://rationalqm.us/misc/zathor.zip
The MKV framerate issue should be solved. For the CLI error stuff I have implemented a return of 0 if everything goes OK, a return of 1 if the input file is not found, and a return of 2 for a bad license. I haven't done anything for a failure to make the DGI file as it is not so easy with my architecture. If I find a way to do it without too much hassle I will add it.
Please advise your test results.
Re: Indexer Exit Codes
Great, thank you very much!admin wrote:Here's something to test:
Yes, the sample is now detected as "FPS 239760 / 10000" which is more or less fine. Do you know why it is not written as "FPS 23976 / 1000"?admin wrote:The MKV framerate issue should be solved.
0 works as expectedadmin wrote:For the CLI error stuff I have implemented a return of 0 if everything goes OK, a return of 1 if the input file is not found, and a return of 2 for a bad license.
1 works as expected
2 is also thrown but now there is no popup anymore that the license is wrong or the file is not found. Is this intentional? Then I will create a popup that the license is bad. Or is it possible to write to the console (when started with the command line) a message like "ERROR: Invalid license"? (and then also a message for exit code 1).
EDIT: I am also looking forward for DGIndexIM but I assume you want to implement it first in NV and then add it to IM.
- Aleron Ives
- Posts: 126
- Joined: Fri May 31, 2013 8:36 pm
Re: Indexer Exit Codes
More importantly, shouldn't it be detected as 24000 / 1001, as that's the true framerate? 23.976 is an approximation, just as 29.970 is an approximation for 30000 / 1001 FPS.Zathor wrote:Yes, the sample is now detected as "FPS 239760 / 10000" which is more or less fine. Do you know why it is not written as "FPS 23976 / 1000"?
Re: Indexer Exit Codes
@Aleron
The frame DefaultDuration value specified in the MKV is 41708333 nanosec. That does not convert to the exact rate of 24000/1001. I could implement it such that a rate close enough to 24000/1001 is reported thusly, but I prefer to just give the approximation derived from the actual stream value and leave it at that. I doubt it is as important as you claim. Anyone that has a use case that is so sensitive can apply AssumeFPS(24000,1001) in the script. I'd be surprised if such a use case exists (i.e., where 23.9760 is not sufficiently precise).
@Zathor
Re: 239760/10000. That was just a choice of mine to allow for an extra decimal point of precision. In AVC we have these two numbers (fps_num and fps_den) in the stream. In MKV we have just the DefaultDuration and I have to invent fps_num and fps_den. Is it OK as is or do you need something specific?
Regarding the popup. I thought showing it was inconsistent with -h. I'll add a console error message.
Yes, first DGDecNV and then DGDecIM.
I'll slipstream it when you tell me it's OK.
The frame DefaultDuration value specified in the MKV is 41708333 nanosec. That does not convert to the exact rate of 24000/1001. I could implement it such that a rate close enough to 24000/1001 is reported thusly, but I prefer to just give the approximation derived from the actual stream value and leave it at that. I doubt it is as important as you claim. Anyone that has a use case that is so sensitive can apply AssumeFPS(24000,1001) in the script. I'd be surprised if such a use case exists (i.e., where 23.9760 is not sufficiently precise).
@Zathor
Re: 239760/10000. That was just a choice of mine to allow for an extra decimal point of precision. In AVC we have these two numbers (fps_num and fps_den) in the stream. In MKV we have just the DefaultDuration and I have to invent fps_num and fps_den. Is it OK as is or do you need something specific?
Regarding the popup. I thought showing it was inconsistent with -h. I'll add a console error message.
Yes, first DGDecNV and then DGDecIM.
I'll slipstream it when you tell me it's OK.
- Aleron Ives
- Posts: 126
- Joined: Fri May 31, 2013 8:36 pm
Re: Indexer Exit Codes
Ah, if it's a limitation of MKV, then I agree it isn't your problem to deal with.
Re: Indexer Exit Codes
This is ok. It is only for the edge cases where the container has a different FPS than the stream and this should not happen so often. Precision should be fine. For 200.000 frames you have a difference of 8ms and I doubt that this will be noticed at all.admin wrote:Re: 239760/10000. That was just a choice of mine to allow for an extra decimal point of precision. In AVC we have these two numbers (fps_num and fps_den) in the stream. In MKV we have just the DefaultDuration and I have to invent fps_num and fps_den. Is it OK as is or do you need something specific?
Yes, I agree that a popup should not appear when startet from the CLI. Looking forward to the console error messageadmin wrote:Regarding the popup. I thought showing it was inconsistent with -h. I'll add a console error message.
Re: Indexer Exit Codes
Thank you for your comments, Aleron and Zathor.
I have slipstreamed the changes for DGIndexNV.
Moving on to DGDecIM...
I have slipstreamed the changes for DGIndexNV.
Moving on to DGDecIM...
Re: Indexer Exit Codes
@Zathor
Here are the revised DGIndexIM builds. Please test them. When I get your OK I will slipstream them.
http://rationalqm.us/misc/zathor_im.zip
Here are the revised DGIndexIM builds. Please test them. When I get your OK I will slipstream them.
http://rationalqm.us/misc/zathor_im.zip
Re: Indexer Exit Codes
I went ahead and slipstreamed them.
Re: [RESOLVED] Indexer Exit Codes
Sorry, I was away over the weekend. Thank you very much!