ExifTool Forum

General => Metadata => Topic started by: sabaatworld on February 23, 2021, 02:58:30 PM

Title: Writing / Copying the 'video-orientation' tag?
Post by: sabaatworld on February 23, 2021, 02:58:30 PM
The videos associated with live photos taken on iPhone 12 (or similar) seems to use the 'video-orientation' tag to determine if the video needs to mirrored or not. After compressing the video in my application, I'm trying to copy over the tag value from the original file but its not working. According to the https://exiftool.org/TagNames/QuickTime.html page, the 'video-orientation' is not writable.

I wanted to know if there are any plans to support this tag in the future or if there are any alternates to copying over / writing this tag?

'video-orientation'  values for photos captured with the front camera of iPhone 12:
6,1,8,3 <- Normal Mode
5,2,7,4 <- Mirrored Mode (selected in Camera settings)

Title: Re: Writing / Copying the 'video-orientation' tag?
Post by: Phil Harvey on February 23, 2021, 03:59:50 PM
I'll look into this and post back if I have any questions or require samples, but looking at my comments in the code it may be difficult to add the ability to write this.

- Phil
Title: Re: Writing / Copying the 'video-orientation' tag?
Post by: sabaatworld on February 25, 2021, 04:56:13 PM
Thanks for looking into this
Title: Re: Writing / Copying the 'video-orientation' tag?
Post by: Phil Harvey on March 01, 2021, 08:17:02 AM
OK.  The problem here is that this information is not written in the top-level metadata.  Instead, it is stored in the timed metadata (presumably so it will change if the phone is rotated during the video).  ExifTool doesn't yet have the ability to write timed metadata, and it is unlikely that this feature will be added in the foreseeable future because it would be a very difficult addition for a number of reasons.

However, it seems as if the values correspond to the normal EXIF:Orientation values, so I'll add a human-readable conversion for this tag when reading.

- Phil
Title: Re: Writing / Copying the 'video-orientation' tag?
Post by: sabaatworld on March 01, 2021, 05:06:22 PM
Didn't knew about timed metadata. The reason I wanted to copy over the values from the original file was so that I wouldn't need to deal with rotating and / or mirroring the video.