CLI "Normal" preset and GUI "Normal" preset aren't the same

Discussion of the HandBrake command line interface (CLI)
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
Gooch
Posts: 19
Joined: Thu Nov 27, 2008 10:03 pm

CLI "Normal" preset and GUI "Normal" preset aren't the same

Post by Gooch »

I'm new to HandbrakeCLI and I wanted to compare the speed of the GUI version to the CLI version (both 0.9.4).

Using the "Normal" preset for both, I encoded a sample AVI with the GUI and then with the CLI. However, the resulting files were not identical as I expected. The M4V that the CLI encoded had an errant and empty chapter marker (which I don't want) and had a slightly different audio bitrate than the GUI version.

This is what I entered in the Terminal:
user$ handbrakecli -i /Users/user/movie.avi -o /Users/user/movie-CLI-normal.m4v --preset="Normal"
File sizes were as follows:

GUI-encoded movie ("Normal" preset): 46.1 MB
CLI-encoded movie ("Normal" preset): 45.8 MB

How do I stop the "Normal" preset in the CLI from creating the empty and unwanted chapter marker? And how do I ensure that the same presets in both the GUI and the CLI create identical files (without audio/video bitrate variations) when encoding the same file?
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Re: CLI "Normal" preset and GUI "Normal" preset aren't the same

Post by jbrjake »

And your logs are where?

Considering that the Normal preset is *supposed* to include chapter markers, I'm kind of confused about what your complaint is here...contrary to your thread title, the presets *are* the same. I would know. The Normal preset in the GUI quite definitely includes the line:

Code: Select all

     [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
User avatar
JohnAStebbins
HandBrake Team
Posts: 5722
Joined: Sat Feb 09, 2008 7:21 pm

Re: CLI "Normal" preset and GUI "Normal" preset aren't the same

Post by JohnAStebbins »

When the source only has one chapter, the ui's do this

Code: Select all

/* Chapter Markers*/
    /* If we have only one chapter or a title without chapters, set chapter markers to off */
    if ([fSrcChapterStartPopUp indexOfSelectedItem] ==  [fSrcChapterEndPopUp indexOfSelectedItem])
    {
        [queueFileJob setObject:[NSNumber numberWithInt:0] forKey:@"ChapterMarkers"];
    }
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Re: CLI "Normal" preset and GUI "Normal" preset aren't the same

Post by jbrjake »

Oh. I'm sorry, Gooch. My earlier response was entirely unwarranted and I apologize.

@John: I remember you guys had talked about it, but expected the change to be made in libhb...didn't realize anything had come of it since I primarily use the CLI

Shouldn't this be happening in libhb, though? It''s out of the user's hands, so it's not a decision that needs to be made in interface code, just displayed there...and it allows this kind of interface parity error :/
Gooch
Posts: 19
Joined: Thu Nov 27, 2008 10:03 pm

Re: CLI "Normal" preset and GUI "Normal" preset aren't the same

Post by Gooch »

jbrjake wrote:And your logs are where?

Considering that the Normal preset is *supposed* to include chapter markers, I'm kind of confused about what your complaint is here...contrary to your thread title, the presets *are* the same. I would know. The Normal preset in the GUI quite definitely includes the line:

Code: Select all

     [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
In the 0.9.3 GUI, chapter markers were on by default in the MP4 presets, even if the input file had no chapters. So, you would have to toggle the chapter marker off before encoding if you didn't want an empty chapter in your output file. This was fixed (thankfully) in the 0.9.4 GUI. However, the behaviour remains in the 0.9.4 CLI.

I found a workaround. I listed the presets in 0.9.4 CLI and examined the Normal preset for the offending chapter option:
Normal: -e x264 -q 20.0 -a 1 -E faac -B 160 -6 dpl2 -R 48 -D 0.0 -f mp4 --strict-anamorphic -m -x ref=2:bframes=2:subme=6:mixed-refs=0:weightb=0:8x8dct=0:trellis=0
I removed the "-m" and after that the output files no longer have the stray empty chapter. Can or should this be fixed in the CLI preset?
Gooch
Posts: 19
Joined: Thu Nov 27, 2008 10:03 pm

Re: CLI "Normal" preset and GUI "Normal" preset aren't the same

Post by Gooch »

jbrjake wrote:Oh. I'm sorry, Gooch. My earlier response was entirely unwarranted and I apologize.
No worries, jbrjake.
User avatar
JohnAStebbins
HandBrake Team
Posts: 5722
Joined: Sat Feb 09, 2008 7:21 pm

Re: CLI "Normal" preset and GUI "Normal" preset aren't the same

Post by JohnAStebbins »

jbrjake wrote:Shouldn't this be happening in libhb, though? It''s out of the user's hands, so it's not a decision that needs to be made in interface code, just displayed there...and it allows this kind of interface parity error :/
Yes, it should be in libhb as well. The ui's should continue to do what they are doing as well to show the user what will be happening.
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Re: CLI "Normal" preset and GUI "Normal" preset aren't the same

Post by jbrjake »

Gooch
Posts: 19
Joined: Thu Nov 27, 2008 10:03 pm

Re: CLI "Normal" preset and GUI "Normal" preset aren't the same

Post by Gooch »

Awesome. And thank you.
Post Reply