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.

mfxExtPictureTimingSEI and interlaced

Fernickk
Beginner
1,088 Views

Hello. I'm using mfxExtPictureTimingSEI on the mfxEncodeCtrl struct that I send to MFXVideoENCODE_EncodeFrameAsync, in order to insert pic_timing info on the frames.

For progressive video, everything works OK, but for interlaced, both fields have identical pic_timing values, while I need the time_offset of the first field to be 0, and the second field to be 1.

I've noticed that mfxExtPictureTimingSEI has 3 timestamp structs, but whatever I set on the two latter doesn't seem to have any effect. Only the first timestamp is used for both fields.

I've tried using 0xFFFF on the field, but the encoder complains about invalid parameter. I've also read elsewhere that the hardware encoder doesn't support 0xFFFF, so never mind that.

Can you help me find out if there's a way to set different data on each field? I wouldn't like to modify the bytes after encoding to find the pic_timing and change the 0 for a 1.

Thank you in advance ^_^

 

0 Kudos
8 Replies
Gopika_Intel
Moderator
1,064 Views

Hi,

 

Thank you for posting in Intel forums. Could you please provide us with the following details so that we can try it from our end

1.    Reproducer code

2.    Steps to reproduce the issue

 

Regards

Gopika


0 Kudos
Gopika_Intel
Moderator
1,037 Views

Hi,


We're forwarding this case to the SME who can help you out.


Regards

Gopika


0 Kudos
Mark_L_Intel1
Moderator
1,023 Views

Hi Fernick,


If my understanding is correct, you are setup the encoder so each async frame call will insert a picture time SEI(PT SEI) to the output stream.

If you read the following article about PT SEI, it seems controlled by mfxExtCodingOption::PicTimingSEI, so I am not sure if your code is correct or not.

https://github.com/Intel-Media-SDK/MediaSDK/blob/8034affc6093b26ec56fc049ed669bae7fb42062/doc/mediasdk_hevc_interlace_whitepaper.md


You might also refer to the dev guide about mfxExtPictureTimingSEI which also referred to mfxExtCodingOption:

https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/mediasdk-man.md#mfxExtPictureTimingSEI


If you are not sure if it works, you can try our sample code below which has an option -PicTimingSEI:<on,off>:

https://github.com/Intel-Media-SDK/MediaSDK/blob/master/samples/sample_multi_transcode/src/transcode_utils.cpp#L306


Let me know if this helps.


Mark Liiu


0 Kudos
Fernickk
Beginner
1,012 Views

Hello, everyone, and thank you for your responses.

Our initialization and sample encoding code is sprawled all over the place, and I'm quite busy right now to do a contained repro.

I've followed the manual and the samples, and I have code that encodes the pic_timing structure into the frames.

But I still have the following questions:

- What's the point of having the timestamp as an array of three timestamps? Only TimeStamp[0] seems to be used. What should I set in TimeStamp[1] and TimeStamp[2]. The manual doesn't say anything about it, and I couldn't find it used on the samples.

- How can I make top and bottom field to have different values? They both have the values set in TimeStamp[0].

Thank you in advance.

0 Kudos
Mark_L_Intel1
Moderator
1,001 Views

Got it.


I suggested you to copy and paste your question to Media SDK GitHub issue list:

https://github.com/Intel-Media-SDK/MediaSDK/issues


This portal owned by develop team and they are pretty responsive. I believe this is a easy and quick way for you.


You can still come back if you don't get respond.


Mark Liu


0 Kudos
Mark_L_Intel1
Moderator
827 Views

Hi Fernick,


I have posted your question here:

https://github.com/Intel-Media-SDK/MediaSDK/issues/2627


Please check the answers from dev team.


Mark Liu


0 Kudos
Mark_L_Intel1
Moderator
819 Views

Hi Fernick,


We just have answer from dev team. They referred to an old post which seems have the similar question as yours, in that case, customer found:

For picture timing, if I insert two payload data in the mfxExtBuffer (instead of only one) in an interlaced resolution, it works for SW and QSV H264 encoder. I see the timecode in playback.


Here is the original post:

https://community.intel.com/t5/Media-Intel-oneAPI-Video/H264-Timecode-absent-in-QSV/m-p/950913


Please feel free to comment to the post in GitHub:

https://github.com/Intel-Media-SDK/MediaSDK/issues/2627


Mark Liu


0 Kudos
Fernickk
Beginner
812 Views

Hello, Mark, thank you for your response. I'll continue the discussion over there.

0 Kudos
Reply