Can't set MaxFrameSize

Can't set MaxFrameSize

We have the need to limit the frame size for encoding H.264 for compatability with a third party streaming server.

I have attempted to do this by using the mfxExtCodingOption2.MaxFrameSize parameter.  However, after a call to MFXVideoENCODE_Query the returned parameters have the MaxFrameSize set to 0 and the status returned is MFX_WRN_INCOMPATIBLE_VIDEO_PARAM.  I believe that I have all of the parameters set to legal values, but I'm obviously missing something.

Below is a Tracer output that shows the query in and out output.  Any help would be appreciated.

Thanks.

encode.Query.in.AsyncDepth=0
encode.Query.in.mfx.BRCParamMultiplier=0
encode.Query.in.mfx.FrameInfo.FourCC=NV12
encode.Query.in.mfx.FrameInfo.Resolution=(480,272)
encode.Query.in.mfx.FrameInfo.Crop=(0,0,480,270)
encode.Query.in.mfx.FrameInfo.FrameRate=30000/1001
encode.Query.in.mfx.FrameInfo.AspectRatio=16:9
encode.Query.in.mfx.FrameInfo.PicStruct=PROGRESSIVE
encode.Query.in.mfx.FrameInfo.ChromaFormat=4:2:0
encode.Query.in.mfx.CodecId=AVC
encode.Query.in.mfx.CodecProfile=66
encode.Query.in.mfx.CodecLevel=30
encode.Query.in.mfx.NumThread=0
encode.Query.in.mfx.TargetUsage=1
encode.Query.in.mfx.GopPicSize=15
encode.Query.in.mfx.GopRefDist=1
encode.Query.in.mfx.GopOptFlag=3
encode.Query.in.mfx.IdrInterval=0
encode.Query.in.mfx.RateControlMethod=VBR
encode.Query.in.mfx.InitialDelayInKB=0
encode.Query.in.mfx.TargetKbps=800
encode.Query.in.mfx.MaxKbps=800
encode.Query.in.mfx.BufferSizeInKB=0
encode.Query.in.mfx.NumSlice=0
encode.Query.in.mfx.NumRefFrame=1
encode.Query.in.mfx.EncodedOrder=1
encode.Query.in.Protected=0
encode.Query.in.IOPattern=IN_SYSTEM_MEMORY
encode.Query.in.NumExtParam=3
encode.Query.in.ExtParam=mfxExtCodingOption,mfxExtCodingOption2,mfxExtCodingOptionSPSPPS
encode.Query.in.ExtParam.mfxExtCodingOption.RateDistortionOpt=32
encode.Query.in.ExtParam.mfxExtCodingOption.MECostType=0
encode.Query.in.ExtParam.mfxExtCodingOption.MESearchType=0
encode.Query.in.ExtParam.mfxExtCodingOption.MVSearchWindow=(0,0)
encode.Query.in.ExtParam.mfxExtCodingOption.EndOfSequence=0
encode.Query.in.ExtParam.mfxExtCodingOption.FramePicture=0
encode.Query.in.ExtParam.mfxExtCodingOption.CAVLC=0
encode.Query.in.ExtParam.mfxExtCodingOption.RecoveryPointSEI=0
encode.Query.in.ExtParam.mfxExtCodingOption.ViewOutput=0
encode.Query.in.ExtParam.mfxExtCodingOption.NalHrdConformance=16
encode.Query.in.ExtParam.mfxExtCodingOption.SingleSeiNalUnit=0
encode.Query.in.ExtParam.mfxExtCodingOption.VuiVclHrdParameters=32
encode.Query.in.ExtParam.mfxExtCodingOption.RefPicListReordering=0
encode.Query.in.ExtParam.mfxExtCodingOption.ResetRefList=0
encode.Query.in.ExtParam.mfxExtCodingOption.RefPicMarkRep=32
encode.Query.in.ExtParam.mfxExtCodingOption.FieldOutput=0
encode.Query.in.ExtParam.mfxExtCodingOption.IntraPredBlockSize=0
encode.Query.in.ExtParam.mfxExtCodingOption.InterPredBlockSize=0
encode.Query.in.ExtParam.mfxExtCodingOption.MVPrecision=0
encode.Query.in.ExtParam.mfxExtCodingOption.MaxDecFrameBuffering=0
encode.Query.in.ExtParam.mfxExtCodingOption.AUDelimiter=32
encode.Query.in.ExtParam.mfxExtCodingOption.EndOfStream=0
encode.Query.in.ExtParam.mfxExtCodingOption.PicTimingSEI=32
encode.Query.in.ExtParam.mfxExtCodingOption.VuiNalHrdParameters=32
encode.Query.in.ExtParam.mfxExtCodingOption2.IntRefType=0
encode.Query.in.ExtParam.mfxExtCodingOption2.IntRefCycleSize=2
encode.Query.in.ExtParam.mfxExtCodingOption2.IntRefQPDelta=0
encode.Query.in.ExtParam.mfxExtCodingOption2.MaxFrameSize=60000
encode.Query.in.ExtParam.mfxExtCodingOption2.BitrateLimit=16
encode.Query.in.ExtParam.mfxExtCodingOption2.MBBRC=32
encode.Query.in.ExtParam.mfxExtCodingOption2.ExtBRC=32
encode.Query.in.ExtParam.mfxExtCodingOption2.LookAheadDepth=0
encode.Query.in.ExtParam.mfxExtCodingOption2.Trellis=0
encode.Query.in.ExtParam.mfxExtCodingOptionSPSPPS.SPSId=0
encode.Query.in.ExtParam.mfxExtCodingOptionSPSPPS.SPSBufSize=27
encode.Query.in.ExtParam.mfxExtCodingOptionSPSPPS.PPSId=0
encode.Query.in.ExtParam.mfxExtCodingOptionSPSPPS.PPSBufSize=8
encode.Query.out.AsyncDepth=0
encode.Query.out.mfx.BRCParamMultiplier=1
encode.Query.out.mfx.FrameInfo.FourCC=NV12
encode.Query.out.mfx.FrameInfo.Resolution=(480,272)
encode.Query.out.mfx.FrameInfo.Crop=(0,0,480,270)
encode.Query.out.mfx.FrameInfo.FrameRate=30000/1001
encode.Query.out.mfx.FrameInfo.AspectRatio=16:9
encode.Query.out.mfx.FrameInfo.PicStruct=PROGRESSIVE
encode.Query.out.mfx.FrameInfo.ChromaFormat=4:2:0
encode.Query.out.mfx.CodecId=AVC
encode.Query.out.mfx.CodecProfile=66
encode.Query.out.mfx.CodecLevel=30
encode.Query.out.mfx.NumThread=0
encode.Query.out.mfx.TargetUsage=1
encode.Query.out.mfx.GopPicSize=15
encode.Query.out.mfx.GopRefDist=1
encode.Query.out.mfx.GopOptFlag=3
encode.Query.out.mfx.IdrInterval=0
encode.Query.out.mfx.RateControlMethod=VBR
encode.Query.out.mfx.InitialDelayInKB=0
encode.Query.out.mfx.TargetKbps=800
encode.Query.out.mfx.MaxKbps=800
encode.Query.out.mfx.BufferSizeInKB=0
encode.Query.out.mfx.NumSlice=0
encode.Query.out.mfx.NumRefFrame=1
encode.Query.out.mfx.EncodedOrder=1
encode.Query.out.Protected=0
encode.Query.out.IOPattern=IN_SYSTEM_MEMORY
encode.Query.out.NumExtParam=3
encode.Query.out.ExtParam=mfxExtCodingOption,mfxExtCodingOption2,mfxExtCodingOptionSPSPPS
encode.Query.out.ExtParam.mfxExtCodingOption.RateDistortionOpt=32
encode.Query.out.ExtParam.mfxExtCodingOption.MECostType=0
encode.Query.out.ExtParam.mfxExtCodingOption.MESearchType=0
encode.Query.out.ExtParam.mfxExtCodingOption.MVSearchWindow=(0,0)
encode.Query.out.ExtParam.mfxExtCodingOption.EndOfSequence=0
encode.Query.out.ExtParam.mfxExtCodingOption.FramePicture=0
encode.Query.out.ExtParam.mfxExtCodingOption.CAVLC=0
encode.Query.out.ExtParam.mfxExtCodingOption.RecoveryPointSEI=0
encode.Query.out.ExtParam.mfxExtCodingOption.ViewOutput=0
encode.Query.out.ExtParam.mfxExtCodingOption.NalHrdConformance=16
encode.Query.out.ExtParam.mfxExtCodingOption.SingleSeiNalUnit=0
encode.Query.out.ExtParam.mfxExtCodingOption.VuiVclHrdParameters=32
encode.Query.out.ExtParam.mfxExtCodingOption.RefPicListReordering=0
encode.Query.out.ExtParam.mfxExtCodingOption.ResetRefList=0
encode.Query.out.ExtParam.mfxExtCodingOption.RefPicMarkRep=32
encode.Query.out.ExtParam.mfxExtCodingOption.FieldOutput=0
encode.Query.out.ExtParam.mfxExtCodingOption.IntraPredBlockSize=0
encode.Query.out.ExtParam.mfxExtCodingOption.InterPredBlockSize=0
encode.Query.out.ExtParam.mfxExtCodingOption.MVPrecision=0
encode.Query.out.ExtParam.mfxExtCodingOption.MaxDecFrameBuffering=0
encode.Query.out.ExtParam.mfxExtCodingOption.AUDelimiter=32
encode.Query.out.ExtParam.mfxExtCodingOption.EndOfStream=0
encode.Query.out.ExtParam.mfxExtCodingOption.PicTimingSEI=32
encode.Query.out.ExtParam.mfxExtCodingOption.VuiNalHrdParameters=32
encode.Query.out.ExtParam.mfxExtCodingOption2.IntRefType=0
encode.Query.out.ExtParam.mfxExtCodingOption2.IntRefCycleSize=2
encode.Query.out.ExtParam.mfxExtCodingOption2.IntRefQPDelta=0
encode.Query.out.ExtParam.mfxExtCodingOption2.MaxFrameSize=0
encode.Query.out.ExtParam.mfxExtCodingOption2.BitrateLimit=16
encode.Query.out.ExtParam.mfxExtCodingOption2.MBBRC=32
encode.Query.out.ExtParam.mfxExtCodingOption2.ExtBRC=32
encode.Query.out.ExtParam.mfxExtCodingOption2.LookAheadDepth=0
encode.Query.out.ExtParam.mfxExtCodingOption2.Trellis=0
encode.Query.out.ExtParam.mfxExtCodingOptionSPSPPS.SPSId=0
encode.Query.out.ExtParam.mfxExtCodingOptionSPSPPS.SPSBufSize=27
encode.Query.out.ExtParam.mfxExtCodingOptionSPSPPS.PPSId=0
encode.Query.out.ExtParam.mfxExtCodingOptionSPSPPS.PPSBufSize=8
encode.Query.status=MFX_WRN_INCOMPATIBLE_VIDEO_PARAM

