I am working on a C++ application in which my application is receiving H265 frames from an external application and stores it on disk whenever required, but the storing needs to be start only from I-frame because if it starts from P frame, those frames would be meaningless. So how do I identify the I-frame from it?
I am new to video encoding and decoding and I am aware of following:
00 00 00 01
is start of NAL unitHere are some of the NAL unit types for H.265:
So your assumption about SPS, PPS values is incorrect.
NAL Unit structure:
"StartCode" "Byte" "Payload"
To get the NAL unit type you have to do (Byte >> 1) & 0x3f
.
You need to look for an IDR frame (instant decoder refresh; type 19 or 20).