How to extract orientation information from videos?

后端 未结 6 1928
谎友^
谎友^ 2020-11-30 04:49

After surfing through tons of documentation on the web it seems that the iPhone always shoots the video at a 480x360 aspect ratio and applies a transformation matrix on the

6条回答
  •  心在旅途
    2020-11-30 05:38

    Similar to @HdN8's answer, but without the python regex:

    $ ffprobe   -show_streams any.MOV  2>/dev/null  | grep rotate
    TAG:rotate=180
    

    Or JSON:

    $ ffprobe -of json  -show_streams IMG_8738.MOV  2>/dev/null  | grep rotate
    "rotate": "180",
    

    Or you could parse the JSON (or other output format).

提交回复
热议问题