Announcement

Collapse
No announcement yet.

Frames? I frames, B frames, P frames?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Frames? I frames, B frames, P frames?

    Hello,

    I wonder what the types of frames are, I frames, B frames, P frames? I read that RT2000 could theoretically do realtime mpeg2 encoding, but it isn't real since it's only B-frames...?

  • #2
    First how about an MPEG primer....

    MPEG files contain 3 types of frames; I-frames, P-frames and B-frames. A typical MPEG consists of all three in a sequence called a "GOP", or Group Of Pictures. A typical GOP sequence might be in this order:

    IBBPBBPBBPBBPBBI......

    I-frames (I = inter) are easy to understand. They are bitmaps and act as keyframes within MPEG files. Most other codecs, like MJPeg or raw video, consist entirely of I-Frames.

    P-frames (P = predicted) are created mathematically from the data in sucessive I-frames. This prediction is usually based on the motion of small blocks with the sucessive I-frames.

    B-frame (B = bi-directional) is a frame that is calculated based on preditions of both I and P frames. It is mainly used to enhance reverse playback.

    MPEG's are so small mainly because most of the frames are mathematically calculated instead of being stored bitmaps. This calculated nature of P and B frames make editing IBP MPEG's very difficult. The major problem is that trimming IBP MPEG cannot be done with frame accuracy as the cuts have to be made on I frame boundaries, which might be several or tens of frames apart.

    With I-Frame MPEG editing all frames are bitmaps which can be edited with frame accuracy.

    As for the RT-2000: contrary to your source it edits in I-Frame because of this need for frame accuracy. It does, however, have the ability to produce IBP MPEG-2 files for use in the DVDiT! DVD/miniDVD burning software it comes bundled with.

    Dr. Mordrid


    [This message has been edited by DrMordrid (edited 04 June 2000).]

    Comment


    • #3
      Doc

      Is this the whole story? What you say is possibly 100% right for MPEG-1, but I fear not for 2 or 4.

      As I understand it, MPEG-2 also calculates the differences between individual frames and the immediately previous key or I frame and these differences are introduced into the algorithm, as well as the prediction. Rather like combining the advantages of MPEG-1 and MJPEG. As there is more data in the individual frames, the files are somewhat longer but the image is more accurate, especially with fast-moving objects.

      I believe MPEG-4 no longer uses blocks for the predictions, but actually identified shaped objects. This reduces pixellation.

      However, I'm not an MPEG expert and will be the first to admit I'm up the pole if sobeit.

      ------------------
      Brian (the terrible)

      Brian (the devil incarnate)

      Comment


      • #4
        MPEG-2 is a very flexable standard. MPEG-2 keeps the same encoding method as MPEG-1 but keeps the full luminance resolution but halfs the horizontal and vertical colour resolution (4:2:0 sampling). MPEG-1 was designed to fit the 1.2Mbits/s of VideoCD whereas MPEG-2 what designed to cope from 2-15Mbits/s

        DVD and digital broadcasts use they system MPEG-2 MP@ML (Main Profile at Main Level) which defines among other things the use of the 12 frame GOP as desribed above (IBBPBBPBBPBBI...). The P frames are calculated from the previous I frame by a series or vectors and scaling parameters describing the movement of macroblocks (4 8x8 pixel blocks) B frames refer to the differences between the two nearest I or P frames either side of it - they never refer to another B frame - This is exactly the same as MPEG-1. With MPEG-2 since the full frame is stored rather than just one field each I B or P frame also stores uses the difference between fields to track the motion.


        This is not high enough quality to use in studios or editing envirionments. Another variant known as MPEG-2 422P@ML (sometimes called MPEG2 Pro) keeps more of the colour information. Systems such as BetaCam SX use this with an IBIB.. GOP. The Pinnacle DC1000 card also uses this but uses its "SmartGOP" feature to make editing possible - This basically (?) rebuilds a complete I frame either side of an edit, and also builds and stores in a frame buffer the frames either side of the curent position in the timeline when editing so you can srub backwards as well as forwards. Then when you render it will reconstruct a continuous GOP sequence in compliance with the DVD format.

        The elegance of MPEG-2 is that the decodeing is just a 'simple' mathematical set of instructions. And this can be built onto simple, cheap, chips or software. Encoding on the other hand is a complex process and the quality of the encoding is down to how well written the software or firmware is and how good it's motion algoriths are. For example when encoding a feature film onto a DVD the uncompressed telecine will typically be run through an expensive hardware encoder twice so it can work out exactly how much bandwidth is needed all the way through the film and adjust the compression parameters accordingly so that just before an action sequence there is enough room in the frame buffer to increase the bandwitdh, and enlarge the motion search area to maybe the whole width of the image for a short section. Whereas cheap software encoders only do one pass and the search area is only around 64 pixels across, and hence fast moving objects are beyond its scope and it has to use more bits unnecessarily to encode an area of the image that has changed.

        MPEG-4 is totally different and is designed for low bandwitdh streaming and takes much of its ideas from the old ISDN video conferencing format (ITU-T standards H.261 and H.263)

        See http://drogo.cselt.it/mpeg/ for more info.

        Incidentally the DV compression format is similar to MPEG2 I-frame in that each frame is stored individually but with the second field being store as the difference from the first.

        James

        Comment


        • #5
          Whew... I think I felt my brain swell up on this one. Very interesting info. I had some sort of idea of what MPEG was, but this makes it seem to make a lot more sense, especially between the different formats.
          WinXP Pro SP2 ABIT IC7 Intel P4 3.0E 1024M Corsair PC3200 DCDDR ATI AIW x800XT 2 Samsung SV1204H 120G HDs AudioTrak Prodigy 7.1 3Com NIC Cendyne DVR-105 DVD burner LG DVD/CD-RW burner Fortron FSP-300-60ATV PSU Cooled by Zalman Altec Lansing MX-5021

          Comment


          • #6
            To put a bit more perspective on it the RT-2000 uses MPEG-2 4:2:2 @ML.

            Also, MPEG-4 is evolving rapidly and is now being developed for use in higher bitrate formats that it is currently used for, including broadcast TV.

            Why MPEG-4? Because it not only can be object oriented but also can included stereo video and 2D/3D meshes as part of it's content. MPEG-4 will create content types beyond what we are used to with MPEG-1 and MPEG-2.

            Read these:

            http://www.cselt.it/mpeg/standards/mpeg-4/mpeg-4.htm

            http://drogo.cselt.stet.it/mpeg/faq/faq_mpeg-4.htm

            Dr. Mordrid



            [This message has been edited by DrMordrid (edited 05 June 2000).]

            Comment

            Working...
            X