Skip to content

Instantly share code, notes, and snippets.

@NateRudolph
Last active March 31, 2016 23:04
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save NateRudolph/b54f95c0f735df9af5194dd23990074e to your computer and use it in GitHub Desktop.
Uses ffmpeg to rotate a collection of videos by 180 degrees
#!/bin/bash
# by Nate Rudolph
# Uses ffmpeg to rotate a collection of videos (mov) by 180 degrees
# Loop through all movs in current directory
for vid in *.mov ; do
# Create variable for new filename with new extension
newfilename=${vid%.*}_r.mp4
# Use original video as input, rotate by PI (180 degrees), save as new file
ffmpeg -i $vid -vf "rotate=PI:bilinear=0" $newfilename
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment