Log in

View Full Version : Detect scene changes in h264 bitstream


Lele-brz
2nd July 2008, 10:11
Hi,
I would like to detect the frames in a h264 video (encoded with x264) where there are significant scene changes.
I was wondering if there's something I can do without even decoding the bitstream.
At first I was thinking to detect all the I-frames but I think I need some additional feature to determine which of the I-frames are the most siginificant.

Thanks in advance for any tips on that
Bye

DarkZell666
2nd July 2008, 10:44
I suppose you could filter I-frames that are surrounded by P/B frames that reference near-zero MV's ? Those frames would have a high probability of having being inserted when the encoder hit the max gop length and not on an actual scene change. What do you think ?

Lele-brz
2nd July 2008, 11:28
Hi, thanks for answering.
Yes that could be the way to select only the most significant I-frames. Another thing I would like to detect is the dissolve effect.
It seems that it should be possible analyzing the DCT coefficents.

In any case I need some help to know what kind of tools to use to perform this kind of detections. Until now I just used just libav from the FFMpeg project.

thanks fo any pointers in this direction
bye

Lele-brz
3rd July 2008, 17:14
A couple of questions:
Is there a way fro me to extract MV's without decoding the video?
What library can I use?
Is there a method without decoding the video to know id there is a dissolve effect?

Thanks

Dark Shikari
3rd July 2008, 17:27
A couple of questions:
Is there a way fro me to extract MV's without decoding the video?No, since the motion vectors are--surprise surprise--encoded in the bitstream. You have to at least decode the entire bitstream to be able to parse motion vectors.

Lele-brz
7th July 2008, 09:13
No, since the motion vectors are--surprise surprise--encoded in the bitstream. You have to at least decode the entire bitstream to be able to parse motion vectors.

Thanks for that, what could I use to extract the motion vectors and analyze them?
Not sure if there are already libraries for doing so.

bye