4 post / 0 nuovi
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione

Hi,

Can you please share some more details about your system configuration, such as the version of your graphics driver (assuming your intent is to execute using HW acceleration). You can fetch this info quickly by using the "mediasdk_sys_analyzer" tool.

Also, what version of the Media SDK API are you initializing your session with?

Regarding the "MaxFrameSize" parameter. On thing to note is that the selected frame size threshold is not a complete guarantee. You may have to experiment with the feature to see if it fulfills your requirements.

Regards,
Petter 

We are using API 1.7, SW only

Intel Media SDK System Analyzer (32 bit)

The following versions of Media SDK API are supported by platform/driver:

Version Target Supported Dec Enc
1.0 HW No
1.0 SW Yes X X
1.1 HW No
1.1 SW Yes X X
1.3 HW No
1.3 SW Yes X X
1.4 HW No
1.4 SW Yes X X
1.5 HW No
1.5 SW Yes X X
1.6 HW No
1.6 SW Yes X X
1.7 HW No
1.7 SW Yes X X

Graphics Devices:
Name Version State
Intel(R) HD Graphics 8.15.10.2622 Active

System info:
CPU: Intel(R) Core(TM) i5 CPU K 655 @ 3.20GHz
OS: Microsoft Windows 7 Enterprise
Arch: 64-bit

