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.

Variable framerate (VFR) encoding

froueint
Beginner
285 Views
I'm encoding frames using the H.264 encoder. The frames don't come at fixed intervals and so I set the mfxFrameSurface1::Data::TimeStamp parameter to the actual time that each frame was submitted before passing it to the VPP and encoder. This seems to work, however, I'm trying to figure out what is the correct setting for FrameRateExtN/FrameRateExtD parameters when I initialize the encoder in this case. Changing these parameters seems to affect output size but I don't know how these parameters are interpreted in this situation where the framerate is variable and I'm explicitly setting the timestamp of each frame.

Thanks for your help.
0 Kudos
1 Solution
Anthony_P_Intel
Employee
285 Views
Hi,

When using VPP, the MediaSDK attempts to produce output frames that are intended to be viewed atthe rate specified by FrameRateExtN/FrameRateExtD. For any frame these values are compared with the input to see if frame rate conversion (FRC) is needed. The MediaSDK VPP FRC filter will add (duplicate) or drop frames to create output stream that represents the same period of time as the input stream. Please see section 4.9 of the "Intel_Media_Developers_Guide.pdf" to understand how this filter gets invoked.

Hope this helps.
-Tony

View solution in original post

2 Replies
Anthony_P_Intel
Employee
286 Views
Hi,

When using VPP, the MediaSDK attempts to produce output frames that are intended to be viewed atthe rate specified by FrameRateExtN/FrameRateExtD. For any frame these values are compared with the input to see if frame rate conversion (FRC) is needed. The MediaSDK VPP FRC filter will add (duplicate) or drop frames to create output stream that represents the same period of time as the input stream. Please see section 4.9 of the "Intel_Media_Developers_Guide.pdf" to understand how this filter gets invoked.

Hope this helps.
-Tony
froueint
Beginner
285 Views
Thanks for the quick response Tony. I think I need to basically do what the MFXVideoVPPEx sample is doing (i.e. doing FRC based on incoming timestamps).

Cheers,
Farhad
Reply