Extract rotation data with ffprobe 5 and newer

Viewed 406

ffprobe releases after 4.4 don't allow to read the video orientation via -select_streams v:0 -show_entries stream_tags=rotate. Apparently this is by design and the alternative is to read the display matrix side data, according to this ticket: https://trac.ffmpeg.org/ticket/9452

This works on Mac:

ffprobe -loglevel error -select_streams v:0 -show_entries side_data=rotation -of default=nw=1:nk=1 input.mp4

But on ffprobe for Windows, old and new versions, the program hangs forever. Is there a viable alternative? Or should we stick to ffprobe 4.4 if we need rotation data? Or is there a way to read this in ffmpeg?

Thank you

1 Answers

With git build newer than Feb 3rd 2022, you can use

ffprobe -v 0 -select_streams v:0 -show_entries stream_side_data=rotation -of default=nw=1:nk=1 input.mp4

Related