Crate sublercli[][src]

sublercli-rs - a simple commandline interface for the sublerCLI tool on mac OS to write metadata to media files


Requires an additional SublerCLI Installation. To install with homebrew: brew cask install sublercli

By default sublercli-rs assumes a homebrew installation under /usr/local/bin/SublerCliYou can check your installtion path withbrew cask info sublercliIf the SublerCLI installation destination deviates from default, you can overwerite the path by setting theSUBLER_CLI_PATH` environment variable to the valid destination.


To store metadata, Atoms are used. An Atom has a specifc name and the value it stores. The Atom struct mimics this behavior. There is a predefined set of valid atoms. To obtain a list of al valid metadata atom tag names:

use sublercli::Atoms;
let valid_tags: Vec<&str> = Atoms::metadata_tags();

Support for the predefined set of known atoms is individually implemented. Atoms functions as a wrapper to store a set of single Atom values and is used to create Atoms like:

use sublercli::*;
let atoms = Atoms::new()
    .add("Cast", "John Doe")
    .artist("Foo Artist")
    .title("Foo Bar Title")


To invoke the SublerCLI process: If no dest path is supplied then the destination path is the existing file name suffixed, starting from 0: demo.mp4 -> demo.0.mp4

use sublercli::*;   
let file = "demo.mp4";
let subler = Subler::new(file, Atoms::new().title("Foo Bar Title").build())
    // by default, mediakind is already set to `Movie`

    // set an optional destination path

    // by default the optimization flag is set to true

    // execute prcess in sync,
    // alternativly spawn the process: `.spawn_tag()`

    .and_then(|x| {
        println!("stdout: {}", String::from_utf8_lossy(&x.stdout));



Represents a Metadata Media Atom




Represents the type of media for a input file