1

I'm trying to set the GOP size (number of frames) and set the "closed GOP" flag on VC-1 encoder (WMVideo9 Encoder MFT) in Media Foundation, but I don't see a way to do it. M$ created a thousands of interfaces, but most of them are useless. (I even tried using async codecs that apparently can benefit from the GPU, etc... LOL, what a joke that is...)

Back to the problem... For example, there is an IWMCodecProps interface exposed by the IMFTransform, but it's read only. There are tons of attributes accessible through the IMFAttributes, but I don't see one for setting the GOP size and closing the GOP.

Is it possible at all? Looks like M$ is pushing away everybody coding for money. Media foundation is good for playing around only....

P.S. Not being able to answer is not the the reason for downvoting.

user1764961
  • 673
  • 7
  • 21

2 Answers2

1

Have a look at ICodecAPI interface. It exposes a lot of settings for video encoding. You would also want have a look at following ICodecAPI properties.

Sandeep Bhat
  • 165
  • 10
  • Setting CODECAPI_AVEncMPVGOPSize on Intel hardware has no effect. It works fine on Nvidia hardware MFT though. https://stackoverflow.com/questions/59051443/intel-h264-hardware-mft-poor-performance-compared-to-nvidia – iamrameshkumar Nov 30 '19 at 09:47
0

GOP size analog for VC-1 encoder, which is Windows Media Video 9 Encoder in Windows Media Video 9 Advanced Profile mode, is MFPKEY_KEYDIST Property.

Specifies the maximum time, in milliseconds, between key frames in the codec output.

Compare to GOP size coming from MPEG-2, which number of frames between neighboring I-frames.

Roman R.
  • 68,205
  • 6
  • 94
  • 158
  • Is there a similar property available in Mediafoundation MFTs? I’m looking for an option to control the time or number of frames between each I frame, I have had not luck yet. – iamrameshkumar Nov 22 '19 at 23:05