A method and apparatus for content substitution, consistent with certain embodiments of the present invention involves receiving data representing one or more macroblocks of content, the data having at least first and second packet identifiers (PIDs) associated with first and second portions of content. The content having the first PID is placed into a
data stream. An
initiation flag is received indicating
initiation of a PID mapping operation. The substitute macroblocks of content having the second PID is then mapped to the first PID and the mapped content is placed into the
data stream. A termination flag is received indicating termination of the PID mapping operation at which point the process returns to placing content having the first PID into the
data stream. The content substitution process can be used to replace advertisements, provide multiple plots, multiple endings, multiple views as well as other applications. This abstract should not be considered limiting, since other embodiments may incorporate more, fewer or different elements that those described in this abstract.