Handbrake title scan

Archive of historical development discussions
Discussions / Development has moved to GitHub
Forum rules
*******************************
Please be aware we are now using GitHub for issue tracking and feature requests.
- This section of the forum is now closed to new topics.

*******************************
Post Reply
locutus24
Posts: 3
Joined: Thu Jun 15, 2017 8:06 pm

Handbrake title scan

Post by locutus24 »

New person here trying to work with the Handbrake source code to alter the folder scan function. Was looking for information on whether it would be possible for me to alter the folder scan to go deeper, I have downloaded the source code, and been reading through it just having a hard time determining where the folder scan resides at. I have multiple folders that have been organized, and can't be condensed into one folder.

So because of the multiple folders just trying to find information about the folder scan, and whether it would be possible specify a single root folder with Handbrake parsing through either a txt file I created or just crawling through each directory. I would appreciate any assistance with where in the Handbrake source the primary folder scan function resides for me to look at.
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: Handbrake title scan

Post by mduell »

You haven't specified a platform...
locutus24
Posts: 3
Joined: Thu Jun 15, 2017 8:06 pm

Re: Handbrake title scan

Post by locutus24 »

Well working on Windows with CLI as I figured it would be easier to implement, but if Linux would make for an easier option I could work with that as well.
Initially from within Windows using the Handbrake CLI was going to write a script to feed to Handbrake, but not sure if that would be able to accomplish what I am after. I just haven't been able to find anything on Google or otherwise that explains how to do a multi-level folder scan because I see from the Handbrake GUI how you can add multiple titles to the Q I just don't know how best to get Handbrake to scan through multiple source folders.
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: Handbrake title scan

Post by mduell »

If you're using the CLI, you can just use a simple batch script to recurse, no need to modify HB.
User avatar
JohnAStebbins
HandBrake Team
Posts: 5712
Joined: Sat Feb 09, 2008 7:21 pm

Re: Handbrake title scan

Post by JohnAStebbins »

The code you are looking for is in libhb/batch.c. But if you are thinking on submitting a patch to extend it to dive into subdirectories, think it through carefully. I omitted that "feature" for a reason when I originally wrote batch processing. DVD and BD rips are directories. If you recurse into those directories, you are going to get a collection of individual vob and m2ts files as titles which is not what most people would want. Batching up multiple DVD and BD rips was not the intended purpose of batch.c and adding that capability has a lot of pit-falls (not to mention UI design issues).

My suggestion if you are going to try to submit back up stream is that you detect directories that appear to be DVD or BD and just skip them.
locutus24
Posts: 3
Joined: Thu Jun 15, 2017 8:06 pm

Re: Handbrake title scan

Post by locutus24 »

Well I certainly appreciate all the input, and will go back to square to give this more thought though it looks for now I will have to manually select each folder because recursion would seem to have more issues than it is worth. Perhaps a script will be the best way ahead for this when I find more time.

Not sure if there is a way to close this out, not looking for any additional input at this time.
Post Reply