[READ-ONLY] Mirror of https://github.com/probablykasper/to. CLI audio, video and image file converter
aiff audio cli flac gif image jp2 jpg mov mp3 mp4 ogg png video webm webp
0

Configure Feed

Select the types of activity you want to include in your feed.

Shell 100.0%
75 1 20

Clone this repository

https://tangled.org/kasper.space/to https://tangled.org/did:plc:pfpvrsanuoajxcxq2zl3i3rn
git@tangled.org:kasper.space/to git@tangled.org:did:plc:pfpvrsanuoajxcxq2zl3i3rn

For self-hosted knots, clone URLs may differ based on your setup.



README.md

📢 This now lives in http://github.com/probablykasper/my-bash-scripts#

to#

Pretty simple bash script that converts audio, video and image files using FFmpeg and ImageMagick.

Install#

Get Homebrew if you don't already, and run this command:

brew cask install probablykasper/tap/to

Usage#

Running to shows the help message:

Usage:
    to <format> [options] <file1> [file2...]

Options:
    format           Format to convert to.
    --formats        List all supported formats.
    -v, --verbose    If you love logs.
    -h, --help       Show this help message.

    Prefix arguments with - to pass them directly to
    FFmpeg or ImageMagick, like --ac -128k.

Formats#

Running to --formats shows the supported formats:

Video formats:
    mp4
    mp4-h265
    mov
    webm

Audio formats:
    mp3      320kbps. Custom bitrate example: mp3:128
    flac
    aiff
    opus     256kbps. Custom bitrate example: opus:128

Image formats:
    jpg      90 quality. Custom quality example: jpg:75 (0-100)
    png
    webp     90 quality. Custom quality example: webp:75 (0-100)
    gif

Dev instructions#

Release new version#

If you want to publish to Homebrew, you can create your own "tap" repository with a "cask" file for this script. You may want to Google how all that works. For reference, my tap can be found here.

  1. Update CHANGELOG.md
  2. Create a git tag + GitHub release with the release notes
  3. Update the formula's url to be the archive of the latest tag. This URL will be in this format: https://github.com/USER/REPO/archive/refs/tags/VERSION.tar.gz
  4. Update the sha256. Once you have the url updated, you can let Homebrew generate it for you by running this inside your tap repo:
    brew fetch --formula ./Formula/to.rb