Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.

Variable framerate (VFR) encoding

froueint
Beginner
906 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
906 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

0 Kudos
2 Replies
Anthony_P_Intel
Employee
907 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
0 Kudos
froueint
Beginner
906 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
0 Kudos
Reply