- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm trying to control sample MPEG2 encoder output GOP structure.
Found that mfxInfoMFX fields GopPicSize, GopRefDist and GopOptFlag are the ones that i need to tune.
But it seems that result is not always what i expect.
For example, I set:
GopPicSize = 15, GopRefDist = 2 and GopOptFlag = MFX_GOP_CLOSED | MFX_GOP_STRICT
and would expect closed GOP of 15 frames fixed size with maximum of2 B-frames in sequence.
Unfortunately what i get is 72% of GOPs having 30 frames, rest either 15 or 16.
Are there any other parameters i need to check in order to get the expected results?
Regards
Piotr
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Of course, you are correct about number of B-frames.
That's another anomaly i'm seeing.
The 30 frame GOPs look like this: IPPBBPPBBPPBBPPBBPPBBPPBBPPBBP
while 15 frame ones: IBPBPBPBPBPBPBP.
There are also 16 and 24 frame GOPs present.
All GOPs seem to be closed but their length and structure change.
I'm using example direct show mpeg2 video encoder filter from SDK 2.0.12.24071 with sw library.
As for parameter checking, I belive that CEncVideoFilter::SetParam already does that using MFXVideoENCODE_Query function.
Below is a dump of my mfxVideoParam:
mfxmfxInfoMFX
-FrameInfomfxFrameInfo
FourCC842094158unsigned int
Width544unsigned short
Height480unsigned short
CropX0unsigned short
CropY0unsigned short
CropW544unsigned short
CropH480unsigned short
FrameRateExtN30000unsigned int
FrameRateExtD1001unsigned int
reserved30unsigned short
AspectRatioW60unsigned short
AspectRatioH51unsigned short
PicStruct1unsigned short
ChromaFormat1unsigned short
reserved20unsigned short
CodecId843534413unsigned int
CodecProfile64unsigned short
CodecLevel8unsigned short
NumThread0unsigned short
TargetUsage0unsigned short
GopPicSize15unsigned short
GopRefDist2unsigned short
GopOptFlag0x0003unsigned short
IdrInterval0unsigned short
RateControlMethod2unsigned short
InitialDelayInKB0unsigned short
QPI0unsigned short
BufferSizeInKB768unsigned short
TargetKbps4000unsigned short
QPP4000unsigned short
MaxKbps4000unsigned short
QPB4000unsigned short
NumSlice0unsigned short
NumRefFrame0unsigned short
EncodedOrder0unsigned short
DecodedOrder0unsigned short
ExtendedPicStruct12unsigned short
Kind regards
Piotr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks for your answer, i will try that
Kind regards,
Piotr
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page