A method of providing, from a file system comprising a file record database and a data store, file data for a media file of a pre-determined format wherein the pre-determined file format has an index for indicating the location of essence data within a file, wherein the media file comprises a plurality of segments of essence data and corresponds to a programme, the method comprising the steps of: receiving details of the programme including the duration of the programme; determining the layout of the media file in the predetermined format from the received details of the programme wherein determining the layout of the media file comprises: (i) determining a maximum segment length for the file based on the properties of the pre-determined format of the media file; and (ii) using the duration to determine the length of the media file and an index of the media file indicating locations for essence data within the file wherein the index is generated using the maximum segment length and the layout comprises segments of the maximum segment length; creating a file record in the file record database for the media file; wherein the method further comprises, subsequent to determining the layout of the media file, the steps of: in response to a request for the location of essence data within the file, returning a location given by the determined layout of the media file; receiving a stream of essence data corresponding to the contents of the programme and storing the received essence data in the data store; and in response to a request for a portion of essence data from the media file corresponding to a time period of the programme, returning essence data derived from the received essence data according to the determined layout of the media file, wherein the determined layout comprises the length of the media file and the index of the media file, and the index provides a mapping of time ranges to byte ranges in the file thus allowing the segments of essence data corresponding to a particular time range to be found. receiving details of the programme including the duration of the programme; determining the layout of the media file in the predetermined format from the received details of the programme wherein determining the layout of the media file comprises: (i) determining a maximum segment length for the file based on the properties of the pre-determined format of the media file; and (ii) using the duration to determine the length of the media file and an index of the media file indicating locations for essence data within the file wherein the index is generated using the maximum segment length and the layout comprises segments of the maximum segment length; (i) determining a maximum segment length for the file based on the properties of the pre-determined format of the media file; and (ii) using the duration to determine the length of the media file and an index of the media file indicating locations for essence data within the file wherein the index is generated using the maximum segment length and the layout comprises segments of the maximum segment length; creating a file record in the file record database for the media file; wherein the method further comprises, subsequent to determining the layout of the media file, the steps of: in response to a request for the location of essence data within the file, returning a location given by the determined layout of the media file; receiving a stream of essence data corresponding to the contents of the programme and storing the received essence data in the data store; and in response to a request for a portion of essence data from the media file corresponding to a time period of the programme, returning essence data derived from the received essence data according to the determined layout of the media file, in response to a request for the location of essence data within the file, returning a location given by the determined layout of the media file; receiving a stream of essence data corresponding to the contents of the programme and storing the received essence data in the data store; and in response to a request for a portion of essence data from the media file corresponding to a time period of the programme, returning essence data derived from the received essence data according to the determined layout of the media file, wherein the determined layout comprises the length of the media file and the index of the media file, and the index provides a mapping of time ranges to byte ranges in the file thus allowing the segments of essence data corresponding to a particular time range to be found.