Comments (13)
%Image::ExifTool::UserDefined = (
# XMP tags for Samsung's Motion Photo
'Image::ExifTool::XMP::GCamera' => {
MotionPhoto => { Writable => 'integer' },
MotionPhotoVersion => { Writable => 'integer' },
MotionPhotoPresentationTimestampUs => { Writable => 'integer' },
},
);
1; # end
This is what I have right now in my config file, and it works.
from exiftool.
Any idea how it comes up with the MotionPhotoPresentationTimestampUs
? The value of 2590122 isn't a date or time, nor is it a Unix time stamp.
The three you list should be easy enough to make a config file (and⦠you've gone and done it while I'm typing :D )
The XMP-Container:Directory
is a bit more complex as it is a structured tag and a list type tag.
from exiftool.
The MotionPhotoPresentationTimestampUs
seems to be the time offset of the key frame image from the start of the video.
from exiftool.
If XMP-Container::Directory
is a structured tag and a list type tag, what type are the other tags I've mentioned so far? Also I read somewhere that if you write a list type tag twice, it writes the value twice rather than replacing the old one. So how would I replace the old value?
Also let me know if you manage to write the config definition for the XMP-Container::Directory
because I could really use it for completeness in my project. All I can find so far is a commented out thing with a note about it conflicting with Google's depth-map Device tags.
from exiftool.
Thanks. I'll add these to the next release. The "Us" in the timestamp tag name is likely microseconds.
If you want to replace the old value of a list tag, just write it once. If you write it twice, you replace the old value with two new values.
I had already generated the necessary code for the Container tags, but I won't impement it due to a conflict with other Google tags. See here:
https://github.com/exiftool/exiftool/blob/master/lib/Image/ExifTool/XMP2.pl#L2108
- Phil
from exiftool.
So if I put this into my config file:
'Image::ExifTool::XMP::Container' => {
%xmpTableDefaults,
GROUPS => { 1 => 'XMP-Container', 2 => 'Image' },
NAMESPACE => 'Container',
NOTES => 'Google Container namespace.',
Directory => {
Name => 'ContainerDirectory',
FlatName => 'Directory',
List => 'Seq',
Struct => {
STRUCT_NAME => 'Directory',
Item => {
Namespace => 'Container',
Struct => {
STRUCT_NAME => 'Item',
NAMESPACE => { Item => 'http://ns.google.com/photos/1.0/container/item/'},
Mime => { Writable => 'string' },
Semantic => { Writable => 'string' },
Length => { Writable => 'integer' },
Label => { },
Padding => { Writable => 'integer' },
URI => { },
},
},
},
},
},
How do I set values for this via the command line?
Also, I'm just assuming that it's correct. Idk if I can do %xmpTableDefaults
in a config file, but nothing complained about that so far.
from exiftool.
This won't work for a few reasons, but the biggest problem is a conflict with a different Google Container schema.
I don't have time right now to figure out how this could be done. Maybe sometime in the next week or so I can try this.
- Phil
from exiftool.
See the Structured Information page for dealing with structured data.
Structured data is very complex to deal with. Exiftool can flatten the individual tags within the structure and treat them like a list type tag, but this has problems when one of the structures is missing data that the others don't have. With a correct config file, the flattened output from your App1 xmp data above would look something like this
[XMP-Container] DirectoryItemMime : image/jpeg,video/mp4
[XMP-Container] DirectoryItemSemantic : Primary,MotionPhoto
[XMP-Container] DirectoryItemLength : 0,4370106
[XMP-Container] DirectoryItemPadding : 138,4370106
Adding the -struct
option shows you the actual format of the Directory
tag.
C:\>exiftool -G1 -a -s -e --file:all -struct -Directory Y:\!temp\x\y\app1.xmp
[XMP-Container] Directory : [{Item={Length=0,Mime=image/jpeg,Padding=138,Semantic=Primary}},{Item={Length=4370106,Mime=video/mp4,Padding=0,Semantic=MotionPhoto}}]
or in a more human readable form
[{
Item = {
Length = 0,
Mime = image / jpeg,
Padding = 138,
Semantic = Primary
}
}, {
Item = {
Length = 4370106,
Mime = video / mp4,
Padding = 0,
Semantic = MotionPhoto
}
}
]
So with a proper config file, you could either write the data as flattened tags (note that these may not be the actual names with a config file)
exiftool -XMP-Container:DirectoryItemMime="image/jpeg,video/mp4" -XMP-Container:DirectoryItemSemantic="Primary,MotionPhoto" -XMP-Container:DirectoryItemLength="0,4370106" -XMP-Container:DirectoryItemPadding="138,0" /path/to/files/
or when using the -struct
option
exiftool -XMP-Container:Directory=[{Item={Length=0,Mime=image/jpeg,Padding=138,Semantic=Primary}},{Item={Length=4370106,Mime=video/mp4,Padding=0,Semantic=MotionPhoto}}] /path/to/files/
from exiftool.
Wow yeah that does look complicated. I tried the config file, and you're right that it doesn't work out of the gate, but I'm stumped as to what to do to fix it / how to resolve the conflict.
For now I'll just skip the container when making my motion photos, and if Phil manages to come up with a solution, I'll incorporate that.
from exiftool.
Related Issues (20)
- Error accessing MIE files in version 12.74 HOT 3
- JSON detected as wrong type if array containing object is MIMEtype HOT 1
- Missing TIFF-EPStandardID interpretation HOT 2
- Clarify JXL read/write support HOT 2
- "-*=" conflicting with "PNG-pHYs" tags HOT 7
- Encode mp3 tags in UTF8 HOT 9
- Microsoft Xtra tags - expand writable tags HOT 16
- Unable to update MAKE tag using exiftool 12.76 HOT 3
- consider a default behavior of reading mkv tags after the first cluster if indexed in the seekhead HOT 4
- Problematic handling of non-ASCII filenames on Windows HOT 21
- [Suggestion] Report more modern variant of TTF MIME type?
- [Suggestion] New way of representing Palette in human-readable format HOT 4
- Firmware Versions, Canon 7D (or - strangeness recovering certain data) HOT 3
- [Enhancement] TIFF metadata stripping HOT 3
- Add Character Count too? ("Document" type) HOT 2
- Deployment instruction HOT 4
- Is exiftool.org down completely? HOT 1
- `-J` exports incorrectly outputs ExifToolVersion as a float HOT 2
- "PNG-PrimaryChromaticities" "PNG-CICodePoints" alike not handled HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from exiftool.