I've successfully run sample_encode to encode raw frames to H264 and then run sample_decode to decode those frames. I noticed that all decoded frames have a timestamp value of zero. I modified sample_encode with m_pEncSurfaces[nEncSurfIdx].Data.TimeStamp = a 64 bit integer (actually system clock quadpart) in CEncodingPipeline::Run(), just before the call to EncodeFrameAsync. I'm still getting zero back in the decoded frame.
I have the latest Intel drivers and the latest Media SDK. Info about my system from control panel is attached.
Can someone assist please? I can't find any information about how timestamping actually works and the samples don't seem to make use of it at all.
Currently system you are using is a "Intel(R) Core(TM) i5-2500 CPU @ 3.30GHz" which is 2nd generation system. Support on this machine is very limited, Please refer to latest MediaSDK release notes on minimum HW requirements : https://software.intel.com/sites/default/files/mediasdk_release_notes.pdf. If you have any other system with latest processors, please try and let me know if still same behavior is observed.
In regard to timestamps, you can refer to our dev guide of more information: https://software.intel.com/sites/default/files/managed/09/02/Intel_Media_Developers_Guide.pdf.
Thanks Harsh. I have been remote debugging to a different PC with a more up to date version and the behaviour is the same. I always get 0 back in the timestamp field for all frames, whatever I put into it when I was encoding. In all other respects encoding and decoding of the frames is fine (performance is amazing, I have to say). fyi the manual mentions the word "timestamp" precisely 4 times, 3 of them in connection with calculating frame rates.
Attached info for new PC.
Thank you Harsh.
I attach sample_encode. It has a simple function in namespace called "Now" returning a uin64_t which I put into the timestamp property on line 1405 of pipeline_encode.cpp. Otherwise should be just the same project.
Update: You know how things are sometimes related, sometimes not, I thought I'd add this update just in case. Instead of writing the timestamp field I tried writing SEI user data payload to my frames. To do this I copied *exactly* the example given on your site. I wrote a bunch of files and then looked at the Nals with H264_parse. I can see the payloads in the Nals. When I try to retrieve this on decode, again with the precise code given in your example, there are no payload_type == 4 coming in.
As I say they may not be related, but just like timestamp I cannot round-trip any value it seems, between encode and decode.
Any update on this? It's getting kind-of urgent at my end :).