mp4v2一般是用来做h264到mp4的封装,后来经过总结和优化,出现了支持h264/h265的版本,链接如下:
从以上链接中下载的MP4V2源码
相关接口如下:
MP4V2_EXPORT
MP4TrackId MP4AddH265VideoTrack(
MP4FileHandle hFile,
uint32_t timeScale,
MP4Duration sampleDuration,
uint16_t width,
uint16_t height,
uint8_t AVCProfileIndication,
uint8_t profile_compat,
uint8_t AVCLevelIndication,
uint8_t sampleLenFieldSizeMinusOne );
MP4V2_EXPORT
void MP4AddH265VideoParameterSet(
MP4FileHandle hFile,
MP4TrackId trackId,
const uint8_t *pSequence,
uint16_t sequenceLen);
MP4V2_EXPORT
void MP4AddH265SequenceParameterSet(
MP4FileHandle hFile,
MP4TrackId trackId,
const uint8_t* pSequence,
uint16_t sequenceLen );
MP4V2_EXPORT
void MP4AddH265PictureParameterSet(
MP4FileHandle hFile,
MP4Trac