Media (Intel® oneAPI Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools from Intel. This includes Intel® oneAPI Video Processing Library and Intel® Media SDK.

How to sample_encode input file's input frame rate?

Lullaby_t_
Beginner
103 Views

Hi all,

I am looking into the sample_encode application of Intel Media SDK. I have seen option like -f to specify the frame rate of encoded stream. Is there any way to customize the sample_encode application so that the input frames are taken for processing in 30fps only? I understood that Intel Media SDK APIs work in an asynchronous manner. So on just skimming through the source code, i found it difficult to find the code portion where I need to change so that input frame rate can be changed? I am using a YUY2 file of resolution 1280x720 which I pass as nv12.

Thanks,

Lullaby

 

 

0 Kudos
1 Reply
Petter_L_Intel
Employee
103 Views
Hi Lullaby, To achieve rate control of input I suggest you just add a timer to measure the amount of time passed between each encoded frame (incl,. VPP in your case). The based on the measured time you can insert appropriate delay before submitting new frame to VPP/Encode. (for VPP+Encode case that means you measure and delay just before the RunFrameVPPAsync call) Regards, Petter
Reply