Processing makemkvcon stdout

Discussion of advanced MakeMKV functionality, expert mode, conversion profiles
Post Reply
darqman
Posts: 4
Joined: Sun Jan 07, 2024 4:08 pm

Processing makemkvcon stdout

Post 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!
segfaulted
Posts: 79
Joined: Mon May 06, 2024 11:10 am

Re: Processing makemkvcon stdout

Post 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
darqman
Posts: 4
Joined: Sun Jan 07, 2024 4:08 pm

Re: Processing makemkvcon stdout

Post 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.
segfaulted
Posts: 79
Joined: Mon May 06, 2024 11:10 am

Re: Processing makemkvcon stdout

Post by segfaulted »

I'm not aware of any command line options to select tracks. Profiles would be the way to go.
Post Reply