DASH-IF-IOP icon indicating copy to clipboard operation
DASH-IF-IOP copied to clipboard

How to determine correct value for `subsegmentStartsWithSAP`?

Open sandersaares opened this issue 6 years ago • 5 comments

IOP v4.3 says that @subsegmentStartsWithSAP must be either 1 or 2. There is some text in chapter 3.2.11 that explains the difference but IOP does not really say how to determine the right value to use when packaging content. We should provide such guidance.

I do not know what the right thing to do here is - presumably the value can be derived by inspecting some BMFF box? Is there also a safe default? "If unsure, put 2"? I request proposed text from some more informed person here.

sandersaares avatar Nov 27 '18 08:11 sandersaares

This is currently implemented in conformance software based on Section 8.16.3.1 of ISO BMFF (14496-12):

• a SAP of type 1 or type 2 is indicated as a sync sample, or by sample_is_non_sync_sample equal to 0 in the movie fragment; • a SAP of type 3 is marked as a member of a sample group of type 'rap '; • a SAP of type 4 is marked as a member of a sample group of type 'roll' where the value of the roll_distance field is greater than 0.

waqarz avatar Dec 11 '18 17:12 waqarz

How does one determine the difference between SAP type 1 and 2 when looking at an existing BMFF file? The pasted statement does not appear to make a difference.

sandersaares avatar Dec 17 '18 12:12 sandersaares

DASH spec is quite clear, and you can find similar definition in ISOBMFF SAP Type 1 corresponds to what is known in some coding schemes as a ”Closed GoP random access point” (in which all access units, in decoding order, starting from ISAP can be correctly decoded, resulting in a continuous time sequence of correctly decoded access units with no gaps) and in addition the access unit in decoding order is also the first access unit in presentation order.

  • SAP Type 2 corresponds to what is known in some coding schemes as a ”Closed GoP random access point”, for which the first access unit in decoding order in the media stream starting from ISAU is not the first access unit in presentation order. This is a copy from the definition in ISOBMFF.

A packager can get this value by inspecting the decoding time and presentation time of samples in the fmp4 file.

RufaelDev avatar Apr 16 '19 14:04 RufaelDev

If the IDR frame is the first frame in presentation order, it is SAP type 1 If there are pictures prior to the IDR in presentation order which are after the IDR in decoding order (e.g. RADL in HEVC, B frames depending only on the next IDR in H.264), it is SAP type 2

ZmGorynych avatar Sep 30 '19 22:09 ZmGorynych

If the IDR frame is the first frame in presentation order If there are pictures prior to the IDR in presentation order which are after the IDR in decoding orde

How should it be determined whether these statements are true/false?

I ask because when we speak of putting this value in the MPD, we are dealing with quite high level packaging logic - developers doing this might have no idea what "IDR frames" even are. We should publish some very explicit algorithm.

sandersaares avatar Oct 18 '19 08:10 sandersaares