For testing purpose, I need to add programatically some samples to an existing MP4 video file but I can't understand how. My goal is to add some CAMM1 records (exposure data) associated to each PTS multiple of 33366, that's to say : PTS=0, PTS=33366, PTS=66732, ...
I already have an existing camm track atom in my file, so the idea is to duplicate all the existing CAMM samples (CAMM2 and CAMM3 data), add my CAMM1 samples to the existing CAMM data, and write all the samples again at the end of the mdat atom (moov atom is located after mdat atom in my case). Next I'll update the CAMM track atom (stts, stsc, stsz and stco) to index all the samples correctly.
But I have 1 question I can't understand. STSC and STCO are dealing with offsets and STTS with time and delta, how can I do to link my CAMM1 records to PTS multiple of 33366 ?
Thanks