Coder Social home page Coder Social logo

cmd's Introduction

cmd

A collection of random shell commands to make my life easier

ImageMagick Shenanigans

Convert all EXR files in current folder to JPG

parallel convert -quality 100 -scale 2000000@ '{}' '{.}.jpg' ::: *.exr

Force RGB Colorspace

parallel convert -set colorspace sRGB -colorspace RGB -quality 100 -scale 2000000@ '{}' '{.}.jpg' ::: *.exr

Bonus round:
  • Add -profile profile_name.icc to specify an ICC profile
  • The scale parameter with @ at the end specifies the image size in megapixels. For example, a 2:1 image wil automatically be scaled to 2000x1000px

Resize all JPG images in current folder to fit 1920x1080 frame and fill the background with black

parallel convert -resize 1920x1080 -extent 1920x1080 -gravity Center -background black '{}' '{.}.png' ::: *.jpg

Convert all TIF files to EXR (raw exr that is, not linear or AcesCG because I'm a weirdo)

find /path/to/folder/ -name '*.tif' | parallel mogrify {} -format exr -compress DWAB {}


FFMPEG Fun

Convert JPG image sequence to mp4

ffmpeg -framerate 30 -pattern_type glob -i '*.jpg' -r 30 -crf 25 -preset veryslow -pix_fmt yuv420p -c:v libx264 ../000-out.mp4

Convert video to JPG image sequence

ffmpeg -i video.mov -q:v 2 %04d.jpg


Raw Conversion

dcraw "one size fits all" raw to linear 16-bit tif

parallel dcraw -v -w -o 7 -4 -T -q 0 -p embed '{}' ::: *

  • -v = verbose
  • -w = respect cam color temp
  • -o = ouptut colorspace
  • -4 = linearize
  • -q = debayer quality, fastest
  • -p = embed cam profile

Nikon Raw to 16-bit AcesCG: parallel dcraw_emu -v -w -W -H 2 -o 6 -6 -T -q 0 '{}' ::: *.NEF

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.