I have Created Hevc/mp4 bit stream using ffmpeg successfully. But after analysing in hex editor, I am not able to locate VPS, SPS, PPS data in mp4 file.
Then I have used LAV Splitter and checked output of splitter but it is sending data of first frame not VPS/SPS/PPS data. Even I have gone through this link but not getting anything . So where to look for VPS,SPS,PPS of Hevc/mp4 format in DirectShow filter ?
Can't help you with directshow, but here is how you can find HEVC VPS, SPS and PPS data in an mp4 file using any hex editor.
First, you need to find the moov box, which is either located very close to the start of the file, or fairly close to the end. It is identified by 4 ascii characters: 'moov'
Some bytes after this, an hvcC box should be indicated.
The data after this gives general information about the hevc stream in the mp4 file. Its format is defined in ISO/IEC 14496-15. In short, skip the next 22 bytes.
Then, parse the following data like this:
unsigned int(8) numOfArrays;
for (j=0; j < numOfArrays; j++) {
bit(1) array_completeness;
unsigned int(1) reserved = 0;
unsigned int(6) NAL_unit_type;
unsigned int(16) numNalus;
for (i=0; i< numNalus; i++) {
unsigned int(16) nalUnitLength;
bit(8*nalUnitLength) nalUnit;
}
}
Each array then corresponds to a set of NAL units of one type, so e.g. a set of SPSs. For VPS, SPS and PPS, you need the arrays with NAL_unit_type equal to 32, 33, and 34, respectively.
In the content i used as an example, you can already see that 4 arrays are available. The first array is a set of NAL units with NAL_unit_type=32(=0x20), so SPSs. Only one SPS is present, and it has a length of 0x0018=24 bytes. The SPS data starts with 0x40010C01.