docs: protected Box createTfra(Track track, Container isoFile) {
          TrackFragmentRandomAccessBox tfra = new TrackFragmentRandomAccessBox();
          tfra.setVersion(1); // use long offsets and times
          List<TrackFragmentRandomAccessBox.Entry> offset2timeEntries = new LinkedList<TrackFragmentRandomAccessBox.Entry>();
  
          TrackExtendsBox trex = null;
          List<TrackExtendsBox> trexs = Path.getPaths(isoFile, "moov/mvex/trex");
          for (TrackExtendsBox innerTrex : trexs) {
              if (innerTrex.getTrackId() == track.getTrackMetaData().getTrackId()) {
                  trex = innerTrex;
              }
          }
  
          long offset = 0;
          long duration = 0;
  
          for (Box box : isoFile.getBoxes()) {
              if (box instanceof MovieFragmentBox) {
                  List<TrackFragmentBox> trafs = ((MovieFragmentBox) box).getBoxes(TrackFragmentBox.class);
                  for (int i = 0; i < trafs.size(); i++) {
                      TrackFragmentBox traf = trafs.get(i);
  
                      if (traf.getTrackFragmentHeaderBox().getTrackId() == track.getTrackMetaData().getTrackId()) {
  
                          // here we are at the offset required for the current entry.
                          List<TrackRunBox> truns = traf.getBoxes(TrackRunBox.class);
                          for (int j = 0; j < truns.size(); j++) {
                              List<TrackFragmentRandomAccessBox.Entry> offset2timeEntriesThisTrun = new LinkedList<TrackFragmentRandomAccessBox.Entry>();
                              TrackRunBox trun = truns.get(j);
                              for (int k = 0; k < trun.getEntries().size(); k++) {
                                  TrackRunBox.Entry trunEntry = trun.getEntries().get(k);
                                  SampleFlags sf;
                                  if (k == 0 && trun.isFirstSampleFlagsPresent()) {
                                      sf = trun.getFirstSampleFlags();
                                  } else if (trun.isSampleFlagsPresent()) {
                                      sf = trunEntry.getSampleFlags();
                                  } else {
                                      sf = trex.getDefaultSampleFlags();
                                  }
                                  if (sf == null && track.getHandler().equals("vide")) {
                                      throw new RuntimeException("Cannot find SampleFlags for video track but it's required to build tfra");
                                  }
                                  if (sf == null || sf.getSampleDependsOn() == 2) {
                                      offset2timeEntriesThisTrun.add(new TrackFragmentRandomAccessBox.Entry(
                                              duration,
                                              offset,
                                              i + 1, j + 1, k + 1));
                                  }
                                  duration += trunEntry.getSampleDuration();
                              }
                              if (offset2timeEntriesThisTrun.size() == trun.getEntries().size() && trun.getEntries().size() > 0) {
                                  // Oooops every sample seems to be random access sample
                                  // is this an audio track? I don't care.
                                  // I just use the first for trun sample for tfra random access
                                  offset2timeEntries.add(offset2timeEntriesThisTrun.get(0));
                              } else {
                                  offset2timeEntries.addAll(offset2timeEntriesThisTrun);
                              }
                          }
                      }
                  }
              }
  
  
              offset += box.getSize();
          }
          tfra.setEntries(offset2timeEntries);
          tfra.setTrackId(track.getTrackMetaData().getTrackId());
          return tfra;
      }