Skip to content

Instantly share code, notes, and snippets.

@GregIngelmo
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GregIngelmo/12e1d2821d8fcd72239a to your computer and use it in GitHub Desktop.
Save GregIngelmo/12e1d2821d8fcd72239a to your computer and use it in GitHub Desktop.
ffmpeg commands

ffmpeg commands

Rotate all videos in current directory 90 degrees and remove rotate metadata that's used by iOS & Quicktime.

find *.mp4 | xargs -I {} ffmpeg -i "{}" -v 0 -vf "transpose=1" -qscale 0 -y -metadata:s:v:0 "rotate=0" "rotated/{}"

Print the width, height and filename for every video in the current directory

find *.mp4 | xargs -I {} ffprobe -v quiet -print_format json -show_format -show_streams {} | jq -c ". | {filename:.format.filename, w:.streams[0].width, h:.streams[0].height}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment