如果使用ffmpeg旋转iPhone的视频,则旋转信息会保留下来.我可以藏起来吗? [英] If you rotate the iPhone's video with ffmpeg, the rotation information sticks. Can I hide this?

查看:74
本文介绍了如果使用ffmpeg旋转iPhone的视频,则旋转信息会保留下来.我可以藏起来吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下实现是将影片旋转90度的命令.

The following implementation is a command to rotate the movie by 90 degrees.

ffmpeg -i video.mp4 -vf transpose=1 -metadata:s:v:0 rotate=0 videoo.mp4
-vf transpose=1

iPhone的视频包含轮播信息,并且实际上

The iPhone's video contains rotation information and actually

ffprobe -show_streams -print_format json videoo.mp4 2>/dev/null

如下所述输出动态影像信息或旋转信息.

To output motion picture information or rotation information as described below.

 "tags": {
                "rotate": "90",
                "creation_time": "2017-08-24T01:49:38.000000Z",
                "language": "und",
                "handler_name": "Core Media Data Handler",
                "encoder": "'avc1'"
            },
            "side_data_list": [
                {
                    "side_data_type": "Display Matrix",
                    "displaymatrix": "\n00000000:            0       65536           0\n00000001:       -65536           0           0\n00000002:            0           0  1073741824\n",
                    "rotation": -90
                }
            ]



"rotate": "90",

"side_data_list":

"rotation": -90

是否可以隐藏它?还是可以只删除此轮播信息?

Is it possible to hide this? Or is it possible to erase only this rotation information?

推荐答案

您的 ffmpeg 可能很旧.如果您只是想对视频进行物理旋转,请使用 ffmpeg 对其进行编码,然后视频会根据旋转信息自动进行编码:

Your ffmpeg is probably old. If you just want to physically rotate the video encode it using ffmpeg and it will do that automatically according to the rotation information:

ffmpeg -i input.mp4 -c:a copy output.mp4

它将自动剥离旋转侧数据.如果要避免这种行为,请添加 -noautorotate 选项.

It will automatically strip the rotation side data. If you want to avoid that behavior add the -noautorotate option.

如果只想剥离旋转边数据:

If you just want to strip the rotation side data:

ffmpeg -i input.mp4 -c copy -metadata:s:v rotate="" output.mp4

这篇关于如果使用ffmpeg旋转iPhone的视频,则旋转信息会保留下来.我可以藏起来吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