there is provided a method for clock reference insertion during packetization of an encoded data stream , wherein said packetization is performed before buffering of the data stream . the method comprises storing the value of each bit rate applied during encoding , and the duration of time for which each bit rate is applied . a clock reference time interval is converted into a clock reference data interval using the value of each bit rate applied and the duration of time for which each bit rate is applied . the clock reference data interval is used to determine where to insert a clock reference into the data stream during packetization .