There is no super easy way to find an I-frame. You should read the AVC stream transport stream packets. Then you need to collect packets with a packetized elementary data stream (PES), split the PES header, and then identify the type of NAL 5. So, you need a transport stream demonstrator, find the beginning of the PES packets and do a minimal H.264 parsing. For demultiplexing, you can look at this source code: http://tsdemuxer.googlecode.com/svn/trunk/v1.0/tsdemux.cpp
source share