Log in

View Full Version : Question about GOP Header in Mpeg-2


Dave1024
8th July 2011, 12:18
Hi,

Please answer to my doubts.

GOP header giving the info about the time associate with a frame. So

1. GOP header is comming with all audio & video frame or it is comming in between once in 30 frames if frame rate is 30/s

I want to seek and find the frames based on it hh::mm::ss values

Thanks
Dave

Ghitulescu
8th July 2011, 12:53
No, GOP has absolutely nothing to do with the fps, except that the DVD standard imposes a certain length depending on NTSC/PAL format (fps).

Also the GOP length doesn't need to be constant (say 15 for DVD PAL) throughout the file, this helps the encoder to better encode the scene changes (I frames). You have to read the PTS for each GOP (I frame) and seek until you find the nearest position to the desired TC, then you have to decode the I frame (the first one of the GOP) and all subsequent ones until you get yours. If I were a programmer this is the way I would do it. For processing the video I would also index it for a faster seeking the next time.