Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
7 Views

MFXMuxer_PutBitstream - FrameType and DecodeTimeStamp?

Jump to solution

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!

0 Kudos

Accepted Solutions
Highlighted
New Contributor I
7 Views

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)

View solution in original post

0 Kudos
2 Replies
Highlighted
New Contributor I
7 Views

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?

 

0 Kudos
Highlighted
New Contributor I
8 Views

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)

View solution in original post

0 Kudos