Potentially there are multiple parameters in a C3D file that may describe the frame count, a complex situation that exists because some manufacturers creating C3D files have extended the original C3D format without fully considering how their changes affect the C3D standard.
Initially C3D files recorded the total number of frames in the C3D file as a signed 16-bit integer parameter which, while limiting the maximum frame count to 32767 frames, supported data collections nine minutes long at a 60Hz frame rate. When C3D files were first created this fulfilled all motion capture requirements but, as data video frame rates increased, it restricted the length of a 240Hz frame rate data collection to just over two minutes, which presented a problem in sports applications.
Once FORTRAN-95 was released, supporting unsigned integers, the signed 16-bit integer frame limit was extended to 65535 frames by changing the interpretation of many of the stored 16-bit integer values in the C3D file from signed to unsigned integers. This doubled the potential size of the integer frame count and the length of the data collection without making any changes at a binary level to the C3D file, requiring only minor updates to user’s applications to support the extended frame range. A 60Hz, 3D sampling rate now supported data collections eighteen minutes long, while a 240Hz rate could create C3D files containing almost five minutes of high speed 3D data.
But as the C3D file format became used by the film industry the frame count limit became an issue and, although the ability to store the POINT:FRAMES parameter as a floating-point value was discussed, Vicon Motion Systems created a TRIAL group to record the frame range as two 32-bit integers, storing the first field number and last field number using a unique method that is not part of the C3D standard. Although this parameter was not fully documented, it may have been created to allow the recorded 3D data to be synchronized with video film images by supporting odd and even 3D fields within each video image frame.
Because the new TRIAL parameter was not officially documented, a new floating-point POINT:LONG_FRAMES parameter was created by C-Motion to store large 3D frame counts generated by their Visual3D analysis tool which processes 3D data collected by many different manufacturers.
The independent creation of different methods of storing the C3D frame count has created a complex situation when an application opens a C3D file and attempts to determine the C3D frame count.