Skip to content

Instantly share code, notes, and snippets.

@patchdynamics
Last active December 5, 2016 06:56

Revisions

  1. patchdynamics revised this gist Jul 28, 2015. 1 changed file with 7 additions and 2 deletions.
    9 changes: 7 additions & 2 deletions GeoTiff to MPEG
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,12 @@ gdal_translate -scale 200 350 0 1 air.59.tif air-rescaled.tif
    find *.tif -exec gdal_translate -scale 200 350 0 1 {} {}.rescaled.tif \;

    # make into png files
    mogrify -format png *.rescaled.tif
    mogrify -format jpg *.rescaled.tif

    # and make the movie!
    convert -antialias -delay 1x8 *.rescaled.jpg output.mpeg
    convert -antialias -delay 1x8 *.rescaled.jpg output.mpeg

    # create a colorspace
    convert xc:black xc:red xc:orange xc:yellow xc:green1 xc:cyan xc:blue xc:blueviolet xc:black +append -filter Cubic -resize 300x30! -flop rainbow_lut.png
    find *.rescaled.jpg -exec convert {} -colorspace gray rainbow_lut.png -clut {}.colored.jpg \;
    convert -antialias -delay 1x8 *.colored.jpg output.mpeg
  2. patchdynamics renamed this gist Jul 28, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. patchdynamics created this gist Jul 28, 2015.
    12 changes: 12 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@

    # need to rescale the values
    gdal_translate -scale 200 350 0 1 air.59.tif air-rescaled.tif

    # or batch it
    find *.tif -exec gdal_translate -scale 200 350 0 1 {} {}.rescaled.tif \;

    # make into png files
    mogrify -format png *.rescaled.tif

    # and make the movie!
    convert -antialias -delay 1x8 *.rescaled.jpg output.mpeg