A distributed stream processing system comprising: a plurality of storage machines , each of the plurality of storage machines having one or more storage devices storing segments of a video stream, wherein the video stream is cut into the segments which are distributed across the storage devices , each of the plurality of storage machines being configured to: store at least one segment of a file of the video stream, wherein the at least one segment is a portion of the file of the video stream; process the at least one segment of a file of the video stream in real time, thereby producing a changed segment of the video stream, wherein the at least one segment of the file of the video stream is processed by rate shaping the video stream; and provide output of at least said changed segment of the video stream, and a server configured to instruct the storage devices to perform processing of the video stream, accept the output of the at least said changed segment of the video stream from each of the storage devices and combine the output of the at least one changed segment received from each of the storage devices into a video transport stream, wherein the server is further configured to produce metadata for the video stream, wherein the metadata comprises a bit rate for each of the at least one changed segment rather than a bit rate for the entire video stream, and wherein the changed segments and the metadata are stored for later re-use. a plurality of storage machines , each of the plurality of storage machines having one or more storage devices storing segments of a video stream, wherein the video stream is cut into the segments which are distributed across the storage devices , each of the plurality of storage machines being configured to: store at least one segment of a file of the video stream, wherein the at least one segment is a portion of the file of the video stream; process the at least one segment of a file of the video stream in real time, thereby producing a changed segment of the video stream, wherein the at least one segment of the file of the video stream is processed by rate shaping the video stream; and provide output of at least said changed segment of the video stream, and store at least one segment of a file of the video stream, wherein the at least one segment is a portion of the file of the video stream; process the at least one segment of a file of the video stream in real time, thereby producing a changed segment of the video stream, wherein the at least one segment of the file of the video stream is processed by rate shaping the video stream; and provide output of at least said changed segment of the video stream, and a server configured to instruct the storage devices to perform processing of the video stream, accept the output of the at least said changed segment of the video stream from each of the storage devices and combine the output of the at least one changed segment received from each of the storage devices into a video transport stream, wherein the server is further configured to produce metadata for the video stream, wherein the metadata comprises a bit rate for each of the at least one changed segment rather than a bit rate for the entire video stream, and wherein the changed segments and the metadata are stored for later re-use. <EOS>