<p><em>[This was originally posted at https://stackoverflow.com/questions/77971906/structure-of-mpeg-4-xyz-box, and I was redirected to here. I understand if it is too OT and is closed.]</em>.</p>
<p>I am trying to parse out ISO/IEC 14496-12 based files (essentially MPEG-4 movies). There are a few boxes are not in the standards (or on the MP4 Registration Authority lists), but are in real-world files. They mostly pretty simple to trace to QuickTime or similar, where the implementation is just not updated.</p>
<p>I'm struggling with the GPS location box (<code>©xyz</code>).</p>
<p>Here is an example:</p>
<pre><code>0x00, 0x00, 0x00, 0x1e, 0xa9, 0x78, 0x79, 0x7a,
0x00, 0x12, 0x15, 0xc7, 0x2b, 0x34, 0x31, 0x2e,
0x33, 0x37, 0x35, 0x38, 0x2b, 0x30, 0x30, 0x32,
0x2e, 0x31, 0x34, 0x39, 0x32, 0x2f
</code></pre>
<p>The first eight bytes are the box length and box name. No problem with that.</p>
<p>The next four bytes are the unknowns: <code>0x00, 0x12, 0x15, 0xc7</code>.</p>
<p>The remaining bytes are text &quot;+41.3758+002.1492/&quot; which is the expected
latitude and longitude (Barcelona) per ISO 6709 (albeit not the 2023 version).</p>
<p>Of the unknowns, I can interpret the first two bytes as a 16 bit (unsigned) integer which matches the number of characters in the text. That is guesswork though.</p>
<p>The next two are a mystery - could perhaps be constants since I see the same <code>0x15 0xc7</code> values when generated from a different device in Australia.</p>
<p>What is the defined structure for this box, and is there a published specification that defines that structure?</p>

CC BY-SA 4.0
2024-02-15T17:10:04.597Z
Looking at a video I have with exiftool and using the `-v4` option, which shows a breakdown of the structure, it seems that the character encoding and language should appear before the actual GPS data, but exiftool is showing 8 bytes instead of 4, and I can't seem to figure out what your 4 bytes mean.  I've posted an example output to [Pastebin](https://pastebin.com/PgEi3b06) which includes a default entry and a French entry.  Hopefully, that can help.
StarGeek
CC BY-SA 4.0
2024-02-17T02:29:23.240Z
Thanks. Over at the original stack overflow question, we traced it down to the language code (which a single pad bit, then three 5 bit numbers which are the difference from 0x60 to the ASCII value.
BradHards
<metadata><mpeg4>
Structure of MPEG-4 "©xyz" box
BradHards
# Structure of MPEG-4 "©xyz" box

(Asked by: username_0 on 2024-02-15)

[This was originally posted at https://stackoverflow.com/questions/77971906/structure-of-mpeg-4-xyz-box, and I was redirected to here. I understand if it is too OT and is closed.].
I am trying to parse out ISO/IEC 14496-12 based files (essentially MPEG-4 movies). There are a few boxes are not in the standards (or on the MP4 Registration Authority lists), but are in real-world files. They mostly pretty simple to trace to QuickTime or similar, where the implementation is just not updated.
I'm struggling with the GPS location box (©xyz).
Here is an example:
0x00, 0x00, 0x00, 0x1e, 0xa9, 0x78, 0x79, 0x7a,
0x00, 0x12, 0x15, 0xc7, 0x2b, 0x34, 0x31, 0x2e,
0x33, 0x37, 0x35, 0x38, 0x2b, 0x30, 0x30, 0x32,
0x2e, 0x31, 0x34, 0x39, 0x32, 0x2f

The first eight bytes are the box length and box name. No problem with that.
The next four bytes are the unknowns: 0x00, 0x12, 0x15, 0xc7.
The remaining bytes are text "+41.3758+002.1492/" which is the expected
latitude and longitude (Barcelona) per ISO 6709 (albeit not the 2023 version).
Of the unknowns, I can interpret the first two bytes as a 16 bit (unsigned) integer which matches the number of characters in the text. That is guesswork though.
The next two are a mystery - could perhaps be constants since I see the same 0x15 0xc7 values when generated from a different device in Australia.
What is the defined structure for this box, and is there a published specification that defines that structure?

**Tags:** metadata, mpeg4

> **Comments:**
> **username_1**: Looking at a video I have with exiftool and using the `-v4` option, which shows a breakdown of the structure, it seems that the character encoding and language should appear before the actual GPS data, but exiftool is showing 8 bytes instead of 4, and I can't seem to figure out what your 4 bytes mean.  I've posted an example output to [Pastebin](https://pastebin.com/PgEi3b06) which includes a default entry and a French entry.  Hopefully, that can help.  
> **username_0**: Thanks. Over at the original stack overflow question, we traced it down to the language code (which a single pad bit, then three 5 bit numbers which are the difference from 0x60 to the ASCII value.  

---

## 0 answers

