View Full Version : Any way to identify "scenecut" I-frames?
laserfan
19th March 2011, 01:00
Given what a good job scenecut does to id scene changes, I was thinking to use them in a program where I'd use the scene changes as chapter marks in a BD (yeah it's a slow video). Is there any way to do this?
If I use opengop on the encoding, all the I-frames appear as (little) i-frames in the .stats file, whether achieve via scenecut or keyint. The only I frames found are those I've set using qpfile.
Again, are there any options I can set w/scenecut to find those frames, or analysis I can do on the stats file to find the scene changes...
LoRd_MuldeR
19th March 2011, 01:57
libx264 reports whether a frame is a keyframe or not in the "b_keyframe" field of the "x264_picture_t" struct (as we can't get that info from the "i_type" field when no IDR frames are used).
The calling application can do whatever it needs to do with that info...
kemuri-_9
19th March 2011, 15:06
b_keyframe being 0 (false) and i_type being X264_TYPE_I does indicate where scenecut was performed, however,
1) these frames are not valid seek points and can not be used as reliable chapter points
2) these are not necessarily all of the places scenecut flagged a scene change, it's only the places that was detected and the number of frames since the last keyframe was < min-keyint
i don't see any current way of getting the information on where libx264 flagged all scenecuts without modifying it.
but, as stated previously, all scenecuts are not seekable, so you should only keep to frames that are output with b_keyframe of nonzero (true).
and you could have x264cli output this information with only a few small modifications.
laserfan
19th March 2011, 15:48
Thanks you guys. Given that I could not find a Google Translate option "Programmer <--> English" understanding your posts is something of a struggle for me. ;)
In any case it seems I need to learn about libx264, and will attempt to do so. :)
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.