Git Product home page Git Product logo

aegisub-cli's Introduction

Aegisub CLI

Standalone binary for running Aegisub automations from the command line.

Usage

aegisub-cli [options] <input file> <output file> <macro>
Options:
  --help                  produce help message
  --video arg             video to load
  --timecodes arg         timecodes to load
  --keyframes arg         keyframes to load
  --automation arg        an automation script to run
  --active-line arg (=-1) the active line
  --selected-lines arg    the selected lines
  --dialog arg            response to a dialog, in JSON
  --file arg              filename to supply to an open/save call
  --loglevel arg (=3)     0 = exception; 1 = assert; 2 = warning; 3 = info; 4 =
                          debug

Examples:

aegisub-cli --dialog '{"button": 0, "values": {"stripComments": true}}' --video premux.mkv --automation l0.ASSWipe.moon script_in.ass script_out.ass ASSWipe

aegisub-cli --selected-lines 0-5,10,15-20 --automation lyger.GradientByChar.lua script_in.ass script_out.ass "Gradient by characte/Apply Gradient"

Dialogs

You can navigate automations that show dialogs using the --dialog option. --dialog takes a JSON object with two keys: button and values. button is an integer specifying which button in the dialog to push, starting at 0. values is a JSON object consisting of control name/value pairs, for specifying values of text fields, checkboxes, and so on.

Valid values include:

  • Float controls: A float such as 0.1
  • Integer controls: An integer such as 42
  • Color controls: An integer array of length 3 or 4, such as [50, 100, 250, 20], in the order R, G, B, A
  • Checkbox controls: A boolean value, either true or false
  • Others: A string such as "hello"

The control names are the names supplied to aegisub.dialog. Refer to the source code of the automation or the debug output printed by aegisub-cli when run with --loglevel 4 to find the correct names.

Compiling

Linux

Install Meson and Ninja (e.g. using pip for Python 3), as well as development libraries for ICU, Boost and FFMS2, and run

$ meson --prefix=/usr --buildtype=release builddir
$ ninja -C builddir src/aegisub-cli

The prefix should be set to the same prefix as your main Aegisub installation, as this is where Aegisub CLI will search for automation modules. Note however that you do not need to install the actual binary itself to the same directory.

Windows

Install Visual Studio 2019, Python 3, Meson and Ninja, open the x64 Native Tools Command Prompt for VS 2019, run

$ meson -Ddefault_library=static -Dlocal_boost=true --buildtype=release builddir
$ ninja -C builddir src/aegisub-cli.exe

and sit tight. Meson will download and build the required dependencies, including ICU, Boost and FFmpeg, so compilation will take a while.

Development on Windows

You can generate a Visual Studio 2019 project using

$ meson -Ddefault_library=static -Dlocal_boost=true --buildtype=debugoptimized --backend vs2019 builddir

You can then import the solution generated in builddir. Note that you cannot use --buildtype=debug as FFmpeg will fail to compile without optimizations.

Windows binaries

There are pre-built binaries for Windows available from the releases section. Simply place aegisub-cli.exe in the same directory as your main Aegisub executable and add the directory to your PATH.

aegisub-cli's People

Contributors

alucryd avatar alysson-souza avatar aristotll avatar azpidatziak avatar bkbkb avatar coffeeflux avatar computerfan avatar darealshinji avatar dwbuiten avatar eqvinox avatar ereza avatar fichtefoll avatar grigorig avatar kblomster avatar keepco avatar line0 avatar lliehu avatar myaamori avatar myrsloik avatar nielsmh avatar p-static avatar roxasshadow avatar rr- avatar safaalfulaij avatar sidneys avatar sl1pkn07 avatar sthenc avatar tgoyne avatar thefirered avatar torque avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.