Skip to content

Instantly share code, notes, and snippets.

@vector-kerr
Created November 3, 2024 12:10
Show Gist options
  • Save vector-kerr/4db430895a302db2ff5bacb80cbdaed4 to your computer and use it in GitHub Desktop.
Save vector-kerr/4db430895a302db2ff5bacb80cbdaed4 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# Batch Convert ARW Files
# Use this script to batch-convert ARW files into (for example) JPEG files for use
# as lower quality thumbnails.
#
# What it does:
#
# 1. Find all ARW files on the local machine
# 2. Pipe into the parallel command (sudo apt-get install -y parallel)
# 3. Run at 70% available CPU
# 4. Invoke rawtherapee-cli for each file (sudo apt-get install -y rawtherapee)
# 5. Output to thumbs dir
# -q => quick start
# -j40 => 40% quality jpeg output
# -Y => overwrite file if present
# -c => specify input file
mkdir -p thumbs
ls *.ARW | parallel --jobs 70% rawtherapee-cli -o "thumbs/{1}.png" -q -j40 -Y -c "{1}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment