Patent ID: 8909031

Claim:
A method for recording a first digital media stream with an unknown length, comprising a number of media frames, in a data storage, comprising the following steps: setting up an encoder for encoding the media frames of the media stream in a compression mode; encoding each media frame of the first digital media stream with an unknown length into an encoded frame comprising a first number of quality layers, representing successive quality refinements of the media frame; simultaneously with and during ongoing making of the first digital media stream with the unknown length, detecting if the data storage is full; and if the data storage is not full, for each encoded frame storing all the first number of quality layers in the data storage; and if the data storage is full, simultaneously with and during the ongoing making of the first digital media stream, for each encoded frame, storing, based at least in part upon said detecting that the data storage is full, a second number of quality layers in one or more areas in the data storage previously occupied by the quality layer representing the highest resolution of the stored encoded frames, the second number of quality layers differing relative to the first number of quality layers in the data storage.