A random access read / write media format that enables segments of media to be read, written, accessed, and streamed in a non-sequential order. A media file is divided into a series of timeblocks TB0 to TBn-1 wherein each timeblock consists of media packets of a short non-overlapping time span. Each media packet in the media file is also divided into data units identifiable by data unit ID. A timeblock index table, with an entry for each timeblock in the series, and a media packet index field with a data unit ID entry for each data unit in the media packet (located in each timeblock header), are used to quickly locate portions of desired data. This two-level index hierarchy, the timeblock index table and the media packet index table, eases the locating, reading and writing of non-sequential media packets. The timeblock index allows data to be quickly found in terms of time, while the media packet index allows data to be quickly found by data unit ID.