Sometimes title changes between HandBrake versions for same discs?

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
zak
Posts: 20
Joined: Tue Jun 02, 2009 5:33 pm

Sometimes title changes between HandBrake versions for same discs?

Post by zak »

I scripted some of my encoding processes using HandBrakeCLI and recently noticed that when re-encoding a disc I already encoded before, the title I used that time changed in the latest HandBrake version. I needed to re-scan the disc, find out the new title and use the new one instead. (I think it was version 1.4.2 back then, now it's version 1.5.1.)

I assume this is just the result of some internal code changes between HandBrake versions.

Can you give an estimation if the titles will change in future versions again?
Deleted User 11865

Re: Sometimes title changes between HandBrake versions for same discs?

Post by Deleted User 11865 »

If it's a Blu-ray, yes, unfortunately.
zak
Posts: 20
Joined: Tue Jun 02, 2009 5:33 pm

Re: Sometimes title changes between HandBrake versions for same discs?

Post by zak »

Yes, it's a blu-ray.

Too bad, but thanks for the confirmation.
DrXenos
Bright Spark User
Posts: 278
Joined: Sat Mar 16, 2013 1:19 pm

Re: Sometimes title changes between HandBrake versions for same discs?

Post by DrXenos »

This is what I do (if you care). My scripts are impervious to changes in HandBrake's title numbers, because they don't use them. The scripts use the Blu-ray's mpls title numbers (which never change). When the script runs, the scripting engine will automatically scan the disc with HB and create a mapping between the disc's mpls titles and HB's titles. Then, when it building the arguments to call HB, the engine converts the mpls to the matching title number that HB wants. It does the same thing when it needs to call other tools that have their own numbering system, like MakeMkV.

Help this helps.
Deleted User 11865

Re: Sometimes title changes between HandBrake versions for same discs?

Post by Deleted User 11865 »

Although for this to work, you need to scan the whole disc each time (because, what actually happens is, the title number corresponding to said playlist changes, mostly due to the minimum title duration, but also sometimes because of changes in libbluray and/or HandBrake's code using libbluray).
Deleted User 11865

Re: Sometimes title changes between HandBrake versions for same discs?

Post by Deleted User 11865 »

Although, in the case of a movie, provided you're not trying to encode an extra, you can usually just use the CLI's --main-feature option :-)
DrXenos
Bright Spark User
Posts: 278
Joined: Sat Mar 16, 2013 1:19 pm

Re: Sometimes title changes between HandBrake versions for same discs?

Post by DrXenos »

Sure, I need to scan the disc each time I'm going to retranscode it, but so what? It's not like I'm going to be doing it over and over. Besides, the transcode time is magnitudes greater than the scan time. So, it a drop in the bucket.

Plus, my scripting engine is smart enough to cache the info while it's processing a script. If I am transcoding multiple titles from a disc, it only scans it once.
zak
Posts: 20
Joined: Tue Jun 02, 2009 5:33 pm

Re: Sometimes title changes between HandBrake versions for same discs?

Post by zak »

I wrote myself a script, too now. Luckily I found some old logfiles, so the script parses the logfile for the mpls that was encoded last time, then compares this with the new ones that need to be scanned again, yes.

Unfortunately then I discovered, there were different but identical mpls files used on some discs and during the new scan the other mpls file was detected. So all the mpls files need to be compared as well. Example: 00123.mpls maybe now 00321.mpls with the second scan, while both files are identical.

I don't rely on the main feature option because sometimes there are multiple titles with the same length but slight differences. It doesn't work for discs with multiple relevant titles as well.

Maybe there could be an option to provide an mpls title number to HandBrakeCLI in the future instead of the scanned title number. Or maybe HandBrake could just use the mpls title numbers for blu-rays directly? (Then duplicates need to be identified and maybe always the smaller number could be used.) But I don't know all the details of the format of course.
DrXenos
Bright Spark User
Posts: 278
Joined: Sat Mar 16, 2013 1:19 pm

Re: Sometimes title changes between HandBrake versions for same discs?

Post by DrXenos »

It's easier to tell HB to output JSON and parse that.
Deleted User 11865

Re: Sometimes title changes between HandBrake versions for same discs?

Post by Deleted User 11865 »

zak wrote: Wed Dec 07, 2022 8:31 am I don't rely on the main feature option because sometimes there are multiple titles with the same length but slight differences.
Whenever possible, HandBrake does parse the DVD and Blu-ray menu to find a playlist referenced by said menu and thus avoid picking a fake. It works reasonably well, although I am unsure whether Java-based Blu-ray menus are supported by this feature or not.
Post Reply