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

Getting Video Create Date from iPhone Videos, when it is the 6th atom. #139

Closed
leenooks opened this issue Jan 3, 2018 · 7 comments
Closed

Comments

@leenooks
Copy link

leenooks commented Jan 3, 2018

Hi, I've been playing with your tool to help me sort the 1000's of videos that I have from my wifes and my iPhone. One thing I'm trying to get is the original video creation time and I can see the data in the videos.

Doing a dump of my GetID3 object on a video file, I can see the "moov meta" dump 6 keys (make, model, software, etc) and key 6 is "com.apple.quicktime.creationdate". However, "moov meta ilst" is only showing 5 entries with data correctly and entry number 6 looks like this:

 [5] => Array
  (
    [hierarchy] => moov meta ilst �
    [name] => �
    [size] => 48
    [offset] => 4509390
    [data] => (data�2017-07-22T16:06:06+1000
  )

This entry looks different to the others in that it doesnt have any "subatoms" it has a "data" key - it's name is also blank. The corresponding key field looks like this:

[6] => Array
       (
         [key_size] => 40
         [key_namespace] => mdta
         [key_value] => com.apple.quicktime.creationdate
       )

(Note that "moov meta keys" starts at index 1, whereas "moov meta ilist" starts at index 0).

Is there a reason that this value is garbled? Anyway to get it into the info -> tags keys?

@JamesHeinrich
Copy link
Owner

If you could provide a small sample file I can take a closer look

@leenooks
Copy link
Author

leenooks commented Jan 4, 2018

OK, here is another file - this one works out the creationdate OK (it appears to be the 5th field in this video) - however still, the 6th field (in this video "signature") is garbled - so I guess it is not an issue working out the date, but rather handling the fields and the "last one".
I can share the original video as I referenced above as well if needed.

sample.zip

@leenooks
Copy link
Author

leenooks commented Jan 4, 2018

For reference, this is what getID renders for me:

  • keys
                                                            [entry_count] => 6
                                                            [keys] => Array
                                                                (
                                                                    [1] => Array
                                                                        (
                                                                            [key_size] => 44
                                                                            [key_namespace] => mdta
                                                                            [key_value] => com.apple.quicktime.location.ISO6709
                                                                        )

                                                                    [2] => Array
                                                                        (
                                                                            [key_size] => 32
                                                                            [key_namespace] => mdta
                                                                            [key_value] => com.apple.quicktime.make
                                                                        )

                                                                    [3] => Array
                                                                        (
                                                                            [key_size] => 33
                                                                            [key_namespace] => mdta
                                                                            [key_value] => com.apple.quicktime.model
                                                                        )

                                                                    [4] => Array
                                                                        (
                                                                            [key_size] => 36
                                                                            [key_namespace] => mdta
                                                                            [key_value] => com.apple.quicktime.software
                                                                        )

                                                                    [5] => Array
                                                                        (
                                                                            [key_size] => 40
                                                                            [key_namespace] => mdta
                                                                            [key_value] => com.apple.quicktime.creationdate
                                                                        )

                                                                    [6] => Array
                                                                        (
                                                                            [key_size] => 46
                                                                            [key_namespace] => mdta
                                                                            [key_value] => com.apple.photos.originating.signature
                                                                        )

and the last 2 values


                                                                    [4] => Array
                                                                        (
                                                                            [hierarchy] => moov meta ilst ^@^@^@^E
                                                                            [name] => 5
                                                                            [size] => 48
                                                                            [offset] => 5744
                                                                            [subatoms] => Array
                                                                                (
                                                                                    [0] => Array
                                                                                        (
                                                                                            [hierarchy] => moov meta ilst ^@^@^@^E data
                                                                                            [name] => data
                                                                                            [size] => 40
                                                                                            [offset] => 5752
                                                                                            [language] => ^@^@
                                                                                            [unknown] => 0
                                                                                            [data] => 2018-01-04T12:55:44+1100
                                                                                            [key_name] => com.apple.quicktime.creationdate
                                                                                        )

                                                                                )

                                                                        )

                                                                    [5] => Array
                                                                        (
                                                                            [hierarchy] => moov meta ilst ^@^@^@^F
                                                                            [name] => ^@^@^@^F
                                                                            [size] => 52
                                                                            [offset] => 5792
                                                                            [data] => ^@^@^@,data^@^@^@^A^@^@^@^@AbZ8pDGtHddmCfoiiLBHrDqCdtBo
                                                                        )

@JamesHeinrich
Copy link
Owner

These fields are already parsed into [quicktime][comments] under the same name but with "com.apple.quicktime." removed, so for example your creation date is found at [quicktime][comments][creationdate][0]
quicktime

@leenooks
Copy link
Author

leenooks commented Jan 4, 2018

No, I think you've missed it.

This is not a problem about getting creationdate per-se. Its about getting the value in the 6th field (or probably "last" field).

In the sample I gave you, the value was garbled for "signature". In my other images, the last field is the creationdate, and thus I cannot retrieve it.

Here is another sample:

@leenooks leenooks changed the title Getting Video Create Date from iPhone Videos. Getting Video Create Date from iPhone Videos, when it is the 6th atom. Jan 4, 2018
@JamesHeinrich JamesHeinrich reopened this Jan 4, 2018
JamesHeinrich added a commit that referenced this issue Jan 4, 2018
#139
If there are more than 5 subatoms under moov>meta>ilst the ones >5 were
not parsed correctly
@JamesHeinrich
Copy link
Owner

I see what you mean now.
After some puzzling, I found that it wasn't necessarily the last item, but any items beyond the 5th item -- handling was hardcoded for items up to 5, but not beyond. In your examples there just happened to be 6 entries so it looked like the "last" item. The code as it stands now should handle up to 255 entries, if someone finds an example with more than that let me know :)

Fixed in d5a430e (the commit is kind of ugly due to whitespace changes from moving a 1000+ lines inside an if statement)

@leenooks
Copy link
Author

leenooks commented Jan 5, 2018

Thanks - I played with your code too and found the hardcoding - adding an additional line for the 6th entry worked. So, I'll try your patch - thank you.

StudioMaX pushed a commit to StudioMaX/getID3 that referenced this issue May 26, 2019
JamesHeinrich#139
If there are more than 5 subatoms under moov>meta>ilst the ones >5 were
not parsed correctly
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