Log in

View Full Version : Open GoP and Closed GoP


omer205
20th April 2009, 19:54
Hi,

I have been thinking that GoP is a groups of pictures that might be decoded independently without the need of any reference from other GoPs. But while inspecting a conformance bitstream, I realized that some of the pictures do point out outside of a GoP for referencing purposes.

My Question is:

1. What is the benefit of a GoP if it can't be decoded individually ?

2. How Can we play/fwd/reverse a video having open GoPs ?

Thanks,
Omer

Sandra24
20th April 2009, 20:08
ad2:

You have to re-encode it with for example TMPGEnc and select closed GOPs.

"Output bitstream for edition (Closed GOPs)"

LoRd_MuldeR
20th April 2009, 20:55
H.264 allows P-Frames and B-Frames to have multiple references. That is: Instead of only referring to the previous frame, they can refer to up to 16 previous frames.
Consequently you cannot start decoding at any I-Frame, because one of the P-/B-Frames after the I-Frame may refer to some frame before the I-Frame.
Anyway, there is a special kind of I-Frames in H.264, the IDR-Frames. Any frame following an IDR-Frame is guaranteed to not refer to any frame before the IDR-Frame.

The purpose of multiple references (and None-IDR I-Frames) is improved compressibility:
If more reference frames are available to the encoder, then the P- or B-Frame can be predicted more precisely and thus the residual will cost less bits to encode.

This thread explains how you can find the a point in a H.264 stream where you can start decoding/playing:
http://forum.doom9.org/showthread.php?t=146269

Also I think it's not possible to reverse a GOP without re-encoding the stream...

Manao
21st April 2009, 11:41
1. What is the benefit of a GoP if it can't be decoded individually ?Seeking : you can still seek on open GOP (provided the encoder inserted a random access point indicator, or a recovery point SEI)
2. How Can we play/fwd/reverse a video having open GoPs ?For GOP signaled with a RAP or a recovery point, you can safely decode them by ignoring all frames whose indexes are before the index of the I frame starting the GOP.