A method and system for processing and storing data in which the average time needed for storing the processed data in a storage device is automatically measured, and a processing parameter is optimized in response to the measured average storage time. In some embodiments, the invention compresses and stores video data, automatically measures the average time needed for storing the compressed video in a storage device, and optimizes the compression rate in response to the measured average storage time. The invention provides adaptive control of the bandwidth of processed data output to a storage device, to maintain transfer of the processed data to any desired storage device with optimal (for example, maximum attainable) bandwidth. In some embodiments, average throughput time for data transfers to and from a desired storage device is automatically measured, and an optimal compression rate is set in response to the measured time. The average throughput time for a video disk storage device can be measured by sending a sequence of words of varied length to the storage device and measuring the time elapsed for each of the words to be written onto and read back from a disk of the storage device.