Find out rotation metadata from video in ffmpeg

Solution 1:

Applied to your question, in concrete terms, you can get the rotation by: ffprobe -loglevel error -select_streams v:0 -show_entries stream_tags=rotate -of default=nw=1:nk=1 -i in.mov

Legend:

-loglevel error: only show the rotate field, no other info.

-select_streams v:0: process the first video stream (ignore if multiple video streams are present)

-show_entries stream_tags=rotate: returns the rotate information from the input video

-of default=nw=1:nk=1: use default output format and don't show anything else, i.e. no-wrappers (nw) and no key (nk)

Solution 2:

Use ffprobe, like this.

ffprobe -i in.mov

This should result in showing a "rotate:" field somewhere in the output if such a field is present in the file.