#! /bin/sh # # Automatically rotate video in mplayer based on EXIF tags for last; do : ; done case $(exiftool -rotation -b "$last") in 90) mplayer -vf rotate=1 "$@" ;; 180) mplayer -vf flip,mirror "$@" ;; 270) mplayer -vf rotate=2 "$@" ;; *) mplayer "$@" ;; esac