Phil Harvey 在https://exiftool.org/exiftool_pod.html#WRITING-EXAMPLES上提供了一些使用 Exiftool 编写照片元数据的优秀示例。
按照 Phil 的例子,我在更新 JPG 的现有元数据字段时没有问题。但是,我现在尝试将相同的逻辑应用于视频元数据(MOV 包装的 H.264),但没有任何成功。我有一个根据 iPhone 5 (iOS 7.1) 拍摄的视频是颠倒的 - 旋转值为 180 而不是 0。所以我正在执行“exiftool -Rotation=0 [文件名]”但是我得到的结果是:
0 图像文件已更新
1个图像文件不变
视频元数据有什么根本不同吗?这可能是权限问题吗?我的执行语句不正确吗?也许有更好的方法?
谢谢!
7 月 10 日更新:根据 Exiftool 网站再次在https://exiftool.org/TagNames/Composite.html,我发现无法编辑旋转字段:
标签名称:旋转
可写:N
派生自:QuickTime:MatrixStructure、QuickTime:HandlerType
不幸的是,当我尝试通过 Exiftool 更新 MatrixStructure(也显示为“Matrix Structure”)时,它也失败了,并显示此消息 - “警告:抱歉,MatrixStructure 不可写。”
So it's looking like it's not possible to edit the relevant metadata here. However, while both VLC and the video transcoder I'm using work with the iPhone file upside down, both Adobe Premiere Pro CC and the QuickTime player work with the file right side up. So it certainly seems like there must be something in the current metadata other than Rotation.
Thanks again.
小智 7
您可以使用最新的 Exiftool 来旋转 MOV。
exiftool -Rotation=0 *.mov
Run Code Online (Sandbox Code Playgroud)
? 请参考下表设置旋转。它将应用 QuickTime MOV Track1 中的值。
矩阵结构 0 1 0 -1 0 0 1080 0 1
垂直,Home 键按下,Rotation=90
矩阵结构 1 0 0 0 1 0 0 0 1
水平,Home 键在右,Rotation=0
矩阵结构 0 -1 0 1 0 0 0 1920 1
垂直,Home 键向上,Rotation=270
矩阵结构 -1 0 0 0 -1 0 1920 1080 1
水平,主页按钮在左边,旋转=180
小智 3
Phil Harvey在此解释了更新该特定标签的问题。
作为替代解决方案,我设法使用以下方法获得 mp4 文件的无损旋转
ffmpeg -i input.mp4 -metadata:s:v rotate="180" -codec copy output.mp4
Run Code Online (Sandbox Code Playgroud)
它适用于我倒置安装的 GoPro 视频。
该视频在 VLC 上播放正确,但在 Mediaplayer classic 上播放不正确。
| 归档时间: |
|
| 查看次数: |
3248 次 |
| 最近记录: |