12-06-2013 03:05 PM
Okay then.. yah, it was pointed out that I may have not answered your question, so wanted to confirm with you first.
The clarification for the inter-frame delta I got was:
He seems to be referring to my 'stts' recommendation where I told him he can consider adding a small time delta in between the two clips. This was only a minor optimization I was suggesting where he could insert a fixed amount of time such that the first frame of the next segment does not play almost immediately after the last frame of the previous segment. The amount to add would depend on his programmed frame rate. Assuming he is doing 30 fps, you need to add roughly 33 ms which is 1600 in terms of 48000 timeScale (moov.mvhd.timeScale); but he is free to add as much as he wants if wants extra time in between the different segments. Note that he does not need to make this change as most likely no one would notice the difference unless you play it out at really slow motion.
If you want us to take a look at new clips, please start a new folder on dropbox.. that old one is getting crowded
Although, speak of the devil.. looks like Christian may have found the clip anyhow:
Quickly looked at his new clip and found that his 'stss' still does not look sane:
type stss (moov.trak.mdia.minf.stbl.stss)
version = 0 (0x00)
flags = 0 (0x000000)
entryCount = 7 (0x00000007)
sampleNumber = 1 (0x00000001)
sampleNumber = 31 (0x0000001f)
sampleNumber = 32 (0x00000020)
sampleNumber = 62 (0x0000003e)
sampleNumber = 43 (0x0000002b)
sampleNumber = 73 (0x00000049)
sampleNumber = 103 (0x00000067)
They should not go backwards like this, should always be increasing values. I did not look at the segments to figure out what it should be, but I do know that this looks wrong.
12-06-2013 03:14 PM
OK, all clear on inter-frame delta.
Right... I'll check STSS again, I was overexcited when this merger class was finally working so I probably made a mistake. Those really shouldn't go backwards.
I'll report back in 12 hours. Celebration is ongoing now, you put me out of my misery after a month of learning MP4 structure and 1400 lines of code.
What, can I say besides thank you.
Will report back soon.
12-07-2013 11:29 AM
I can confirm all is well now. Finally
Fixed all offsets and merging is a success every time.
Because of the chop bug, I'll have to work with mdats only, but that will be implemented in a near future update.
Thanks million times.