Each frame is split into 2 packets of 1286 bytes each, where actual data is 1280 bytes each. Both the packets (incl header and footer) are written one after the other into the file.
Representation of each packet:
- The first 4 bytes represents a number from which, the frame number and packet number can be derived.
If the number was 108601, increment it by 1 to get 108602.
Then this
is the frame number
and
is the packet number.
0 is the packet on the left and 1 is the packet on the right.
On a side note, when you use the data call back, we also give you the derived frame number as an argument.
- Data of 1280 bytes. 16 bits per pixel.
- 2 bytes of insignificant footer.