Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Kamal_Devanga
Beginner
120 Views

QuickSync, timestamping frames (sample_encode, sample_decode).

Hi,


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.


Thank you.

 

0 Kudos
4 Replies
120 Views

Hi Robinson, 

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,

 

Kamal_Devanga
Beginner
120 Views

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.

 

 

120 Views

Hi Robinson, 

Thank you for the system analyzer log. Can you please attach your modified Sample_encode version?

Thanks,  

Kamal_Devanga
Beginner
120 Views

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 :).

 

 

Reply