r:3946 Incorrect value for RAPDeltaTime?

  • Lothar

    Lothar - 2012-03-09

    Let's assume I have a 60s video and I want to create a DASH file for this video, but with only 1 SIDX and with 10s fragment and using RAP

    Here is the command line.

    ./bin/gcc/MP4Box -frag 10000 -rap -dash 30000000 /tmp/test/mp4

    Because I do not know the exact duration of the file, I decided to put -dash 30000000 to guaranty only ONE SIDX entry (maybe there is another solution for this)

    Then I look at the SIDX entry and notice that my 6 entries, they all have the same RAPDeltaTime = 268435456 (0x10000000)

    Each fragment start with with a Key frame. I made sure of that during the encoding.

    <Reference type="0" size="945506" duration="900000" hasRAP="1" RAPDeltaTime="268435456"/>
    <Reference type="0" size="1109280" duration="900000" hasRAP="1" RAPDeltaTime="268435456"/>
    <Reference type="0" size="963389" duration="900000" hasRAP="1" RAPDeltaTime="268435456"/>
    <Reference type="0" size="1114529" duration="900000" hasRAP="1" RAPDeltaTime="268435456"/>
    <Reference type="0" size="898053" duration="900000" hasRAP="1" RAPDeltaTime="268435456"/>
    <Reference type="0" size="774672" duration="900000" hasRAP="1" RAPDeltaTime="268435456"/>

    Now, based on the spec:
    RAP_delta_time: if contains_RAP is 1, provides the presentation time of the first random
    access point (RAP), which must be in the reference stream; reserved with the value 0 if
    contains_RAP is 0. The time is expressed as the difference between the earliest presentation
    time of the subsegment, and the presentation time of the random access point. The earliest
    presentation time of a subsegment is calculated by adding the durations of the preceding
    subsegments to the earliest_presentation_time field;

    Because my fragment starts with a Key frame, should the RAPDeltaTime be equal to 0? then each other be incremented by 10000 (because my fragment was equal to 10s)?

    Could it be a problem with the fact that I cheated on the command using the -dash 3000000 to generate only 1 dash and i did not have that much video to mux?


  • Lothar

    Lothar - 2012-03-09

    BTW, I did tried an older version of GPAC r:3789

    and I'm getting what I think is correct number for RAPDeltaTime:

    <Reference type="0" size="945506" duration="900000" hasRAP="1" RAPDeltaTime="0"/>
    <Reference type="0" size="1109280" duration="900000" hasRAP="1" RAPDeltaTime="900000"/>
    <Reference type="0" size="963389" duration="900000" hasRAP="1" RAPDeltaTime="1800000"/>
    <Reference type="0" size="1114529" duration="900000" hasRAP="1" RAPDeltaTime="2700000"/>
    <Reference type="0" size="898053" duration="900000" hasRAP="1" RAPDeltaTime="3600000"/>
    <Reference type="0" size="774672" duration="900000" hasRAP="1" RAPDeltaTime="4500000"/>

  • Lothar

    Lothar - 2012-03-22

    Never mind this problem.

    I was not using the correct MP4 dash spec.
    The latest has SAP and not RAP anymore.