Installed Media SDK packages (be patient...processing takes some time):
Intel« Media SDK 2013 (x86)
Intel« Media SDK 2013 R2 (x86)
Intel(R) Media SDK 2012 R3 (x86)

Installed Media SDK DirectShow filters:
Intel« Media SDK MP3 Decoder :
C:\Program Files (x86)\Intel\Media SDK 2013 R2\samples\_bin\win32\imc_mpa_dec_ds.dll
Intel« Media SDK JPEG Decoder :
C:\Program Files (x86)\Intel\Media SDK 2013 R2\samples\_bin\win32\jpeg_dec_filter.dll
Intel« Media SDK MPEG-2 Splitter :
C:\Program Files (x86)\Intel\Media SDK 2013 R2\samples\_bin\win32\imc_mp2_spl_ds.dll
Intel« Media SDK H.264 Encoder :
C:\Program Files (x86)\Intel\Media SDK 2013 R2\samples\_bin\win32\h264_enc_filter.dll
Intel« Media SDK MVC Decoder :
C:\Program Files (x86)\Intel\Media SDK 2013 R2\samples\_bin\win32\mvc_dec_filter.dll
Intel« Media SDK AAC Decoder :
C:\Program Files (x86)\Intel\Media SDK 2013 R2\samples\_bin\win32\imc_aac_dec_ds.dll
Intel« Media SDK MPEG-2 Decoder :
C:\Program Files (x86)\Intel\Media SDK 2013 R2\samples\_bin\win32\mpeg2_dec_filter.dll
Intel« Media SDK MP4 Splitter :
C:\Program Files (x86)\Intel\Media SDK 2013 R2\samples\_bin\win32\imc_mp4_spl_ds.dll
Intel« Media SDK MPEG-2 Muxer :
C:\Program Files (x86)\Intel\Media SDK 2013 R2\samples\_bin\win32\imc_mp2_mux_ds.dll
Intel« Media SDK MP4 Muxer :
C:\Program Files (x86)\Intel\Media SDK 2013 R2\samples\_bin\win32\imc_mp4_mux_ds.dll
Intel« Media SDK H.264 Decoder :
C:\Program Files (x86)\Intel\Media SDK 2013 R2\samples\_bin\win32\h264_dec_filter.dll
Intel« Media SDK MP3 Encoder :
C:\Program Files (x86)\Intel\Media SDK 2013 R2\samples\_bin\win32\imc_mpa_enc_ds.dll
Intel« Media SDK AAC Encoder :
C:\Program Files (x86)\Intel\Media SDK 2013 R2\samples\_bin\win32\imc_aac_enc_ds.dll
Intel« Media SDK MPEG-2 Encoder :
C:\Program Files (x86)\Intel\Media SDK 2013 R2\samples\_bin\win32\mpeg2_enc_filter.dll
Intel« Media SDK VC-1 Decoder :
C:\Program Files (x86)\Intel\Media SDK 2013 R2\samples\_bin\win32\vc1_dec_filter.dll

Installed Intel Media Foundation Transforms:
H.264 Decoder MFT for Intel« HD Graphics : {1A1703E9-3E7C-41C3-AD5A-795CBFB19552}
MPEG-2 Decoder MFT for Intel« HD Graphics : {92B6DF56-82F7-4340-A562-5451481FD712}
VC-1 Decoder MFT for Intel« HD Graphics : {E7FD7E9F-F823-4283-9B29-BA65BF439CAD}
Video Pre-Processing MFT for Intel« HD Graphics : {1610BE56-B101-40FD-8136-779285D7D4A6}

Tips:
- HW target does not work: If you expect it should, then make sure to install
latest Intel gfx driver, and that Intel gfx is selected as primary driver
- If Intel driver is associated with secondary adapter, make sure to
initialize DirectX device used with Media SDK with corresponding adapter

Analysis complete... [press ENTER]

Hi,

Unfortunately, the MaxFrameSize parameter is not supported in SW encoding mode.

Regards,
Petter 

Accedere per lasciare un commento.