Integration with CompressX

CompressX supports deep linking, allowing you to integrate it into your workflow. Simply trigger a deep link to automatically launch CompressX and compress your files.

Trigger CompressX via deep linking

The deep link support these parameters:

  • quality . Possible values: highest, high, good, medium, acceptable . Default is high

  • videoFormat . Possible values: same, mp4, webm . Default is same

  • imageFormat . Possible values: same, webp, jpg, png . Default is same

  • format. Default value is same . If videoFormat or imageFormat is missing, format parameter will be used

  • removeAudio . Possible values: true , false . Default is false

File compression using deep linking

The deeplink format is as follows:

compressx://open?path={path_to_your_file_1}|{path_to_your_file_2}
&[param1]=[value1]&[param2=[value2]

Each file path is divided by | character. Each param is divided by & character. Below are some example deeplinks

// compress a video
compressx://open?path=/Users/hieudinh/Desktop/video.mp4&quality=medium&videoFormat=mp4&removeAudio=true

// compress an image
compressx://open?path=/Users/hieudinh/Desktop/image.png&quality=medium&imageFormat=png

// compress video and image
compressx://open?path=/Users/hieudinh/Desktop/image.png|/Users/hieudinh/Desktop/video.mp4&quality=medium&imageFormat=png&videoFormat=mp4&removeAudio=true

File importing using deep linking

You can also import files into CompressX for customization before compressing. The deeplink format is as follows:

compressx://import?path={path_to_your_file_1}|{path_to_your_file_2}

Trigger CompressX via command line

In your favourite Terminal, you can trigger compression or importing by using the same deep link with open command.

// compression
open "compressx://open?path=/Users/hieudinh/Desktop/test1.mp4|/Users/hieudinh/Desktop/test2.mp4"

// import
open "compressx://import?path=/Users/hieudinh/Desktop/test1.mp4|/Users/hieudinh/Desktop/test2.mp4"

Last updated