A method of encoding a source media program , comprising the steps of: (a) transcoding the source media program to produce a constant video quality transcoded version of the media program, wherein transcoding produces the constant video quality transcoded version of the media program as a series of I, P- and B-frames; (b) determining if an interval of the constant video quality version of the transcoded media program fails to satisfy a constraint that is based on the bit rate being a maximum bit rate over the interval of the source media program , by measuring the instantaneous bit rate and comparing the instantaneous bit rate to the constraint that the instantaneous bit rate does not exceed X Mps for Y or more seconds, wherein the interval begins and/or ends within a group of pictures; (c) if the interval of the transcoded media program fails to satisfy the constraint : (c1) adjusting at least one transcoding parameter of a set of transcoding parameters , (c2) transcoding a temporal portion of the source media program according to the adjusted at least one transcoding parameter to produce a constant bit rate version of the temporal portion of the transcoded media program, and (c3) substituting the constant bit rate version of the temporal portion of the transcoded media program for the constant video quality portion of the transcoded media program , wherein the temporal portion of the media program that is being transcoded and substituted comprises a smallest integer number of a group of pictures that span the interval for that the constraint is not satisfied. (a) transcoding the source media program to produce a constant video quality transcoded version of the media program, wherein transcoding produces the constant video quality transcoded version of the media program as a series of I, P- and B-frames; (b) determining if an interval of the constant video quality version of the transcoded media program fails to satisfy a constraint that is based on the bit rate being a maximum bit rate over the interval of the source media program , by measuring the instantaneous bit rate and comparing the instantaneous bit rate to the constraint that the instantaneous bit rate does not exceed X Mps for Y or more seconds, wherein the interval begins and/or ends within a group of pictures; (c) if the interval of the transcoded media program fails to satisfy the constraint : (c1) adjusting at least one transcoding parameter of a set of transcoding parameters , (c2) transcoding a temporal portion of the source media program according to the adjusted at least one transcoding parameter to produce a constant bit rate version of the temporal portion of the transcoded media program, and (c3) substituting the constant bit rate version of the temporal portion of the transcoded media program for the constant video quality portion of the transcoded media program , wherein the temporal portion of the media program that is being transcoded and substituted comprises a smallest integer number of a group of pictures that span the interval for that the constraint is not satisfied. (c1) adjusting at least one transcoding parameter of a set of transcoding parameters , (c2) transcoding a temporal portion of the source media program according to the adjusted at least one transcoding parameter to produce a constant bit rate version of the temporal portion of the transcoded media program, and (c3) substituting the constant bit rate version of the temporal portion of the transcoded media program for the constant video quality portion of the transcoded media program , wherein the temporal portion of the media program that is being transcoded and substituted comprises a smallest integer number of a group of pictures that span the interval for that the constraint is not satisfied. <EOS>