MFXMuxer_PutBitstream - FrameType and DecodeTimeStamp?

MFXMuxer_PutBitstream - FrameType and DecodeTimeStamp?

In the documentation for MFXMuxer_PutBitstream, for bs it says:

bs  - Pointer to the input bitstream. The Data, DataLength, FrameType (MFX_FRAMETYPE_I or not) and DecodeTimeStamp fields are mandatory. Use MFX_TIMESTAMP_UNKNOWN if TimeStamp is unknown.

Can DecodeTimeStamp field be set to MFX_TIMESTAMP_UNKNOWN ? 

How do I know what value to use for FrameType?  

And which of this are values set by me vs automatically by EncodeFrameAsync?

Thank you!

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

Also, little bit more information, the values that I see for these with h264Bitstream in MFXMuxer_PutBitstream(*muxer,0, h264Bitstream,0) are:

Data: Non-null pointer

DataLength: 24036

FrameType: 193

DecodeTimeStamp: -3000

TimeStamp: 0


However if I set TimeStamp and DecodeTimestamp both to MFX_TIMESTAMP_UNKNOWN before passing them into MFXMuxer_PutBitstream , I get:

DecodeTimeStamp: -1

TimeStamp: 18446744073709551615

Why are those two different?  Is TimeStamp being set to the current system time maybe?


Best Reply

Figured it out, when calling MFXMuxer_PutBitstream(mfxMuxer mux, mfxU32 track_num , mfxBitstream *bs, mfxU64 duration)

I used track_num = 0, only it turns out tracks are 1 instead of 0 indexed, so I had to switch this:

MFXMuxer_PutBitstream(*muxer,0, h264Bitstream,0)

to this:

MFXMuxer_PutBitstream(*muxer,1, h264Bitstream,0)

Leave a Comment

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