Automatically save to source folder?

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
Z400Racer37
Posts: 4
Joined: Fri Aug 19, 2016 4:04 am

Automatically save to source folder?

Post by Z400Racer37 »

Hey guys,

I'm not really sure where to start with what I'm trying to do, but hopefully you guys can help me out a little bit. I have a couple terabytes worth of movies that have different file formats in different folders. I would like to convert them all them before. Here's my problem: In order to prevent disorganization, I would have to go through all of them individually, add every single video that's on there, and then update the output destination to the source folder. I really hope there's away I can tell handbrake to automatically change the destination folder to the source folder? Maybe even automatically delete the original file for me? Are you guys aware of any scripts or functions that will enable me to do this? My over looking something simple? Or is this pretty involved?

OS X 10.11.6
HB Version 0.10.5 x86_64 (2016021100)

Thanks all!
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: Automatically save to source folder?

Post by mduell »

Seems pretty straightforward to script. I'd suggest reading up on an appropriate scripting language for your platform, like bash or AppleScript.
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: Automatically save to source folder?

Post by Woodstock »

With the command line interface, not much is "automatic". You specify the whole path to the input file, and the output file.
Rocketcandy
Posts: 5
Joined: Wed Sep 14, 2016 4:24 pm

Re: Automatically save to source folder?

Post by Rocketcandy »

I wrote a script for windows that does this, it would be possible to write something similar for OS X. If you want to take a look at it I have it posted here: https://github.com/Rocketcandy/ConvertUsingHandBreakCLI

Probably more than you need but might give you an idea if you wanted to write your own.

The magic starts at line 109. Everything above that is customization so it easy for people to run on windows with only 2 changes.
Post Reply