sample_multi_transcode - Set GOP (KeyFrame) size?!

sample_multi_transcode - Set GOP (KeyFrame) size?!

Hi guys,

is there any option how to set the GOP (Group Of Pictures) with the sample_multi_transcode_drm or any other sample included in the media sdk?

I'm using the current version of the MediaSDK with a Haswell CPU under SuSE Sles 11 and Ubuntu 12.04 and everything is working fine but only the GOP is much to large. Normaly it's recommended to use a gop between 10-15 but after I've transcoded a h264 via QuickSync the GOP value is about ~257 and that's much to high for smooth fast forward / backward in most of other softwares which are working with the mp4 afterwards. 

Is there any chance to set the GOP with a parameter/option? I didn't found anything, and retranscoding afterwards with ffmpeg/avconv just for the GOP size isn't a option as the advantage of fast transcoding isn't guaranteed anymore (ffmpeg/avconv are software transcoder... currently....).

Hope you can help me anyway!

Cheers!

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Best Reply

While the samples have a lot of features to help get you started, they are not intended to be comprehensive.  Command line options are not available for every parameter.  However, you are encouraged to use the samples as a way to investigate how Media SDK works.  The basic idea is that parameters are passed to each stage you want to use (decode, vpp, encode) at initialization.  For encode in sample_multi_transcode you can see this in InitEncMfxParams (found in pipeline_transcode.cpp).

The parameter you're probably most interested in is GopPicSize, though GopRefDist and IdrInterval are also of interest here.  More info can be found in the manual.

Adding 1 line to InitEncMfxParams should let you start controlling GOP size:

   m_mfxEncParams.mfx.GopPicSize = 10;

 

Thanks Jeffrey! I'm going to test this, many thanks again!

It's working like a charm jeffrey!

Thank you so much for your help, awesome!

Leave a Comment

Please sign in to add a comment. Not a member? Join today