Page 1 of 1

Processing makemkvcon stdout

Posted: Mon Sep 23, 2024 11:32 pm
by darqman
I'm writing a Windows dialog app for my Nimbi changer that shells makemkvcon64.exe and will process the stack of discs loaded in the changer. I'm getting closer to it working. I'm hoping someone can help me with a few questions. I found the apdef.h header file and converted it to C#. I figured out all the CINFO, TINFO and SINFO codes and have all those lines parsing into model classes (Disc, Video, Title, Audio, Subtitle). However, there are some codes/id's I can't find in apdef.h, or figure out what they are. Specifically, related to the MSG and PRGx lines.

Code: Select all

PRGV:0,0,65536
PRGV:0,0,65536
PRGV:730,0,65536
PRGV:730,730,65536
PRGV:857,730,65536
PRGV:857,858,65536
I assume the sub index 0 part of these lines (after splitting on comma and removing PRGV:) is the current progress, and the sub index part 2 is the max progress. My progress bar is working using only those two parts (0 and 2). I can't figure out what sub index part 1 is used for?

MSG lines are the same issue:

Code: Select all

MSG:3307,16777216,2,"File 00381.m2ts was added as title #18","File %1 was added as title #%2","00381.m2ts","18"
MSG:3025,0,3,"Title #00384.m2ts has length of 5 seconds which is less than minimum title length of 120 seconds and was therefore skipped","Title #%1 has length of %2 seconds which is less than minimum title length of %3 seconds and was therefore skipped","00384.m2ts","5","120"
The MSG lines have a lot of unidentified codes, 3307, 16777216, and there are many others I can't find in apdef.h. Obviously, I could just print the string in my UI after formatting it, but I'm curious if these might be documented somewhere? I'd like to know if they indicate warnings, errors or some other types of message?

I love the program btw. Having the ability to batch rip my collection is going to be well worth the time investment.

Thanks!

Re: Processing makemkvcon stdout

Posted: Tue Sep 24, 2024 3:53 am
by segfaulted
Someone wrote a manpage that describes the general structure of the output. See viewtopic.php?f=3&t=24349&p=104093

PRGV:
arg0 = current file's progress (first progress bar)
arg1 = total progress (second progress bar)
arg2 = max value

MSG:
arg0 = message id
arg1 = message flag (corresponds to AP_UIMSG_xxx but doesn't seem to be fully documented in apdefs.h)
arg2 = parameter count (if you want to format the string yourself)
arg3 = pre-formatted string ready for display
arg4 = format string
arg### = parameters for format string, arg2 specifies how many

Re: Processing makemkvcon stdout

Posted: Tue Sep 24, 2024 4:33 am
by darqman
That does help. Especially about the second progress bar. It makes sense now.

Do you happen to know if there are any makemkvcon command line switches to select audio tracks and subtitles. Or is using a profile the only way?

Thanks.

Re: Processing makemkvcon stdout

Posted: Tue Sep 24, 2024 5:25 am
by segfaulted
I'm not aware of any command line options to select tracks. Profiles would be the way to go.