0

Is it possible to have ffmpeg detect the video size, and if it's not landscape, have it do the rotate to 90 degress clockwise? I have found an article here, but am not sure if it can detect this automatically or not: Rotating videos with FFmpeg

Community
  • 1
  • 1
thevoipman
  • 1,672
  • 2
  • 17
  • 41

2 Answers2

1

If your decision is based on height and width a very simple script around ffmpeg can do this for you

ffprobe yourfile

In the output you will have height and width parameters available for the stream. Run a regex on it.

Based on height and width take decision in your script to rotate or not

Call ffmpeg with the right parameters.

av501
  • 6,559
  • 2
  • 20
  • 33
0
-autorotate

Automatically rotate the video according to file metadata. Enabled by default, use -noautorotate to disable it.

Jeremy Caney
  • 6,191
  • 35
  • 44
  • 70
Xeberdee
  • 1,709
  • 1
  • 13
  • 18