EZSDK5.03.1.15
HW:DM8168
APP:capture_encode
I have set the profile parameter:
tProfileLevel.eProfile = OMX_VIDEO_AVCProfileHigh;
tProfileLevel.eLevel = OMX_VIDEO_AVCLevel42;
Urgent!!!
Hello,
Can you please provide more details on how it failed? (Output logs, etc.)
Regards,Marc
Please mark this Forum post as answered via the Verify Answer button below if it helps answer your question. Thanks!
eError = OMX_GetParameter (pHandle, OMX_IndexParamVideoProfileLevelCurrent, &tProfileLevel);
/* set as baseline 4.2 level */
eError = OMX_SetParameter (pHandle, OMX_IndexParamVideoProfileLevelCurrent,&tProfileLevel);
if (eError != OMX_ErrorNone)
ERROR ("failed to set encoder pfofile \n");
eError = OMX_GetParameter (pHandle, OMX_IndexParamVideoProfileLevelCurrent,
&tProfileLevel);
printf("tProfileLevel.eProfile %d",tProfileLevel.eProfile );
--------------------------------------------------------------------------------------------------
the print out is:
tProfileLevel.eProfile 8
but i find that the profile of the encoded h.264 file is baseline profile。why???
Feng,
If you are setting the profile, before Omx_indexParamPortDefinition, please move it after this. indexParamPortDefinition may re-initialize the profile, so it can be again base profile.
Regards
Vimal
thanks!
i follow your method to change the code as follow:
OMX_INIT_PARAM (&tPortDef);
tPortDef.nPortIndex = OMX_VIDENC_OUTPUT_PORT; eError = OMX_GetParameter (pHandle, OMX_IndexParamPortDefinition, &tPortDef); /* settings for OMX_IndexParamPortDefinition */ /* set the actual number of buffers required */ tPortDef.nBufferCountActual = IL_CLIENT_ENC_OUTPUT_BUFFER_COUNT; tPortDef.format.video.nFrameWidth = pAppData->nWidth; tPortDef.format.video.nFrameHeight = pAppData->nHeight; tPortDef.format.video.eCompressionFormat = OMX_VIDEO_CodingAVC; tPortDef.format.video.xFramerate = (pAppData->nFrameRate << 16); tVideoParams.xFramerate = (pAppData->nFrameRate << 16); tPortDef.format.video.nBitrate = pAppData->nBitRate; /* settings for OMX_IndexParamVideoPortFormat */
eError = OMX_SetParameter (pHandle, OMX_IndexParamPortDefinition, &tPortDef); if (eError != OMX_ErrorNone) { ERROR ("failed to set Encode OMX_IndexParamPortDefinition for output \n"); }
/* Set the profile and level for H264 */ OMX_INIT_PARAM (&tProfileLevel); tProfileLevel.nPortIndex = OMX_VIDENC_OUTPUT_PORT;
tProfileLevel.eProfile = OMX_VIDEO_AVCProfileBaseline; tProfileLevel.eLevel = OMX_VIDEO_AVCLevel42;
eError = OMX_SetParameter (pHandle, OMX_IndexParamVideoProfileLevelCurrent, &tProfileLevel); if (eError != OMX_ErrorNone) ERROR ("failed to set encoder pfofile \n");
but it did not work as expected,the error as follow:
encoder input port use buffer done.
encoder output port buffers allocated
got event*** unrecoverable error : OMX_ErrorBadParameter(0x80001005)
Hi Vimal,
I also meet the same problem, and follow your suggest to rearrange the code structrue as follow -
but, it still not work correctly, the run information says-
...
encoder input port use buffer done
enconder outport buffers allocated
got event*** unrecoverable error :OMX_ErrorBadParameter(0x80001005)
what's wrong?