I would like to know whether the current frame is a key frame in the encoding process.
How do you know?
Regards,
jmlee
Success! Subscription added.
Success! Subscription removed.
Sorry, you must verify to complete this action. Please click the verification link in your email. You may re-send via your profile.
Hi,
I have noticed that the H.264 encoder doesn't handle the transition from a still scene to a fast motion scene very well. In particular, the encoder doesn't send an IDR frame when we go to a fast motion scene and this results in one of two behaviors:
1) In CBR/VBR: You see a lot of artifacting and it looks very bad
2) In AVBR: The video looks good, however, at the point of transition to fast motion, the encoder generates several very large P frames (this is a problem for us since we are streaming)
It seems to me that when the transition to fast motion happens the encoder should simply generate an IDR frame. It looks like it is trying to follow the GOP size very strictly and only issues an IDR frame at the beginning of the next GOP. I'm using 150 for GOP size, GopRefDist of 1 and IdrInternval of 0; and I'm not setting the MFX_GOP_STRICT flag.
Any help would be appreciated.
Regards,
Farhad
Link Copied
Hi Petter,
I notice that all the gop size are the same. When do you plan to support automatic I-frame insertion?
Regards,
Yabo
Hi Yabo,
Currently the SDK does not support automatic I-frame insertion.
But - if you go back to the message thread, the issue can be traced back to controlling bitrates when streaming (especially when the scene change is big). If you are looking at similar issues and a solution, this information may help you:
The CBR and VBR methods would not adhere to the required bitrate to conform to HDR during big scene changes, thus resulting in occasional spikes in encoded frame sizes. Since then, the SDK has been trying to add more bitrate control methods for different use cases, and one such method is Look Ahead. You can find more information about it here - https://software.intel.com/en-us/articles/common-bitrate-control-methods-in-intel-media-sdk
Quoting from the article - " It distributes available bit budget between frames to produce the best possible encoding quality. This method is not a HRD compliant. It generates good results on the complex data such as fast motion video, computer generated sequences."
ALSO - Can you please share any high scene change video you may be using for your development? We could use customer provided videos as test cases, which will be helpful to both.
I would like to know whether the current frame is a key frame in the encoding process.
How do you know?
Regards,
jmlee
Hi Lee,
Could you more specific to the question? Which algorithm did you refer to?
Mark
Hi Mark.
If you do the following:
sts = m_pmfxENC-> EncodeFrameAsync (NULL, & m_pEncSurfaces [nEncSurfIdx], & pCurrentTask-> mfxBS, & pCurrentTask-> EncSyncP);
How do I know if I am on the current frame is a key frame?
Or Do I know from another function?
Regards,
Lee
Community support is provided Monday to Friday. Other contact methods are available here.
Intel does not verify all solutions, including but not limited to any file transfers that may appear in this community. Accordingly, Intel disclaims all express and implied warranties, including without limitation, the implied warranties of merchantability, fitness for a particular purpose, and non-infringement, as well as any warranty arising from course of performance, course of dealing, or usage in trade.
For more complete information about compiler optimizations, see our Optimization Notice.