Handbrake: save a custom preset / coding command for use on handbrake-cli on another machine

I have a bunch of videos to convert, from flv to mp4. In Handbrake gui, in Ubuntu, I have all the settings sorted. I saved it as a preset called an all-pill.

I need to use HandBrakeCLI on another ubuntu computer, only on this command line. So, I have two options that I can see, and I can not decide how to do this:

1) See what settings are used by the gui hand brake, so I can copy them and use them directly with HandBrakeCLI, replacing the file names if necessary.

2) Save the predefined all-tablets so that I can copy them to another machine and use them there with the HandBrakeCLI.

Option 2 seems more enjoyable. When I list the available presets in HandBrakeCLI, it does not list my user option, suggesting that the GUI version save them somewhere other than the cli version.

Any suggestions? thanks max

+4
source share
2 answers

~/.ghb/presets GUI, PropertyList ( XML). CLI. , CLI GUI . C (++), , , , . CLI test/test.c Handbrake.

Python, . Plist.py http://winappdbg.sourceforge.net/blog/PList.py:

#!/usr/bin/env python                                                                                                    
import sys

import PList

def translate(item):
    args = []

    if "AudioList" in item:
        args.append(("-E", item["AudioList"][0]["AudioEncoderActual"]))

    return args

def invoke(args):
    print "HandbrakeCLI " + " ".join(" ".join(arg) for arg in args)

presets = sys.argv[1]
name = sys.argv[2]

data = PList.fromstring(open(presets).read())

for item in data:
    if isinstance(item, dict):
        if 'PresetName' in item:
            if item['PresetName'] == name:
                invoke(translate(item))

.

+3

: Handbrake Windows Windows 7. Windows GUI - CLI, Linux, . ( , Mac).

plist, linux, gui Windows : , , (.. - true = "foo"): , plist: , , .

, Windows. -, , linux gui. : windows gui CLI, , . CLI linux, .

, , " ";-) .

+8

All Articles