Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support "Sequence Info" in Sony Makernote #274

Open
crener opened this issue Nov 8, 2020 · 6 comments
Open

Support "Sequence Info" in Sony Makernote #274

crener opened this issue Nov 8, 2020 · 6 comments

Comments

@crener
Copy link
Contributor

crener commented Nov 8, 2020

I'm trying to get the bracket index from the Sony makerNote metadata but this doesn't seem to handle that or any pieces of data which aren't exposed at a root level. This seems to know ShotInfo ("SonyType1MakernoteDirectory.TagShotInfo") but it shows as "[Sony Makernote] Shot Info - [390 values]" with no way to extract the values or just the byte data?

I've gone and looked at the source and looked at the code to try and add an implementation for the 0x9400 address but (based on ShotInfo) there isn't a mechanism or preferred way of implementing this kind of extraction as it contains multiple datatypes.... Am I missing something or is this just not something that the library supports (or wants to support)? Why can't I just access this data directly and parse it myself if this doesn't currently have support for it? :)

If you're curious there is documentation on 0x9400 here: https://exiftool.org/TagNames/Sony.html#Tag9400c

@drewnoakes drewnoakes changed the title Unable to extract nested MakerNote info Support "Shot Info" in Sony Makernote Nov 8, 2020
@drewnoakes
Copy link
Owner

I've gone and looked at the source and looked at the code to try and add an implementation for the 0x9400 address but (based on ShotInfo) there isn't a mechanism or preferred way of implementing this kind of extraction as it contains multiple datatypes

Plenty of tags unpack to multiple values. In such cases we create a new directory class for them, with tags for each value.

Why can't I just access this data directly and parse it myself

You can retrieve the raw bytes from the directory. Use GetObject on the directory and pass the tag you want. You'll get a byte array back.

Of course, if you can make a pull request here so that everyone benefits, it'd be great.

It seems we already have some sample images to test with: https://github.com/drewnoakes/metadata-extractor-images/search?q=sony+%22Shot+Info%22

There are other non-Sony images with unhandled "Shot Info" tags too. We should investigate whether they have the same format or not.

@crener
Copy link
Contributor Author

crener commented Nov 10, 2020

Ahh minor confusion here. I personally don't care about "Shot Info" I want/need "0x9400" but it doesn't have a nice name yet so is slightly more annoying to talk about... Maybe "Sequence Info" is appropriate as it's about bracketed/continuous shot information?

@crener crener changed the title Support "Shot Info" in Sony Makernote Support "Sequence Info" in Sony Makernote Nov 10, 2020
@crener
Copy link
Contributor Author

crener commented Nov 10, 2020

So the preferred way of implementing this is adding a new directory entirely... but wouldn't that clutter everything cause of the large amount of random nested dictionaries that are in the Sony Makernote? (I assume it's the same in other manufacturers)

Also if I do go and figure this out when I have a minute what do you call the descriptor/dictionary class? "SonyType1MakernoteSequenceLengthDescriptor", again I had a quick look for more nested types but don't know what the projects naming conventions are in this area?

:)

@drewnoakes
Copy link
Owner

The proliferation of directory/descriptor classes is unfortunate, but not something we can fix without a redesign. The name you suggest makes sense to me, assuming the directory is not used in other contexts.

@crener
Copy link
Contributor Author

crener commented Nov 14, 2020

So I've been looking at this and I think that if you moved some of the bigger makernote groups into sub groups it would make it look a lot more organised.

Olympus, Reconyx and Sony would be good candiates cause I'm looking to add around 9 more classes which are Sony specific which makes the makernote directory look huge...

@drewnoakes
Copy link
Owner

In general if data is "nested" (as these byte array tag values are) then we create a new directory. This means the tree of directory objects mirrors the physical structure of the data. This may be useful in future if we support writing metadata.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants