VideoHelp Forum




+ Reply to Thread
Results 1 to 16 of 16
  1. Member
    Join Date
    Nov 2002
    Location
    Toronto
    Search Comp PM
    This is an open GOP:
    IBBPBBPBBPBBPBB

    and this is a closed GOP:
    IBBPBBPBBPBBP

    The difference between them is that an open GOP will need the upcoming one (more precisely, the first I frame from the upcoming one) in order to correctly decode the last B frames. An open GOP is said to provide a higher quality than a closed GOP -- but how visible is the difference?

    (Some say that an open GOP will need the previous one, instead of the next one, but I believe this is not correct.)

    It is said that closed GOPs are better for editing. I think it means that it is easier for editing software not to load the subsequent GOP, but it's just a matter of time until the cost of that extra operation will become insignificant (due to smarter software and/or faster CPU). VirtualDub, for example, doesn't feel any difference.

    Then, there is the claim that some DVD players introduce artifacts when fast forwarding video without closed GOPs. Is this a real issue, or is it rather something that used to affect the old players? VCD and SVCD do not have closed GOPs, and fast forwarding works fine enough.

    Right now, I am leaning towards making MPEGs without closed GOPs. If the above issues are the only ones, then I'd say it's ok, and I prefer the extra quality instead.

    Do the open GOPs raise problems, other than what I described above?

    Best regards,
    Cosmin
    Quote Quote  
  2. Member
    Join Date
    Dec 2002
    Location
    Texas USA
    Search Comp PM
    Originally Posted by cosmin
    An open GOP is said to provide a higher quality than a closed GOP -- but how visible is the difference?
    None.

    Originally Posted by cosmin
    It is said that closed GOPs are better for editing. I think it means that it is easier
    No. It's better, not easier. In fact I-frame only MPEG is the best to edit with if you insist on editing an MPEG.

    AVI is probably best to "edit" with, but different people have different ideas of editing. I mean full on editing, not just cutting out commercials or something. For cutting away parts, use MPEG.

    Originally Posted by cosmin
    Then, there is the claim that some DVD players introduce artifacts when fast forwarding video without closed GOPs.
    Yes. And also realize quite a few authoring packages (mostly SONIC flavors) will refuse to import open-GOP MPEG files.

    Originally Posted by cosmin
    VCD and SVCD do not have closed GOPs, and fast forwarding works fine enough.
    Apples and oranges. VCD plays audio at 44.1hz just fine, but a DVD cannot. Never compare CD formats to DVD formats. Not the same, as much as it probably could/should be.
    I'm not online anymore. Ask BALDRICK, LORDSMURF or SATSTORM for help. PM's are ignored.
    Quote Quote  
  3. Member SaSi's Avatar
    Join Date
    Jan 2003
    Location
    Hellas
    Search Comp PM
    Open GOPs theoretically - I will explain that in a minute - allow the encoder to reference B frames to a wider range of I & P frames, as it sees fit to allow better compression.

    There are not very many cases where the open GOP structure can be employed. A very good example is a stationary scene where a flashlight fires against the camera lens. Everything goes flash-white and then back to normal. From the encoder's point of view time warps back after the flash - at least momentarily - and this is a nice opportunity for tricky x-referencing of frames.

    To achieve this one needs a "clever" algorithm that can identify such cases (not only flashes) and make use of them. Such inspection costs time and everybody complains about encoder performance.

    To answer the original aphorism (theoretically), I've examined the GOP structure of several video streams and found out that although many commercial DVDs show open GOP structure the streams have very very few such cases.

    On the other hand, although I've not really noticed (or bothered ) with artifacts when fast-forwarding an open gop DVD, I've noticed that as soon as the player resumes normal speed it coughs a bit, stops for a 10th of a second while it catches it's breath and then continues normally. I've done a couple of closed GOP streams and noticed this irritating behaviour missing.

    So, although the rules allow open gops and closed gops, although the rules dictate closed gops when multi-angled video streams are to be prepared, I think the benefit of an open GOP is invisible while the limitations of DVD players are visible.

    Take your pick, but before that, experiment.
    The more I learn, the more I come to realize how little it is I know.
    Quote Quote  
  4. Member
    Join Date
    Nov 2002
    Location
    Toronto
    Search Comp PM
    I see. The arguments that you guys brought here convinced me to abandon the idea of open GOPs; I'll take your word when you say that the quality difference is small or even unnoticeable, and, anyway, it's not worth the risk of having the other problems you mentioned.
    Thanks!

    To close GOPs or not to close GOPs?
    TO CLOSE GOPs!

    There is one more fact that intrigues me: what is the maximum number of frames allowed in a GOP for DVD? Is it 18 for NTSC, and 15 for PAL? I saw some docs mentioning half a second, but in that case it should be 15 for NTSC and 12 for PAL...

    TMPGEnc uses a maximum of 18 (for open GOPs) and 16 (for closed GOPs) in NTSC videos, and 15 (for open GOPs) and 13 (for closed GOPs) in PAL videos. On the other hand, I remember that Adobe Premiere (MainConcept MPEG Encoder) uses 15 for NTSC, and 12 for PAL. Now who is right?

    Furthermore, is the number of consecutive Bs limited to 2?
    I looked in the DVD Demystified FAQ, but it doesn't say anything.
    Cosmin
    Quote Quote  
  5. Member
    Join Date
    Dec 2002
    Location
    Texas USA
    Search Comp PM
    Run it at ONE I, TWO B and THREE P. Sometimes, due to limitations on hardware/software, use ONE I, ONE B, and ONE P (especially on software MPEG captures). No matter the formula, it should function as a playable DVD MPEG.

    For NTSC, 18 is the MAX, but 15 is the standard (due to ~30fps playback). If you notice motion errors, lowering it to 12 or even 6 CAN alleviate the issue, though that really wasn't the source of the problem. It's just a workaround.

    If you have DirecTV, you'll notice the streams stop perfectly on a still image when changing a channel. This is because they encode in 15's for the GOP. If it was another number, you'd have split images on the screen. Note: This does not apply when the signal is receiving interference and gets choppy/blocky. This example is only apparent when changing channels normally under optimal viewing conditions.
    I'm not online anymore. Ask BALDRICK, LORDSMURF or SATSTORM for help. PM's are ignored.
    Quote Quote  
  6. Member
    Join Date
    Nov 2002
    Location
    Toronto
    Search Comp PM
    Understood. Thanks!
    Cosmin
    Quote Quote  
  7. There is a theorectical disadvantage in closing all your GOPs in terms of quality but it probably isn't noticeable off-hand. Nobody that I know of has actually conducted any properly quality tests...

    Otherwise, pretty much what the others have stated.

    There is one other issue with the TMPGEnc encoder in particular (probably not in others). With the GOPs set to open, TMPGEnc sometimes doesn't obey it's own set max. GOP length. Presumably this is why TMPGEnc has the default DVD template with closed GOPs.

    This is why I recommend you "close GOPs" when using TMPGEnc to encode S/VCDs if you want to make chapters.

    Regards.
    Michael Tam
    w: Morsels of Evidence
    Quote Quote  
  8. Member
    Join Date
    Nov 2002
    Location
    Toronto
    Search Comp PM
    txpharoah wrote:
    For NTSC, 18 is the MAX, but 15 is the standard (due to ~30fps playback).
    But if I make closed GOPs with TMPGEnc, they'll have the size 16 or 13, not 18 or 15, since there are no Bs to link to the neighbor GOPs.

    vitualis wrote:
    With the GOPs set to open, TMPGEnc sometimes doesn't obey it's own set max.
    I guess that some software that analyzes a MPEG stream and shows all kinds of statistics (the max bit rate, the maximum GOP size, etc.) would be useful here. I tried bbvinfo from bbtools, but there is so much info in there that it's hard to extract the overall statistics. Perhaps a Perl script would help to extract some - it's just that I need to sit down and write it.

    Best regards
    Cosmin
    Quote Quote  
  9. Member
    Join Date
    Aug 2000
    Location
    Upstate NY
    Search Comp PM
    I think the spec actually calls for 38 FIELDS/sec and that includes any pulldown fields. So for your 24FPS materal the max with closed is 12, not 18. Some DVD authoring programs will not accept longer GOPs. I know I had touble until I went with 12 closed GOPs under CCE when using pulldown and 18 GOPs for when I was using 29.97fps materal.
    Quote Quote  
  10. Member
    Join Date
    Mar 2003
    Location
    Uranus
    Search Comp PM
    Try a thing called MpegStreamEye
    I dunno how useful it is but it's very interesting
    for watching MPEG2 streams
    Quote Quote  
  11. Member
    Join Date
    May 2001
    Location
    United States
    Search Comp PM
    Originally Posted by cosmin
    To close GOPs or not to close GOPs?
    TO CLOSE GOPs!
    Wait a minute, gents, the answer to the original question is NO, do NOT close all GOPs. Most GOPs are left open, so that frames can access information out side of their particular GOP. A GOP is usually closed at scene changes, at chapter points and when heavy randon accessing is required (like when viewing multiangle DVDs). Note that by heavy, I do not mean FF'ing through a video (open GOPs can handle this just as well).

    There is a slight drop in image quality, because of the lack of references outside the closed GOP.

    Here is an example of a short MPG2 video stream. The first "YES/NO" column shows whether or not the GOP is closed. As you can see, only the first GOP is closed.


    Gop no.,Timecode,Pic n.,Pictures,Closed,Broken l.,Has SeqHdr,Offset
    1,00:00:00.00,13,IPBBPBBPBBPBB,Yes,No,Yes,0000016
    2,00:00:00.13,15,IBBPBBPBBPBBPBB,No,No,Yes,001843f
    3,00:00:00.28,15,IBBPBBPBBPBBPBB,No,No,Yes,0038f90
    4,00:00:01.13,15,IBBPBBPBBPBBPBB,No,No,Yes,0058990
    5,00:00:01.28,15,IBBPBBPBBPBBPBB,No,No,Yes,007286f
    6,00:00:02.13,15,IBBPBBPBBPBBPBB,No,No,Yes,0090d12
    7,00:00:02.28,15,IBBPBBPBBPBBPBB,No,No,Yes,00aebce
    8,00:00:03.13,15,IBBPBBPBBPBBPBB,No,No,Yes,00d1e16
    9,00:00:03.28,15,IBBPBBPBBPBBPBB,No,No,Yes,00f46d5
    10,00:00:04.13,15,IBBPBBPBBPBBPBB,No,No,Yes,012804 a
    11,00:00:04.28,15,IBBPBBPBBPBBPBB,No,No,Yes,015a9a 7
    12,00:00:05.13,15,IBBPBBPBBPBBPBB,No,No,Yes,01841d a
    13,00:00:05.28,15,IBBPBBPBBPBBPBB,No,No,Yes,01bdf4 3
    14,00:00:06.13,15,IBBPBBPBBPBBPBB,No,No,Yes,01fa54 2
    15,00:00:06.28,15,IBBPBBPBBPBBPBB,No,No,Yes,023a58 f
    16,00:00:07.13,15,IBBPBBPBBPBBPBB,No,No,Yes,0285f4 4
    17,00:00:07.28,15,IBBPBBPBBPBBPBB,No,No,Yes,02cf67 6
    18,00:00:08.13,15,IBBPBBPBBPBBPBB,No,No,Yes,031a44 f
    19,00:00:08.28,15,IBBPBBPBBPBBPBB,No,No,Yes,036d2a 3
    20,00:00:09.13,15,IBBPBBPBBPBBPBB,No,No,Yes,03c2d0 b
    21,00:00:09.28,15,IBBPBBPBBPBBPBB,No,No,Yes,0414dc 2
    22,00:00:10.13,15,IBBPBBPBBPBBPBB,No,No,Yes,04621b b
    23,00:00:10.28,15,IBBPBBPBBPBBPBB,No,No,Yes,04a7b6 4
    24,00:00:11.13,15,IBBPBBPBBPBBPBB,No,No,Yes,04eabd 5
    25,00:00:11.28,15,IBBPBBPBBPBBPBB,No,No,Yes,05239f b
    26,00:00:12.13,15,IBBPBBPBBPBBPBB,No,No,Yes,05529f 1
    27,00:00:12.28,15,IBBPBBPBBPBBPBB,No,No,Yes,05831e 5
    28,00:00:13.13,15,IBBPBBPBBPBBPBB,No,No,Yes,05b25c 6
    29,00:00:13.28,15,IBBPBBPBBPBBPBB,No,No,Yes,05de3c 4
    30,00:00:14.13,15,IBBPBBPBBPBBPBB,No,No,Yes,0607ba 0
    31,00:00:14.28,15,IBBPBBPBBPBBPBB,No,No,Yes,0629d3 4
    Quote Quote  
  12. Member SaSi's Avatar
    Join Date
    Jan 2003
    Location
    Hellas
    Search Comp PM
    I think the first GOP must be a closed one as there is no previous reference for it.

    Encoding with open or closed GOPs is a setting the encoder can follow and "try" to make use of open GOPs or not. The question is whether current and real encoding engines can make much out of this, otherwise very useful, MPEG option.

    Try the following.

    Take any 1 minute segment of a video stream and pass it through Tmpgenc with a constant quality setting (any value) and make two runs. One with closed GOPs and another with open GOPs.

    Since we can expect Tmpgenc to produce two outputs of equal quality, the one with a smaller size will be the winner. If it is the one with open GOPs, then the benefit is the size difference.

    Encoding with a VBR setting at the same value, an open GOP stream would be as better - a very loose term - as smaller the CQ Open GOP stream was - if it was.

    And while encoding the two versions with CQ, check the encoding speed.

    Don't know about you, but I'm doing it at the moment and will post back comments in about an hour. (Tmpgenc is not the fastest encoder)
    The more I learn, the more I come to realize how little it is I know.
    Quote Quote  
  13. Member SaSi's Avatar
    Join Date
    Jan 2003
    Location
    Hellas
    Search Comp PM
    OK, did the test

    Both encode jobs finished at the same time. 5:11 for Open GOP 5:05 for Closed GOP. With a Q=90 and max bitrate at 9000kbps Tmpgenc produced identical files. The first was 32.053 and the second was 32.074 KB long. Quality, well you don't expect me to view any difference at an encoding Q=90, do you?
    The more I learn, the more I come to realize how little it is I know.
    Quote Quote  
  14. Member
    Join Date
    Aug 2000
    Location
    Upstate NY
    Search Comp PM
    I wonder if it wold make a bigger difference if the bitrate was lower ( encoder being more desperate ).
    Quote Quote  
  15. Member
    Join Date
    Nov 2002
    Location
    Toronto
    Search Comp PM
    Originally Posted by FOO
    Try a thing called MpegStreamEye
    I dunno how useful it is but it's very interesting
    for watching MPEG2 streams
    It is useful indeed. It doesn't show directly whether the GOPs are closed, but you can go frame by frame for a little while, and see how they are.

    It's also very interesting in that it shows how much space takes each individual frame.
    Cosmin
    Quote Quote  
  16. Member
    Join Date
    Nov 2002
    Location
    Toronto
    Search Comp PM
    Originally Posted by snowmoon
    I wonder if it wold make a bigger difference if the bitrate was lower ( encoder being more desperate ).
    Indeed. This may be one of the explanations why VCDs are ok with open GOPs, and, on the other hand, DVDs can afford to be more picky.
    Cosmin
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!