---
title: Referencing two data files with a single track
framework: quicktime-file-format
role: article
role_heading: Article
path: quicktime-file-format/referencing_two_data_files_with_a_single_track
---

# Referencing two data files with a single track

Use multiple sample descriptions reference data in multiple files for a track.

## Overview

Overview The data reference index to be used for a given media sample is stored within that sample’s sample description. Therefore, a track must contain multiple sample descriptions in order for that track to reference multiple data files. A different sample description must be used whenever the data file changes or whenever the format of the data changes. The sample-to-chunk atom determines which sample description to use for a sample. The sample description atom would contain the following data values: Sample description atom ├── Atom size: ... ├── Atom type: 'stsd' ├── Version/Flags: 0 └── Number of entries | 2     ├── Sample description size[1]: ...     ├── Data format: 'tmcd'     ├── Reserved: 0     ├── Data reference index: 1     ├── (sample data): ...     ├── Sample description size[1]: ...     ├── Data format: 'tmcd'     ├── Reserved: 0     ├── Data reference index: 2     └── (sample data): ... If there is only 1 sample per chunk and the first 10 samples are extracted from sample description 2 and the next 30 samples are extracted from sample description 1, the sample-to-chunk atom would contain the following data values: Sample-to-chunk atom ├── Atom size: 40 ├── Atom type: 'stsc' ├── Version/Flags: 0 └── Number of entries: 2     ├── First chunk[1]: 1     ├── Samples per chunk[1]: 1     ├── Samples description ID[1]: 2     ├── First chunk[2]: 11     ├── Samples per chunk[2]: 1     └── Samples description ID[2]: 1 The data reference atom would contain the following data values: Data information atom ├── Atom size: ... ├── Atom type: 'dinf' └── Data reference atom     ├── Atom size: ...     ├── Atom type: 'dref'     ├── Version/Flags: 0     └── Number of entries: 2         ├── Size[1]: ...         ├── Type[1]: 'alis'         ├── Version[1]: 0         ├── Flags[1]: 0 (not self referenced)         ├── Data reference[1]: [alias pointing to file #1]         ├── Size[2]: ...         ├── Type[2]: 'rsrc'         ├── Version[2]: 0         ├── Flags[2] | 0 (not self referenced)         └── Data reference[2]: [alias pointing to file #2]

## See Also

### Describing samples

- [Sample table atom ('stbl')](quicktime-file-format/sample_table_atom.md)
- [Seeking with a QuickTime file](quicktime-file-format/seeking_with_a_quicktime_file.md)
- [Sample description atom ('stsd')](quicktime-file-format/sample_description_atom.md)
- [Time-to-sample atom ('stts')](quicktime-file-format/time-to-sample_atom.md)
- [Creating video tracks at 30 frames per second](quicktime-file-format/creating_video_tracks_at_30_frames_per_second.md)
- [Creating video tracks at 29.97 frames per second](quicktime-file-format/creating_video_tracks_at_2997_frames_per_second.md)
- [Creating sound tracks at 44.1 kHz](quicktime-file-format/creating_sound_tracks_at_441_khz.md)
- [Composition offset atom ('ctts')](quicktime-file-format/composition_offset_atom.md)
- [Composition shift least greatest atom ('cslg')](quicktime-file-format/composition_shift_least_greatest_atom.md)
- [Using composition offset and composition shift least greatest atoms](quicktime-file-format/using_composition_offset_and_composition_shift_least_greatest_atoms.md)
- [Sync sample atom ('stss')](quicktime-file-format/sync_sample_atom.md)
- [Partial sync sample atom ('stps')](quicktime-file-format/partial_sync_sample_atom.md)
- [Sample-to-chunk atom ('stsc')](quicktime-file-format/sample-to-chunk_atom.md)
- [Sample size atom ('stsz')](quicktime-file-format/sample_size_atom.md)
- [Chunk offset atom ('stco')](quicktime-file-format/chunk_offset_atom.md)
