The -m flag in HandBrakeCLI

Support for HandBrake on Linux, Solaris, and other Unix-like platforms
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
cjr
Posts: 7
Joined: Tue Dec 18, 2007 3:29 pm

The -m flag in HandBrakeCLI

Post by cjr »

It looks like the -m flag takes an undocumented optional argument of a CSV file listing the chapter titles.

However, calling HandBrakeCLI with -m foo.csv doesn't cause foo.csv to get read (testing the 0.9.1 code on a Linux box running Centos 4). This appears to be because optarg is set to NULL when executing the case 'm' block.

A simple workaround that helped me was changing the string passed to getopt_long() to "[...]m:a[...]" instead of "[...]ma[...]". I suspect a more correct change would be to look at optind instead, but I'm not familiar with getopt() to see how.
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Post by jbrjake »

...or just use the latest source code, which already has this fixed.
cjr
Posts: 7
Joined: Tue Dec 18, 2007 3:29 pm

Post by cjr »

jbrjake wrote:...or just use the latest source code, which already has this fixed.
Ah, so it is :-)

The program's help text could still do with an update to mention this feature.
Post Reply