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 ^_^
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
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.
You might also refer to the dev guide about mfxExtPictureTimingSEI which also referred to mfxExtCodingOption:
If you are not sure if it works, you can try our sample code below which has an option -PicTimingSEI:<on,off>:
Let me know if this helps.
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 seems to be used. What should I set in TimeStamp and TimeStamp. 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.
Thank you in advance.
I suggested you to copy and paste your question to Media SDK GitHub issue list:
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.
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:
Please feel free to comment to the post in GitHub: