gpac / mp4box.js

JavaScript version of GPAC's MP4Box tool
https://gpac.github.io/mp4box.js/
BSD 3-Clause "New" or "Revised" License
1.94k stars 326 forks source link

sample_delta of the first subsample entry = 0 #279

Closed podborski closed 2 years ago

podborski commented 2 years ago

While reviewing an input contribution to MPEG on subsamples I noticed an issue with first sample_delta not being equal to 1.

Try to parse subs_slice_hvc1.mp4 which gives:

image

While MP4Box produces:

https://github.com/MPEGGroup/FileFormatConformance/blob/main/file_features/published/nalu/hevc/subs_slice_hvc1_gpac.json

"SubSampleInformationBox": {
                "@Size": "2448",
                "@Type": "subs",
                "@Version": "0",
                "@Flags": "4",
                "@Specification": "p12",
                "@Container": "stbl traf",
                "@EntryCount": "64",
                "SampleEntry": [
                  {
                    "@SampleDelta": "1",
                    "@SubSampleCount": "4",
                 . . .

Relevant part from the ISOBMF spec:

. . . This implies that the sample_delta for the first entry describing the first sample in the track or in the track fragment is always 1.

cconcolato commented 2 years ago

When running MP4Box -diso subs_slice_hvc1.mp4 on the file, MP4Box indicates:

[iso file] first entry in SubSample in track SampleTable has sample_delta of 0, should be one. Fixing

So I think the file is wrong

podborski commented 2 years ago

If this is the case this issue here can probably be closed and I just opened a related issue in the FileFormatConformance repo to track it there.