2

I am working on MPEG 2 Transcoding project and I need to cut a video at the boundary of GOP.
I've gone through some Documents and was able to cut the video at the start of next GOP (by checking the I-frame (or) GOP Start code 0x00 0x00 0x01 0xB8), but I need to cut the video at same GOP Boundary.

Is there any ways to do this ?

VMai
  • 10,156
  • 9
  • 25
  • 34
user2406774
  • 151
  • 1
  • 1
  • 7

2 Answers2

0

Usually most of the video editing software cuts at next GOP.

Because if you cut video withing any GOP then there may be posible that next video decoder will not be able to play some starting video freames if there were not i frame. Such P frame and B frame will not be decoded.

So better idea is to cut video stream at any GOP. Or if you want withing GOP then find out next i frame in GOP and cut from there...

Jeegar Patel
  • 26,264
  • 51
  • 149
  • 222
  • thanks for your help,i have some more questions about it .In h.264 videos there is no GOP start concept(like in MPEG2(oXB8) codec) and full I frame concept .it has only slices.how to find the start of I frame with the help of slice concept. – user2406774 Sep 17 '14 at 06:23
0

To manipulate videos, have a look at ffmpeg.
Also those related answers (about GOP, frames and ffmpeg) might help.

Community
  • 1
  • 1
n0p
  • 3,399
  • 2
  • 29
  • 50