Skip to content

Programmatically controlling LosslessCut / API / CLI / external processing #980

@mifi

Description

@mifi

Suggested ways to programmatically control LosslessCut. Feel free to add suggestions in comments below.

command line arguments

API / actions / macros

I could imagine some API that allows automating actions in LosslessCut, internally and externally. This could be tied to custom keyboard mappings #254

Run a custom external command from segments

Manual external post processing / dry run export

#691 (comment)

See also #974

Automated external post processing

Ability to press a button in losslesscut and have it run a custom command line (or more commands, e.g. one cmd per segment) and with ability to inject information about the current segments into this command. I think this requires some coding in one way or another by the user.

I think such a «hack» can currently be achieved by creating a custom bash script. Losslesscut will auto save a project .llc file with json5 containing information about each segment. You could create a bash script that you trigger by a keyboard shortcut (outside losslesscut). Then this script will then read the .llc file and run the desired commands. The workflow would be:

  1. Edit segments in losslesscut
  2. once you’re done, trigger your bash script

See also #1347 and afterExport event #974

Scripting / automation of app actions

from #2135 (reply in thread):

Maybe add scripting feature for existing commands, so we can make our own automation scripts in javascript.
Then we could assign them to keys or add them to menus, right click commands, icons.
This could massively expand capabilities and add a ton of flexibility to UI.

This it could also ease your development of hard coding everything.

For example, this is the best feature of BLENDER with its console and scripting feature or REAPER DAW, they are basically a giant command library with a UI where everything can be scripted and automated. The users then created an entire ecosystem with thousands of scripts and add-ons.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions