Target Directory = Source Directory?

HandBrake for Mac support
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
Frank
Novice
Posts: 64
Joined: Fri Apr 20, 2007 9:06 am

Target Directory = Source Directory?

Post by Frank »

Description of problem or question:
It's been a while since I've used Handbrake... I'm hoping there's a way to easily do this:

Background: I'm using Emby to record TS streams from a tuner. After I've cleaned the files up (commercial deletion), I'd like to get Handbrake to output a file (mkv/mp4 /whatnot) into the same directory as the source file. How would I go about doing this? Is this something possible with the GUI or are we in CLI land?

Operating system and version :
This will be with MacOS, probably 10.13, but 10.14/10.15 if necessary.
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: Target Directory = Source Directory?

Post by Woodstock »

If you're willing to take the risk of overwriting your source, you can use the macro {source_path} in your output files format.
User avatar
Ritsuka
HandBrake Team
Posts: 1650
Joined: Fri Jan 12, 2007 11:29 am

Re: Target Directory = Source Directory?

Post by Ritsuka »

It can't be done with the GUI on macOS.
Silent_Strider
Enlightened
Posts: 100
Joined: Tue Dec 17, 2019 9:31 pm

Re: Target Directory = Source Directory?

Post by Silent_Strider »

Is the program this different on Mac? Under Windows I always encode into the same directory, there will be a prefix added to the filename which can be configured.
Image
User avatar
Ritsuka
HandBrake Team
Posts: 1650
Joined: Fri Jan 12, 2007 11:29 am

Re: Target Directory = Source Directory?

Post by Ritsuka »

The Mac version runs under the macOS sandbox, so it can read and write only to the file and folders the user choose in the open panel or by drag & drop.
Frank
Novice
Posts: 64
Joined: Fri Apr 20, 2007 9:06 am

Re: Target Directory = Source Directory?

Post by Frank »

So if it can't be done under the MacOS GUI, can I get it done under the CLI running on the Mac?

That would mean I expect a recursion through the directories?

Can the CLI do that too or is this now becoming a batch script?
Frank
Novice
Posts: 64
Joined: Fri Apr 20, 2007 9:06 am

Re: Target Directory = Source Directory?

Post by Frank »

The Mac version runs under the macOS sandbox, so it can read and write only to the file and folders the user choose in the open panel or by drag & drop
Ritsuka,

A two part follow up then:

1) If I were to drag folders to Handbrake from the finder (i.e. drag'n'drop) would Handbrake then be able to have authorization (High Sierra / Mojave / Catalina) to write to those folders? The files I'm working with are usually program stream files with TS or M2TS suffixes so even re-encoding with the same name but a different suffix (mkv/mp4) wouldn't result in a file name collision / overwriting / deletion?

2) Will Handbrake navigate through sub levels of folders? i.e. if I'm encoding a recorded series and each season has its own subfolder (Season 1, Season 2) would I be able to count on HB to go through each folder? Or is this a case of doing each subfolder individually?

thanks for the clarification! :-)
Post Reply