PDA

View Full Version : Cut stream - keyframe insertion


MatLz
15th August 2009, 00:48
I often encode anime series of 12 or 26 episodes. In place of encode each episode individualy, I would like encode all in one time. Easy with Avisynth (vfinal=v1+v2+v3.....) But after that, how cut the stream in the right frame? Must be this frame a keyframe?

sneaker_ger
15th August 2009, 01:19
Yes, the first frame of each episode has to be an IDR frame. Take a look at this thread (http://forum.doom9.org/showthread.php?t=144207) for further information.

MatLz
15th August 2009, 02:05
Yes, the first frame of each episode has to be an IDR frame. Take a look at this thread (http://forum.doom9.org/showthread.php?t=144207) for further information.

Yes, I need to make a qp file for that. And after I think dgavcindex can cut the stream when we do "save project and demux video". . .
Thanks Sneaker_ger.
Thread for nothing...sorry guys.

sneaker_ger
15th August 2009, 02:14
Wait, I think I forgot something:
Since you're not setting IDR frames for chapters but for cuts you'll have to take care of b-frames referencing I frames, meaning you have to take care of the frame type of the frame before the IDR frame also.

/edit: I'm not sure if any b-frames actually do that when using x264. I just took a look at a stats file and it didn't seem to be the case, so setting the first frame of an episode as IDR may actually be sufficient for the moment. (Until open gop patch gets committed?)
Since I'm a bit confused at the moment you should probably wait for some of the pros to look into this thread.

MatLz
15th August 2009, 03:37
I have do a try with a .qp file:
1000 I -1
2000 I -1
3000 I -1
.....and it's work properly.
Thanks Sneaker_ger.

sneaker_ger
15th August 2009, 04:07
Good. I actually read and thought a bit more about it and my confusion's gone:
Setting "I" (upper case) is actually sufficient, even with open gop patch, because IDR-frame means that the gops are closed. (no referencing at all between the gops), while "i" (lower case) can be
a.) a recovery point (b-frames from the previous gop needing frames of the current gop, but no frame of the current gop needing frames from the previous gop, so that this i-frame can be used for fast seeking or deletion of everything before this i-frame) (currently needs open gop patch) or
b.) "just" i-frame (no frames of the previous gop needing frames of the current gop, but P/b-frames of the current gop needing frames from the previous gop) or
c.) another type of "just" be an i-frame (b-frames from the previous gop needing frames from the current gop, and P/b-frames of the current gop needing frames from the previous gop) (currently needs open gop patch)

If I'm talking nonsense please correct me.