Dear all,
I'm capturing frames on the 5 fps and I need to insert this information into the h264 stream. On the wiki I have found that I should probably use the picture timing SEI message, but I was not able to find the correct settings yet. Bellow are parts of my code belonging to the issue.
VIDENC1_Params params;
IH264VENC_Params h264Params;
VIDENC1_DynamicParams dynParams;
IH264VENC_DynamicParams h246DynParams;
params = Venc1_Params_DEFAULT;
params.maxWidth = width;
params.maxHeight = height;
params.encodingPreset = XDM_HIGH_SPEED;
params.inputChromaFormat = XDM_YUV_420SP;
params.rateControlPreset = IVIDEO_NONE;
params.maxBitRate = 200000;
h264Params = IH264VENC_PARAMS;
h264Params.videncParams = params;
h264Params.enableVUIparams = 0x0f;
params.size = sizeof(IH264VENC_Params);
dynParams = Venc1_DynamicParams_DEFAULT;
dynParams.targetBitRate = params.maxBitRate;
dynParams.inputWidth = width;
dynParams.inputHeight = height;
dynParams.refFrameRate = 5000;
dynParams.targetFrameRate = 5000;
dynParams.interFrameInterval = 0;
h246DynParams = H264VENC_TI_IH264VENC_DYNAMICPARAMS;
h246DynParams.videncDynamicParams = dynParams;
h246DynParams.VUI_Buffer = &VUIPARAMBUFFER;
h246DynParams.VUI_Buffer->numUnitsInTicks = 1;
h246DynParams.VUI_Buffer->timeScale = 25;
dynParams.size = sizeof(IH264VENC_DynamicParams);
inArgs.size = sizeof(IH264VENC_InArgs);
inArgs.inputID = inBuf->index + 1;
inArgs.topFieldFirstFlag = 1;
inH264Args.videncInArgs = inArgs;
inH264Args.timeStamp = timestamp;
timestamp += 20;
inH264Args.insertUserData = 0;
inH264Args.lengthUserData = 0;
inH264Args.numOutputDataUnits = 0;
When I add a mkv header to the stream and play it with mplayer it is still plays with 25fps (default fps) with no regard to inH264Args.timeStamp value or VUI_Buffer->numUnitsInTicks and timeScale. I think I must be missing some parameter...
Could please someone give me an advice how to correctly set the timestamping to the codec?
with best regards
Jan