Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AMF_VIDEO_ENCODER_OUTPUT_DATA_TYPE reports always frame type either 'NONE' or 'IDR' #473

Open
MichaelLudeo opened this issue Apr 15, 2024 · 3 comments
Labels
fixed / done The issue has been addressed and can be closed. question

Comments

@MichaelLudeo
Copy link

Hi.
Immediately after querying the output I am trying to read the frame type with this code:

uint32_t picType = AMF_VIDEO_ENCODER_PICTURE_TYPE_NONE;
if (outputBuffer->GetProperty(AMF_VIDEO_ENCODER_OUTPUT_DATA_TYPE, &picType) != AMF_OK)
{
	assert(0);
}

I am always getting picType equal either 0 or 2. I tried different low latency and high quality modes but same happens.
I am encoding in CBR mode and setting IDR period to be the same as the frame rate:

Result = m_AmfEncoder->SetProperty(AMF_VIDEO_ENCODER_IDR_PERIOD, IdrPeriod);

where idrPeriod = fps (30).

Also, I am forcing SPS/PPS onto the first frame,but it always reports frame type 'NONE' for the first frame.
I expect the sequence in GOP to look smth like this: IDR,PPPPPPPPPPPPPP... IDR. Frame sizes vary, and the output video stream is playable, so it is clearly has to do with my settings or encoder reporting wrong info.

@MikhailAMD
Copy link
Collaborator

The output frame type is reported by this property:AMF_VIDEO_ENCODER_OUTPUT_DATA_TYPE_ENUM.
0 and 2 are IDR and P

@MichaelLudeo
Copy link
Author

Oh,
And I am casting to AMF_VIDEO_ENCODER_PICTURE_TYPE_ENUM

@MichaelLudeo
Copy link
Author

Solved. Thanks.

@rhutsAMD rhutsAMD added the fixed / done The issue has been addressed and can be closed. label Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed / done The issue has been addressed and can be closed. question
Projects
None yet
Development

No branches or pull requests

3 participants