EP0786909A2

Locating a frame position in an MPEG data stream

Abstract

A method for locating a frame position in an MPEG data stream within a computer system is disclosed. MPEG standard is a set of defined algorithms and techniques for the compression and decompression of moving pictures (video) and sound (audio), and the formation of a multiplexed data stream that includes the compressed video and audio data plus any associated ancillary service data. Although the MPEG standard is extremely flexible, there is a fundamental deficiency associated with the packet-oriented nature of the MPEG format, and that is there being no information about the position of each video frame encoded in the data stream. Even though such information can be deduced from the byte-rate, but because the calculation of a frame position depends on a constant byte-rate, a problem may still arise when the byte-rate is non-existent, incorrectly encoded, or constantly changed due to the presence of several packs with varying rates. This invention presents an improved method for locating a frame position in the MPEG data streams regardless of the byte-rate condition.

EP0786909A2, drawing sheet 1
Sheet 1 of 9

Term

Term ended

Projected expiry passed 14 January 2017, 9.7 years ago.

  1. Priority
  2. Filed
  3. Published
  4. Projected expiry
  5. Today

12 claims: 3 independent, 9 dependent

  1. 1
    A method for efficiently locating a frame in an MPEG data stream within a computer system, said method comprising the steps of:determining (80) a frame number for a desired frame;determining (82) a byte-rate of said MPEG data stream;determining (84) an estimate byte position for said desired frame from said byte-rate of said MPEG data stream;identifying (86) a presentation time stamp which is nearest to said estimate byte position for said desired frame;determining (88) a time position of said desired frame;determining (90) whether said presentation time stamp is within a specified proximity to said time position of said desired frame;in response to a determination that said presentation time stamp is not within said specified proximity to said time position of said desired frame, returning to said determining (82) a byte-rate step;and in response to a determination that said presentation time stamp is within said specified proximity of said time position of said desired frame, searching (92) for said desired frame within said specified proximity.
  2. 2
    A method as claimed in Claim 1, wherein said determining (82) a byte-rate step further comprises the step of:dividing the product of a clock frequency and the difference between a byte position of a last system clock reference from a current frame and a byte position of a next system clock reference from said current frame by the product of a frame rate and the difference between a value of said last system clock reference from said current frame and a value of said next system clock reference from said current frame.
  3. 3
    A method as claimed in Claim 1, wherein said determining (84) an estimate byte position step further comprises the step of:adding a byte position of a current frame to the product of said byte-rate and the difference between a frame number for said desired frame and a frame number for said current frame.
  4. 4
    A method as claimed Claim 1, wherein said determining a time position step (88) further comprises the step of:dividing a frame number for said desired frame by a frame rate.
  5. 5
    A method as claimed in Claim 1, wherein said determining (90) whether said presentation time stamp is within a specified proximity step further comprises the step of:determining whether said presentation time stamp is within two second of said time position of said desired frame.
  6. 6
    A method as claimed in Claim 1, said method further comprises the steps of:searching (94) back for an I-frame;and decoding (96) all frames subsequent to said I-frame until said desired frame is reached.
  7. 7
    A computer system for efficiently locating a frame position in an MPEG data stream, said computer system comprising:means for determining a frame number for a desired frame;means for determining a byte-rate of said MPEG data stream;means for determining an estimate byte position for said desired frame from said byte-rate of said MPEG data stream;means for identifying a presentation time stamp which is nearest to said estimate byte position for said desired frame;means for determining a time position of said desired frame;means for determining whether said presentation time stamp is within a specified proximity to said time position of said desired frame;means for determining another byte-rate, in response to a determination that said presentation time stamp is not within said specified proximity to said time position of said desired frame;and means for searching said desired frame within said specified proximity, in response to a determination that said presentation time stamp is within said specified proximity of said time position of said desired frame.
  8. 8
    A system as claimed in Claim 7, wherein said means for determining a byte-rate further comprises:means for dividing the product of a clock frequency and the difference between a byte position of a last system clock reference from a current frame and a byte position of a next system clock reference from said current frame by the product of a frame rate and the difference between a value of said last system clock reference from said current frame and a value of said next system clock reference from said current frame.
  9. 9
    A system as claimed in Claim 7, wherein said means for determining an estimate byte position further comprises:means for adding a byte position of a current frame to the product of said byte-rate and the difference between a frame number for said desired frame and a frame number for said current frame.
  10. 10
    A system as claimed in Claim 7, wherein said means for determining a time position further comprises:means for dividing a frame number for said desired frame by a frame rate.
  11. 11
    A system as claimed in Claim 7, wherein said means for determining whether said presentation time stamp is within a specified proximity further comprises:means for determining whether said presentation time stamp is within two second of said time position of said desired frame.
  12. 12
    A system as claimed in Claim 7, wherein said system further comprises:means for searching back for an I-frame;and means decoding all frames subsequent to said I-frame until said desired frame is reached.