Skip to content

Instantly share code, notes, and snippets.

View NateRudolph's full-sized avatar

Nate NateRudolph

View GitHub Profile
@NateRudolph
NateRudolph / batch_video_rotate.sh
Last active March 31, 2016 23:04
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