A method, apparatus and article of manufacture is provided for automatic
insertion of a compressed GOP offset table within a previously encoded
MPEG video file, for frame accurate random access of each individual
video frame in play-from-offset mode. The method creates a compressed GOP
offset table having an entry for each GOP header of every video packet of
the MPEG video file, and modifies the MPEG video file by inserting the
compressed GOP offset table before the MPEG video file as at least one
padding packet, thereby preserving the MPEG compliance and compressed
audio/video data of the MPEG video file. The method further has a step
for estimating a number of padding packets needed for the GOP offset
table, thereby limiting the MPEG video file reading to a single read.