Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.

MFXMuxer_PutBitstream - FrameType and DecodeTimeStamp?

Matthew_C_
New Contributor I
607 Views

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
1 Solution
Matthew_C_
New Contributor I
607 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
Matthew_C_
New Contributor I
607 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
Matthew_C_
New Contributor I
608 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)

0 Kudos
Reply